Split up receivers for local BG broadcasts and SMS.

Receiving local BG values probably fails silently when SMS
permission is not granted (due to SMS plugin not being used).
This commit is contained in:
Johannes Mockenhaupt 2019-04-13 14:13:37 +02:00
parent 1286aabb5b
commit 59d3c79ed5
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 27 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 aaps -->
<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,3 @@
package info.nightscout.androidaps.receivers;
public class SmsReceiver extends DataReceiver {}