BroadcastReceiver should _NEVER_ create a window. They should display notifications.mingboq wrote:I have an application that needs to be triggered if certain SMS arrives.
I this case, maybe just popup a notification. Can someone help me with this? Thanks.
(source: BroadcastReceiver docs)In particular, you may not show a dialog or bind to a service from within an BroadcastReceiver. For the former, you should instead use the NotificationManager API. For the latter, you can use Context.startService() to send a command to the service.
(source: Design philosophy (seamless))Even if your application is fast and responsive, it can still annoy users. A common example is a background process (such as an Android Service or BroadcastReceiver) that pops up a UI in response to some event.
Users browsing this forum: Yahoo [Bot] and 3 guests