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

Small tracking notification improvements #3411

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

Conversation

wonder-sk
Copy link
Contributor

For discussion:

  • use single-color icon like all standard apps (android draws it black or white depending on color)
  • use our text in the notification instead of generic text (something like "Mergin Maps is running")
    • later we could do regular updates of the text with the time of tracking
    • I have intentionally used just a single line to make the notification take less space (like Strava does)
  • low instead of high importance of notification - does not make sound and no toast
  • behavior FOREGROUND_SERVICE_IMMEDIATE so that notification icon appears immediately in status bar
  • when tapped on the notification, open the app rather than app settings

Icon in the system bar:

Screenshot_20240506_164845_One UI Home

Notification when the system menu is open:

Screenshot_20240506_164816_One UI Home

Notification when it gets expanded:

Screenshot_20240506_164834_One UI Home

When the app is open - the notification icon is still there:

Screenshot_20240506_165020

@saberraz
Copy link
Contributor

saberraz commented May 6, 2024

I would like to see Stop shortcut beside it. So, users can stop tracking without going to app, find the action button and stop it there.

@wonder-sk
Copy link
Contributor Author

Minor revision - I wanted to use our "grass" green color for the icon's background... in the end Android uses different tint of green (probably it has some sort of limited palette in its style) but I think it's better than the blue background it was giving me (this is Samsung S21 - it may looks differently on stock Android)

tempFileForShare_20240506-220504

@wonder-sk
Copy link
Contributor Author

I would like to see Stop shortcut beside it. So, users can stop tracking without going to app, find the action button and stop it there.

Yeah me too... let's go one step at a time 😉

.setSmallIcon( R.drawable.ic_notification )
.setContentTitle( "Tracking in progress" )
.setColor( getResources().getColor( R.color.grassColor ) )
.setForegroundServiceBehavior( Notification.FOREGROUND_SERVICE_IMMEDIATE )
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like setForegroundServiceBehavior() is Android >= 12 only, will need to make that optional

@PeterPetrik
Copy link
Contributor

For logo - if it is stricly single color use this variant https://drive.google.com/file/d/170oszgU06SG8XD0bEKuH-W2WZMYWvUIC/view?usp=share_link

@tomasMizera
Copy link
Collaborator

For logo - if it is stricly single color use this variant https://drive.google.com/file/d/170oszgU06SG8XD0bEKuH-W2WZMYWvUIC/view?usp=share_link

Good point! Let me know @wonder-sk if you need to export 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.

None yet

4 participants