-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Status widget #431
Status widget #431
Conversation
I think some of the comments are not addressed. Can we remove the theme and minimize the number of files/code that we need to add such a simple widget? |
Yes, I kept the theme support - users with Android 12+ may benefit from it. Does it make a problem? |
Can you please explain why we need the theme. |
I've removed support for style and theme, since they aren't needed for the status widget. |
Wow! A year has passed! :) |
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.
Sorry, looks like I forgot about it back then. Added some comments.
New changes are ready for another review round :) |
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.
Looks much better. Added some very minor comments.
I've performed more testing of the recent build on several versions of Android (virtualized), and noticed that the widget isn't updated any longer when the service is started/stopped (via the shortcut or from within the app).
It doesn't happen for:
The only significant change between the builds is the way how intent's handlers are registered for the widget: explicitly (old build) or in the app's manifest (new build). |
Not sure. Maybe there are some limitations or maybe some attributes are missing. |
I've found the reason why the widget doesn't receive custom notifications - since Android 8 (API level 26) the system imposes additional restrictions on manifest-declared receivers (reference):
Possible workarounds:
Which way is preferred? |
Does the last option allow us to keep XML registration? Then I like that one. |
Yes, the option 3 goes on top of the current implementation with manifest-registered receiver with custom intents filter. |
…date; minor refactoring of update; clean-up) traccar#429
Ooops! There is an easy-to-resolve conflict in |
Both merge and rebase are fine. |
I've merged
I haven't tried to build |
If they're the same on master, it should be fine. |
…et with minor changes for traccar#429 # Resolved conflicts: # app/src/main/java/org/traccar/client/TrackingService.kt
I've merged |
Merged, thanks for fixing all the feedback. I know it was a lot. |
Simple implementation of the status widget (#429).
The base code was generated with Android Studio 2020.3.1.
Testing: