How to find out the possible parameters readable from another Android app
I am running an app that launches other installed apps on an Android smartphone.
Basically, here is the code I'm using to launch another app made by me with a parameter.
Appendix 1:
PackageManager pm = getApplicationContext().getPackageManager();
Intent appStartIntent = pm.getLaunchIntentForPackage(mypackage);
appStartIntent.putExtra("message", s);
if (null != appStartIntent) {
getApplicationContext().startActivity(appStartIntent);
}
In my other application, this is how I get the parameter:
Application 2:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Bundle extras = getIntent().getExtras();
String result;
try {
result= (String) extras.getString("message");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
recup = "nothing received";
}
Toast.makeText(getApplicationContext(), recup, Toast.LENGTH_SHORT).show();
}
The problem here is that we need to know that the second application can receive a parameter called "message".
Here is the question: Is it possible to find out all the possible parameters expected by application 2 from application 1? If so, is it possible, for example, to find out the settings accepted by any installed application on my phone? (example: Handcent, Facebook, latitude ...)
+3
source to share
3 answers