android程序调用另一个android应用程序
请求:
例子:
new ComponentName(
"com.gwsoft.player.activity",
"com.gwsoft.player.activity.PlayerActivity");
new Intent();
new Bundle();
"resUrl", resurl);
bundle.putSerializable("picUrlList", picurllist);
intent.setComponent(componentName);
注:
com.gwsoft.player.activity:包路径
PlayerActivity:Activity类
resUrl :String类型
picUrlList:数组,也可以是对象
应用程序安装后,按以上方式可进行调用.
接受activity:
public void getParameterByIntent() {
Intent mIntent = this.getIntent();
String[] picUrlList = (String[]) mIntent.
getSerializableExtra("picUrlList");
if (null != picUrlList) {
int count = picUrlList.length;
for (int i = 0; i < count; i++) {
Log.e("tag", "picUrlList[" + i + "]" + picUrlList[i]);
}
}
}
标签:调用,String,程序,picUrlList,player,activity,new,android
From: https://blog.51cto.com/u_3124497/6913769