Is Possible To Show Dialog Box In Service [android App]?
I'm a new to android, so I'm trying to develop an application that shows a notification to the user after specific time, I don't know: Is it possible to use a dialog box inside Se
Solution 1:
Its always better to use Broadcast receiver and Service both. Register intents in broadcast receiver and from broadcast receiver redirect request to Service.
Its possible to show dialog box from service. only thing you need is an Activity.
In short your application will have one Activity , One Service and one Broadcast receiver. Your broadcast receiver will catch the intent which will redirect to a Service and then your service will invoke activity which shows dialog box.
BroadCast Receiver -- > Service --> Activity
Solution 2:
BroadCast Receiver -- > Service --> Activity this sequence is good. For displaying alert dialog without pressing any button call method, showDialog() in Activity's onCreate() method.
Post a Comment for "Is Possible To Show Dialog Box In Service [android App]?"