I have an application that starts Activity
with extras. I would like to see what extras are inside Intent. Both applications (calling and called) are not written by me.
Asked
Active
Viewed 126 times
1

pixel
- 24,905
- 36
- 149
- 251
-
2Temporarily replace the target with an imposter that dumps this info to the log. – Chris Stratton May 26 '15 at 14:35
-
@ChrisStratton and what if component is explicitly set in intent? – pixel May 26 '15 at 14:48
-
1That was assumed to be the case and is why you install your logger as an imposter - ie, something having the same class and package name as the intended target, which of course you will have to remove first. – Chris Stratton May 26 '15 at 14:54
-
@ChrisStratton which can be tough if its system application or Play Services app :) – pixel May 26 '15 at 14:55
-
Beyond Mr. Stratton's suggestions, or seeing if there is a custom ROM that you can use that can record this stuff, I am not aware of any other option. – CommonsWare May 26 '15 at 15:05
1 Answers
-1
Send the data first:
Intent i = new Intent(YourActivity.class);
i.putExtra("parameter", yourData)
startActivity(i);
To get the data :
Intent i = getIntent();
String data = i.getStringExtra("parameter"); //you can do for integer, etc

Stevian Setiawan
- 11
- 3
-
This bears no relevance to the clear circumstances of the question actually asked. Voting to delete. – Chris Stratton May 26 '15 at 21:59