Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rgodha24
Copy link
Collaborator

@rgodha24 rgodha24 commented Nov 15, 2024

adds a source that grabs data from dexcom g7 and omnipod 5 notifications

Copy link
Owner

@pachi81 pachi81 left a 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?

@pachi81
Copy link
Owner

pachi81 commented Nov 15, 2024

I added you as contributor, so it may be easier to create PRs.

@rgodha24
Copy link
Collaborator Author

rgodha24 commented Nov 15, 2024

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?

I'm not sure I understand. Can you expand on this please?

One more question, what about a packagename filter? For only handling notification from this package!?

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!

@rgodha24 rgodha24 force-pushed the notification-receiver branch from 1bfb011 to 39ca230 Compare November 16, 2024 19:49
@rgodha24 rgodha24 marked this pull request as ready for review November 16, 2024 20:54
@rgodha24 rgodha24 changed the title Notification receiver to read notifications from Dexcom g7 app & Omnipod 5 app feat: NotificationSource to receive data from G7 and Omnipod 5 Nov 16, 2024
@rgodha24 rgodha24 requested a review from pachi81 November 17, 2024 21:04
@pachi81
Copy link
Owner

pachi81 commented Nov 18, 2024

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?

I'm not sure I understand. Can you expand on this please?

One more question, what about a packagename filter? For only handling notification from this package!?

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!

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'm not sure I understand. Can you expand on this please?

I mean, may to create a demo app with a button, which extracts the content of a notification in table format: name -> value
So I can give this app to an user to test its notification. Just an idea to handle new notifications of other apps.

override fun onNotificationPosted(statusBarNotification: StatusBarNotification?) {
if (isRegistered()) {
statusBarNotification?.let { sbn ->
if (sbn.packageName == "com.dexcom.g7") {
Copy link
Owner

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.

Copy link
Collaborator Author

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!

Copy link
Owner

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...

Copy link
Owner

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.

Copy link
Collaborator Author

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

Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants