I want to send calling contact number and contact id through Intent and retrive using BroadCast reciver.Is it possible, if possible then how?
Asked
Active
Viewed 43 times
-1
-
check: http://stackoverflow.com/questions/14017720/how-to-pass-value-using-intent-between-activity-in-android – lidox Sep 26 '16 at 17:06
2 Answers
1
After search and R&D I realise we can't do this thing. I solve this problem using Globle class which contain contactNumber and contactId. So initialize this static field and use when broadcast reciver hit.

Prashant Gadekar
- 417
- 1
- 6
- 10
0
You have to set extra values to your intent from the activity/fragment like :
myIntent.putExtra( "theKey" , theValue);
And retrieve them into the called activity into the onCreate
like:
Intent i = getActivity().getIntent();
Bundle b = i.getExtras();
Boolean myValue = b.getBoolean("theKey",false );

Nicolas Cortell
- 659
- 4
- 16