开始申请的Im在安乐器上安装了应用程序。
基本上,这部法典是用来启动由本人提出的另一项申请,其参数是参数。
申请1:
PackageManager pm = getApplicationContext().getPackageManager();
Intent appStartIntent = pm.getLaunchIntentForPackage(mypackage);
appStartIntent.putExtra("message", s);
if (null != appStartIntent) {
getApplicationContext().startActivity(appStartIntent);
}
在我的其他申请中,我如何得出参数:
Appliaction 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();
}
这里的问题是,我们需要知道第二份申请能够得到一个称为“mes”的参数。
Here is the question : Is it possible to know all possible parameters expected by the application 2, from the application 1 ? If yes, is it possible to know for example, the parameters accepted by any installed application on my phone? (example : Handcent, Facebook, latitude...)