首先如果你需要隐藏你要从另一个应用启动的app的桌面图标,需要将一下代码注掉
要想在桌面不显示图标,只需注释掉APP入口Activity中的下面这句即可,或者把下面的LAUNCHER改成DEFAULT也行
<!--<category android:name="android.intent.category.LAUNCHER" />-->
跳转的目标app还需要配置以下代码 :其中scheme是自己定义好的
<intent-filter>
<data android:scheme="3123123"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
应用跳转实现方法
需要启动此程序的方法,是在点击事件中进行判断例如:
点击事件
onclick(View view){
startActivity(new Intent(Intent.ACTION_VIEW, Url.parse("3123123\\?后面可以加参数"))); // 其中3123123与上面的scheme想对应
};
如果需要根据参数判断 如下
解析参数:
Intent i_getvalue = getIntent();
String action = i_getvalue.getAction();
if(Intent.ACTION_VIEW.equals(action)){
Uri uri = i_getvalue.getData();
if(uri != null){
String source = uri.getQueryParameter("source");
Toast.makeText(this,"三方启动,来源:"+source, Toast.LENGTH_LONG).show();
}
}