-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: NotificationSource to receive data from G7 and Omnipod 5 #180
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you!!!!!!
It seems, you have understood my code :-D
I already planned this feature for the future, so this will save me some time.
One remark, I won´t publish this feature until I have implemented the graph including historical data, as this will also include some basic trend calculation, which is not really possible without historical data.
I already have this problem with Diabox source and the first users complain about, even if I have mentioned in docu, that there is no trend support, yet...
One more question, what about a packagename filter? For only handling notification from this package!?
I have also thought about making a small app, only doing this stuff and show all parts of the notification in main view. So users from other apps, like CampAPS can send me screenshots of the content extracted from the notification. What do you think?
common/src/main/java/de/michelinside/glucodatahandler/common/receiver/NamedBroadcastReceiver.kt
Show resolved
Hide resolved
common/src/main/java/de/michelinside/glucodatahandler/common/receiver/NotificationReceiver.kt
Outdated
Show resolved
Hide resolved
common/src/main/java/de/michelinside/glucodatahandler/common/receiver/NotificationReceiver.kt
Outdated
Show resolved
Hide resolved
common/src/main/java/de/michelinside/glucodatahandler/common/receiver/NotificationReceiver.kt
Outdated
Show resolved
Hide resolved
I added you as contributor, so it may be easier to create PRs. |
I'm not sure I understand. Can you expand on this please?
This doesn't seem possible? at least I can't find any documentation on doing this in any other way than an if check in the NotificationListenerService Thank you so much for the code review btw! I'm going to add support for Omnipod 5 IOB input later today then I'll mark it ready for review! |
1bfb011
to
39ca230
Compare
Sorry for the late response as I there was an emergency the whole weekend, after Abbott has changed there API. But it is working again, now....
I mean, may to create a demo app with a button, which extracts the content of a notification in table format: name -> value |
override fun onNotificationPosted(statusBarNotification: StatusBarNotification?) { | ||
if (isRegistered()) { | ||
statusBarNotification?.let { sbn -> | ||
if (sbn.packageName == "com.dexcom.g7") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is not only related to G7, I think it makes more sense to create a settings, selecting the package for parsing notification and compare name here.
But this is something, I can do, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learning android dev is fun! I can try to figure this out in a few hours!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you like!
I also started learning with this app, so maybe there are a lot of things to improve or which can be done in a better way...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for your information, to select a package checkout the code for "Tap Action" for widgets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey I've tried to get this working a few times on a few different days and I couldn't figure it out. If you still want this feature I unfortunately wont be able to finish it. my work is on https://github.com/rgodha24/GlucoDataHandler/tree/notification-receiver-chooser if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I can do it.
adds a source that grabs data from dexcom g7 and omnipod 5 notifications