I need to pass some values into onReceive() method in BroadcastReceiver. I’m implementing an Alarm and when alarm trigger out i need to show some text based on some of the text values i gained before? Any suggestions on how to do this?
I need to pass some values into onReceive() method in BroadcastReceiver . I’m implementing
Share
you are getting
intentinpublic void onReceive(final Context context, Intent intent).through intent you can get the value which you set.
This will put the value
intentObject.putExtra("key", "text");To get
intent.getExtras.getString("key");