Question

I want to execute the Python scripts(that displays a toast and notification) in Android using sl4a. Can I show a toast message and a notification simultaneously? I m using an emulator for testing.

Was it helpful?

Solution

Yes, it is possible to use a toast and a notification at the same time.

Although it may be not the best user experience in my opinion.

Toast is a way to let the user know of something while he'she is looking at the screen and is low priority. It goes away in a while.

Notification is a way to let the user know about something which is higher priority than a toast. It may be at a time where user's primary focus is not your app, or the device is sleeping as well. User can go to the notification drawer and see what's new with your app with this.

In most use cases, one of them does the job. I'm not sure why you need both.. at the same time. Doesn't a single notification cut it ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top