Android show dialog like with GoSMS -
In the Gosms app, we want to see the newly received SMS messages in the phone desktop and I have this capability in this application. I'm trying to use simple and alerts_log in onStop () look like this: secure void onStop () {builder.setMessage ( "Test message") Kset Knabl qualified (true) KsetPositiveButton ( "OK", the new DialogInterface.OnClickListener () {public void Click (DialogInterface dialog, int id) {dialog.cancel () ;}}); AlertDialog Warning = Builder.Create (); Alert.show (); Super.onStop (); Logs. ("Onstop", ""); } But it could not work correctly. After that I am trying to show this dialogue through service. All the methods do not work for me correctly Please help me to do this Screenshots: You need to find out whether your app is background or foreground Is in or not Approach: Add broadcast receiver to listen to the incoming message Check if your app is in the foreground or not If it is in the ba...