Merge pull request #1742 from jotomo/1740

Split up receivers for local BG broadcasts and SMS.
This commit is contained in:
Milos Kozak 2019-04-15 07:56:26 +02:00 committed by GitHub
commit d70f2b6f75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 15 deletions

View file

@ -73,31 +73,40 @@
<activity android:name=".plugins.pump.danaRS.activities.PairingHelperActivity" />
<activity android:name=".activities.HistoryBrowseActivity" />
<!-- Receive new BG readings from other local apps -->
<receiver
android:name=".receivers.DataReceiver"
android:enabled="true"
android:exported="true"
android:permission="android.permission.BROADCAST_SMS">
android:name=".receivers.DataReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<!-- Receive new SMS messages -->
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<!-- Receiver from xDrip -->
<action android:name="com.eveningoutpost.dexdrip.BgEstimate" />
<action android:name="com.eveningoutpost.dexdrip.BgEstimate"/>
<!-- Receiver from 640g uploader -->
<action android:name="com.eveningoutpost.dexdrip.NS_EMULATOR" />
<action android:name="com.eveningoutpost.dexdrip.NS_EMULATOR"/>
<!-- Receiver from glimp -->
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED" />
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED"/>
<!-- Receiver from DexcomG5 -->
<action android:name="com.dexcom.cgm.DATA" />
<action android:name="com.dexcom.cgm.AndroidAPSEVGCallback.BROADCAST" />
<action android:name="com.dexcom.cgm.g5.AndroidAPSEVGCallback.BROADCAST" />
<action android:name="com.dexcom.cgm.DATA"/>
<action android:name="com.dexcom.cgm.AndroidAPSEVGCallback.BROADCAST"/>
<action android:name="com.dexcom.cgm.g5.AndroidAPSEVGCallback.BROADCAST"/>
<!-- Receiver from Poctech -->
<action android:name="com.china.poctech.data" />
<action android:name="com.china.poctech.data"/>
<!-- Receiver from Tomato -->
<action android:name="com.fanqies.tomatofn.BgEstimate" />
<action android:name="com.fanqies.tomatofn.BgEstimate"/>
</intent-filter>
</receiver>
<!-- Receive new SMS messages -->
<receiver
android:name=".receivers.SmsReceiver"
android:enabled="true"
android:exported="true"
android:permission="android.permission.BROADCAST_SMS">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED"/>
</intent-filter>
</receiver>
<!-- Receiver keepalive, scheduled every 30 min -->
<receiver android:name=".receivers.KeepAliveReceiver" />

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.receivers;
/**
* Forward received SMS intents. This is a separate class, because unlike local broadcasts handled by DataReceiver,
* receiving SMS requires a special permission in the manifest, which necessitates a separate receiver.
*/
public class SmsReceiver extends DataReceiver {}