pachi81 / GlucoDataHandler

Android application which receives Glucose values from multiple sources and provide Wear OS complications, Android Auto support, phone widgets/notifications and Tasker integration.
https://play.google.com/store/apps/details?id=de.michelinside.glucodatahandler
MIT License
56 stars 11 forks source link

Add floating widget #85

Closed lostboy86 closed 10 months ago

lostboy86 commented 1 year ago

I'm a strong enthusiast user of your work.

Can you implement, like Juggluco, the floating widget with colors in rage, out, ecc, value, etc? I use this widget on my android radio (not android auto), over Agama and user radio interfaces (like google maps, etc)

Thanks for your hard work

pachi81 commented 1 year ago

Hi, as this is part of Juggluco, I´m not sure, if it is really needed. But you are right, the colors and delta you do not have in the Juggluco version. At the moment, there is not much time and I´m on holiday for the next time. So it will take some time...

lostboy86 commented 1 year ago

Thanks for the reply, good holiday!

pachi81 commented 1 year ago

Hi, can you give me some more information, you have a android radio (not android automotive OS?). How Agama and the user radio interface are working? What can you access from the mobile phone? Also notifications? Or only the floating widget? Thank you!

Regards, Michael

lostboy86 commented 1 year ago

Android radio: atoto s8 premium Android 12 Can install juggluco for mirror, and apk Glucodatahandler.

Agama its a Launcher

Il ven 1 set 2023, 10:37 pachi81 @.***> ha scritto:

Hi, can you give me some more information, you have a android radio (not android automotive OS?). How Agama and the user radio interface are working? What can you access from the mobile phone? Also notifications? Or only the floating widget? Thank you!

Regards, Michael

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1702381497, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSAA62KOIEHZTUMISLXYGNEXANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Ok, this means, you install Juggluco and GlucoDataHandler on the radio. Juggluco receives the values from the phone app and send them to GlucoDataHandler. Correct!? What about the notifications in Juggluco and GlucoDataHandler? GlucoDataHandler also have normal widgets, can you access them? Or is the floating widget the only possibility?

lostboy86 commented 1 year ago

Normale widget can't be access on Android radio.

Not only with Agama or other Launcher, but when you drive and you have for example gmaps or other, you can't have a widget overlay, for example

Il ven 1 set 2023, 11:17 pachi81 @.***> ha scritto:

Ok, this means, you install Juggluco and GlucoDataHandler on the radio. Juggluco receives the values from the phone app and send them to GlucoDataHandler. Correct!? What about the notifications in Juggluco and GlucoDataHandler? GlucoDataHandler also have normal widgets, can you access them? Or is the floating widget the only possibility?

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1702436371, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QTNMTBKC34QPHQJESLXYGR4DANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

And notifications are also not possible!? But I have checked an example for the floating widget, and it seems to be similar to the normal widgets. So maybe I can use the most of the code and layout from the normal widgets for that, which make it easier for me.

lostboy86 commented 1 year ago

Notification Is like phone, when you drive you can't scroll down the menu of notification, Its very dangerous

Il ven 1 set 2023, 11:30 pachi81 @.***> ha scritto:

And notifications are also not possible!? But I have checked an example for the floating widget, and it seems to be similar to the normal widgets. So maybe I can use the most of the code and layout from the normal widgets for that, which make it easier for me.

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1702455044, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QXWSV75XRXNOP3JPL3XYGTL3ANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

And popup notifications, like when you are receiving a new message from other apps. But yes, I also think, that the floating widget is the better solution...

lostboy86 commented 1 year ago

Popup notification can't display over Launcher or over some apps

Widget floating must be the best thing, for all android stock car dashboard

Il ven 1 set 2023, 11:40 pachi81 @.***> ha scritto:

And popup notifications, like when you are receiving a new message from other apps. But yes, I also think, that the floating widget is the better solution...

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1702468768, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QWG2ZQI7WL2WN2BXUTXYGURLANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Ok, thank you for the information. As soon, I have time, I will try to implement it.

lostboy86 commented 1 year ago

Thanks you very much for you save-time app!!

Great work , well done

Il ven 1 set 2023, 11:48 pachi81 @.***> ha scritto:

Ok, thank you for the information. As soon, I have time, I will try to implement it.

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1702479574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QV7W3LBVK6JMH4TZ43XYGVN7ANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Here ist the first try... You can activate in settings in the notification section. On the first activation, you have to set the permission and go back. If it does not appear after setting the permission, disable and enable the setting in GlucoDataHandler again. I know, it is a little bit small at the moment, but it should work...

GlucoDataHandler_0.9.4.3.zip

lostboy86 commented 1 year ago

On my Phone work, only i have two fix for suggest :

Great work you are a magic!

Il ven 1 set 2023, 17:29 pachi81 @.***> ha scritto:

Here ist the first try... You can activate in settings in the notification section. On the first activation, you have to set the permission and go back. If it does not appear after setting the permission, disable and enable the setting in GlucoDataHandler again. I know, it is a little bit small at the moment, but it should work...

GlucoDataHandler_0.9.4.3.zip https://github.com/pachi81/GlucoDataHandler/files/12499465/GlucoDataHandler_0.9.4.3.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1702935100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QTNTJVD2HMYBSHPLDTXYH5OTANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Hi,

thank you for the feedback! I increased the size. For me, it is nearly to big, now. I have to find a good way... But the bigger one is maybe better for car...

At the moment, I don´t know, how to implement the on-click event for calling the app or closing the widget, because at the moment I´m using the touch event for moving the widget around...

I have to check, maybe I find the way, how Juggluco have implemented it.

GlucoDataHandler_0.9.4.4.apk.zip

pachi81 commented 1 year ago

Please also try this version for checking cut off the time... Thank you! GlucoDataHandler_0.9.4.5.zip

lostboy86 commented 1 year ago

On phone its cut, see attachments

Il ven 1 set 2023, 22:20 pachi81 @.***> ha scritto:

Please also try this version for checking cut off the time... Thank you! GlucoDataHandler_0.9.4.5.zip https://github.com/pachi81/GlucoDataHandler/files/12501288/GlucoDataHandler_0.9.4.5.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1703278646, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSI23PLL26HSFVPXH3XYI7PLANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

lostboy86 commented 1 year ago

Cant reply with attachments, too big for github

Il ven 1 set 2023, 22:20 pachi81 @.***> ha scritto:

Please also try this version for checking cut off the time... Thank you! GlucoDataHandler_0.9.4.5.zip https://github.com/pachi81/GlucoDataHandler/files/12501288/GlucoDataHandler_0.9.4.5.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1703278646, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSI23PLL26HSFVPXH3XYI7PLANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Also with the 0.9.4.4 version?

lostboy86 commented 1 year ago

Il ven 1 set 2023, 22:20 pachi81 @.***> ha scritto:

Please also try this version for checking cut off the time... Thank you! GlucoDataHandler_0.9.4.5.zip https://github.com/pachi81/GlucoDataHandler/files/12501288/GlucoDataHandler_0.9.4.5.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1703278646, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSI23PLL26HSFVPXH3XYI7PLANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

What kind of phone do you have? Maybe I can reproduce it in an emulator.

lostboy86 commented 1 year ago

Oppo Find X2 pro.do you have an email for Send attachments?

It.s 5Mb , 7.5mb, etc

Il sab 2 set 2023, 14:56 pachi81 @.***> ha scritto:

What kind of phone do you have? Maybe I can reproduce it in an emulator.

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1703825954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QUNDRLHZFXVTMAF56LXYMUJDANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

If the files are so big, so better upload it here: https://1drv.ms/f/s!AvqtWFwQmBjwi2GueEaUdaIS-Ess If it does not work, my mail: pachi81@web.de

pachi81 commented 1 year ago

New version with fixed size, so nothing should be cut... I also add short click to open Juggluco and long click (4s) to close the floating widget (both only works, if you do not move the widget...).

GlucoDataHandler_0.9.4.6.apk.zip

lostboy86 commented 1 year ago

Tested, not fix the cut. Touch and launch juggluco work perfectly.

Press long and hide not work, Hide and After 1 sec restart, sometimes work and hide

Il lun 4 set 2023, 16:33 pachi81 @.***> ha scritto:

New version with fixed size, so nothing should be cut... I also add short click to open Juggluco and long click (4s) to close the floating widget (both only works, if you do not move the widget...).

GlucoDataHandler_0.9.4.6.apk.zip https://github.com/pachi81/GlucoDataHandler/files/12514603/GlucoDataHandler_0.9.4.6.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1705370567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSCSDNMLCLWTBDFAYLXYXRBZANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

lostboy86 commented 1 year ago

.6 its very small and cut on the radio

Il mar 5 set 2023, 01:58 Lost Boy @.***> ha scritto:

Tested, not fix the cut. Touch and launch juggluco work perfectly.

Press long and hide not work, Hide and After 1 sec restart, sometimes work and hide

Il lun 4 set 2023, 16:33 pachi81 @.***> ha scritto:

New version with fixed size, so nothing should be cut... I also add short click to open Juggluco and long click (4s) to close the floating widget (both only works, if you do not move the widget...).

GlucoDataHandler_0.9.4.6.apk.zip https://github.com/pachi81/GlucoDataHandler/files/12514603/GlucoDataHandler_0.9.4.6.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1705370567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSCSDNMLCLWTBDFAYLXYXRBZANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

It is cut in width or height?

To close it, you have to touch at least for 4s and do not move it... Maybe the movement detection is too sensitive, but it is hard to decide either the user want to move or want to close... And I don´t want to add a close button...

lostboy86 commented 1 year ago

Width and height.

I send in the previous message the collage screenshots

Il mar 5 set 2023, 09:45 pachi81 @.***> ha scritto:

It is cut in width or height?

To close it, you have to touch at least for 4s and do not move it... Maybe the movement detection is too sensitive, but it is hard to decide either the user want to move or want to close... And I don´t want to add a close button...

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1706109215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QWBCTEOHU6GFD63Q4LXY3KC7ANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Which Android version your Oppo phone have?

pachi81 commented 1 year ago

So, next try... I changed the layout completely... I added also a resize slider in the settings, so you can increase the widget size. Also improved the long click to close... GlucoDataHandler_0.9.4.7.zip

lostboy86 commented 1 year ago

A 13 on phone, A12 on Android car radio atoto

Il mar 5 set 2023, 19:52 pachi81 @.***> ha scritto:

Which Android version your Oppo phone have?

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1707052033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QQ2YRNR6C2Y22YZHXTXY5RELANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Thank you, unfortunately I could not reproduce the problem in emulator. But the new version .7 should work, now. (I hope...)

lostboy86 commented 1 year ago

I test many and many hours on phone and also in a road trip of 8 hours on android radio.

For me it seems latest version fix all problem, sometimes not stay persistent overlay on the agama launcher or, in the phone, but it's a minor problem.

Il giorno mer 6 set 2023 alle ore 09:36 pachi81 @.***> ha scritto:

Thank, unfortunately I could not reproduce the problem in emulator. But the new version .7 should work, now. (I hope...)

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1707826333, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QRAXCN4C6QHYEAE34DXZARZJANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

sometimes not stay persistent overlay on the agama launcher or, in the phone, but it's a minor problem.

What do you mean? Don't really understand.

But good to know, that it works, now :-)

lostboy86 commented 1 year ago

I mean this :

Sometimes the widget disappear when i launch some apps, and reappear After, or stay on background

Il gio 7 set 2023, 22:54 pachi81 @.***> ha scritto:

sometimes not stay persistent overlay on the agama launcher or, in the phone, but it's a minor problem.

What do you mean? Don't really understand.

But good to know, that it works, now :-)

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1710758386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QWZWQU6RJWTP37ATR3XZIX67ANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

That is really strange! I have not recognized on my phone, yet. Do you have any Logreader App, like this one ? If possible can you activate logging for my app and when it dissappears send the log to me. Maybe I will see anything, which causes this problem.

pachi81 commented 1 year ago

One more question, does it always happen, when you launch the same app or is it more a sporadic issue?

lostboy86 commented 1 year ago

More sporadic issue

Il giorno ven 8 set 2023 alle ore 08:15 pachi81 @.***> ha scritto:

One more question, does it always happen, when you launch the same app or is it more a sporadic issue?

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1711132641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QUSSQGCS3JW7DKHL2LXZKZXNANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

:-( Ok, if it will be reproduceable, it is fixable :-D

Have you activated Play Protect in the Google Play Store? If yes, try to deactivate it, because the Play Protect like to close apps, which are not coming from Play Store...

And it sounds like, that my app is closed and on new value it is re-started (in the background). Otherwise I have to create a foreground service, which will not closed such often...

One more thought: are you using the notification of GlucoDataHandler? If not, can you activate it and check, if it improves the problem?

Thank you very much for your testing and your help!!!

pachi81 commented 1 year ago

And one more thing. I think, I have the same problem. In the version, where the last pos of the widget was not saved, it happens, that it re-appears in the center (sounds like a restart). So maybe I can test and log it on my device. I will have a look.

lostboy86 commented 1 year ago

No play protect Yes notification firm on notification center

Il ven 8 set 2023, 10:03 pachi81 @.***> ha scritto:

And one more thing. I think, I have the same problem. In the version, where the last pos of the widget was not saved, it happens, that it re-appears in the center (sounds like a restart). So maybe I can test and log it on my device. I will have a look.

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1711250165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSJMCWSXFO56SB2V6DXZLGOBANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

lostboy86 commented 1 year ago

If i Remember correctly, same for me

Il ven 8 set 2023, 10:03 pachi81 @.***> ha scritto:

And one more thing. I think, I have the same problem. In the version, where the last pos of the widget was not saved, it happens, that it re-appears in the center (sounds like a restart). So maybe I can test and log it on my device. I will have a look.

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1711250165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QSJMCWSXFO56SB2V6DXZLGOBANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

So, I have checked with the old version, where the widget always starts in the center and check the logcat. The app restarts from time to time (don´t know why, maybe some android optimizations). If I have time, I will make the notification as foreground-notification, so the app should not be killed (I hope).

lostboy86 commented 1 year ago

Thanks! Great news

Il giorno ven 8 set 2023 alle ore 14:23 pachi81 @.***> ha scritto:

So, I have checked with the old version, where the widget always starts in the center and check the logcat. The app restarts from time to time (don´t know why, maybe some android optimizations). If I have time, I will make the notification as foreground-notification, so the app should not be killed (I hope).

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1711586289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QR7UGPISPQTUVBWTT3XZME3ZANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Hi, here is a new version with foreground service (Notification must be activated). In the emulator, the notification gets colored background which looks strange, but on my phone I had not problems. So it is hopefully only a emulator problem...

GlucoDataHandler_0.9.4.8.apk.zip

lostboy86 commented 1 year ago

I have a strange colour notification on the notification center, on dark night mode

Others bug seems fixed, congrats, well done

I test tomorrow on the radio

Il lun 11 set 2023, 13:06 pachi81 @.***> ha scritto:

Hi, here is a new version with foreground service (Notification must be activated). In the emulator, the notification gets colored background which looks strange, but on my phone I had not problems. So it is hopefully only a emulator problem...

GlucoDataHandler_0.9.4.8.apk.zip https://github.com/pachi81/GlucoDataHandler/files/12575245/GlucoDataHandler_0.9.4.8.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1713660655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QR6EZA2TOQSYWILXDDXZ3WBHANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

lostboy86 commented 1 year ago

Il lun 11 set 2023, 13:06 pachi81 @.***> ha scritto:

Hi, here is a new version with foreground service (Notification must be activated). In the emulator, the notification gets colored background which looks strange, but on my phone I had not problems. So it is hopefully only a emulator problem...

GlucoDataHandler_0.9.4.8.apk.zip https://github.com/pachi81/GlucoDataHandler/files/12575245/GlucoDataHandler_0.9.4.8.apk.zip

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1713660655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QR6EZA2TOQSYWILXDDXZ3WBHANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

I have a strange colour notification on the notification center, on dark night mode

Can you make a screenshot?

lostboy86 commented 1 year ago

also send this night in the previous mail

Il giorno mar 12 set 2023 alle ore 07:14 pachi81 @.***> ha scritto:

I have a strange colour notification on the notification center, on dark night mode

Can you make a screenshot?

— Reply to this email directly, view it on GitHub https://github.com/pachi81/GlucoDataHandler/issues/85#issuecomment-1714984710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QX6GPYNS7F65IOH4KLXZ7VTZANCNFSM6AAAAAA3DZNMJ4 . You are receiving this because you authored the thread.Message ID: @.***>

pachi81 commented 1 year ago

Please send direct to my mail (pachi81@web.de). It seems to be removed from GitHub, because there is no attachement.