I want to display a toast message on Android when a sms received. I have used a toast in onReceive. The toast message displayed in one emulator but not working on the other emulator.
This is probably all in Java mechanics that I don't know, but here's my problem:
I have an SMS receiver that spits out two variables, the sender and the message body. I'm trying to access them from a separate service. I have a toast message in my SMS receiver (as shown in the code) and it shows the message fine, but when I try to toast that same thing from the service, the message is nothing.
I want to display multiple toast during incoming call state but when i get offhook state it displays the toast but on idle state the toast is not displayed I have use thread and Async task but problem is the same it shows no error so i have nothing in my logcat .
Currently I am using the below method to show toast.
My app sends a text to a specific number and BroadcastReceiver receives reply from that number. I want to display the replay message with AlertDialog. But the alert don't show it's body. It just shows it's title and the positive button. The reply message appears with a Toast, but I never used any toast in my code.
By registering for BroadcastReceiver i can get SCREEN ON and SCREEN OFF toast messages , when device screen is swithced ON/OFF. In the same way, can i get CAMERA ON and CAMERA OFF toast messages, when device camera button is clicked?