NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.38k stars 1.14k forks source link

Android 10 NightScoutFollowService exception #1831

Closed jrsokolow closed 2 years ago

jrsokolow commented 3 years ago

Hi,

I am running xDrip+ (stable version) and Android APS on Jelly 2 with Android 10.

My set up if following.

I have NightScout receiving BG from Medtronic 640 uploader.

xDrip reads BG from NightScout and should send it locally to Android APS where xDrip is set as BG source.

Problem is that sending BG from xDrip to APS is not working or works once and then not.

In xDrip event logs I see following exception

"Got exception trying to use Android 10+ service starting for NightscoutFollowService java.lang.IllegalArgumentException: foregroundServiceType 0x0000....08 is not subset of foregroundServiceType attribute 0x00000000 in service element of manifest file"

Please help :)

tolot27 commented 3 years ago

I've discovered this exception a while, too. But it had no effect on functionality, at least for me. I already dig into it a bit. The reason for the exception is that the data sync services of xDrip do not have the right foregroundServiceType. I can provide a fix, soon.

jrsokolow commented 3 years ago

Hi @tolot27, thanks a lot. Fix will be available in nightly build? Could you let me know here when it is there ?

tolot27 commented 3 years ago

Hi @tolot27, thanks a lot. Fix will be available in nightly build? Could you let me know here when it is there ?

Please look at the corresponding PR and try the linked apk. Report back, if your problem is solved.

tolot27 commented 3 years ago

@tolot27 I have tested and bug is still there

Did you mean your problem with not sending BG from xDrip to APS? Is the exception gone?

jrsokolow commented 3 years ago

@tolot27 I have tested and bug is still there

Did you mean your problem with not sending BG from xDrip to APS? Is the exception gone?

Problem with sending BG from xdrip to aps is still there and bug in event logs is also there. So nothing has changed. I have checked in system status that I have installed version provided by you.

jrsokolow commented 3 years ago

@tolot27 I am wondering, maybe I should build xDrip for android 10 specifically? Currently I was using latest stable version downloaded from xdrip github page.

tolot27 commented 3 years ago

@jrsokolow Please try the new apk available at https://www.dropbox.com/s/gsmxydjq8jqoocm/xDrip_20210923_7282febf4_DataForegroundServiceTypes_debug.apk?dl=0.

The exception should be gone but I'm sure, the root cause of your problem is different because regardless of the exception, NightscoutFollowService is started, anyway.

Problem is that sending BG from xDrip to APS is not working or works once and then not.

What is correct: it is not working or it works just once after starting xDrip? In my opinion, your setup does not make much sense to me. Sending data from one xDrip (likely another phone) to Nightscout and using an xDrip instance with NightscoutFollowService as bridge/broadcaster to AAPS it not recommend. Why don't you use one xDrip instance as primary BG collector and broadcaster to AAPS?

tolot27 commented 3 years ago

Problem is that sending BG from xDrip to APS is not working or works once and then not.

What is correct: it is not working or it works just once after starting xDrip? In my opinion, your setup does not make much sense to me. Sending data from one xDrip (likely another phone) to Nightscout and using an xDrip instance with NightscoutFollowService as bridge/broadcaster to AAPS it not recommend. Why don't you use one xDrip instance as primary BG collector and broadcaster to AAPS?

Ah, got it. Because you need NightScout to receive the BGs from Medtronic 640 uploader. Would #1649 an option for you?

jrsokolow commented 3 years ago

@jrsokolow Please try the new apk available at https://www.dropbox.com/s/gsmxydjq8jqoocm/xDrip_20210923_7282febf4_DataForegroundServiceTypes_debug.apk?dl=0.

The exception should be gone but I'm sure, the root cause of your problem is different because regardless of the exception, NightscoutFollowService is started, anyway.

Problem is that sending BG from xDrip to APS is not working or works once and then not.

What is correct: it is not working or it works just once after starting xDrip? In my opinion, your setup does not make much sense to me. Sending data from one xDrip (likely another phone) to Nightscout and using an xDrip instance with NightscoutFollowService as bridge/broadcaster to AAPS it not recommend. Why don't you use one xDrip instance as primary BG collector and broadcaster to AAPS?

Hi @tolot27, I have tested and exception is not there any more. Thanks a lot. Problem with sending BG from xdrip to aaps is still there. I don't understand why. I have enabled local broadcasting, used correct identifier and nothing. No BG is sent to AAPS where I have set xdrip as bg source. I have noticed also that it takes long for xdrip to get new BG from NS. It is sth around 10 minutes. In real life I will use dexcom g6 so I am wondering if I am going to have similar issues with xdrip as dexcom bg receiver. Probably yes as BG from dexcom will have to be broadcasted to aaps. So then I have to use patched dexcom app and uninstall xdrip.

jrsokolow commented 3 years ago

Problem is that sending BG from xDrip to APS is not working or works once and then not.

What is correct: it is not working or it works just once after starting xDrip? In my opinion, your setup does not make much sense to me. Sending data from one xDrip (likely another phone) to Nightscout and using an xDrip instance with NightscoutFollowService as bridge/broadcaster to AAPS it not recommend. Why don't you use one xDrip instance as primary BG collector and broadcaster to AAPS?

Ah, got it. Because you need NightScout to receive the BGs from Medtronic 640 uploader. Would #1649 an option for you?

I will check that, thanks

tolot27 commented 2 years ago

@jrsokolow If you still experiencing the problem that no BG data is sent from xDrip to APS after installing the next nightly which is released in the next few days, please ask in the support channels, before you open a new issue. Thanks!