我想从启动程序隐藏我的Android应用程序,但能够从另一个应用程序中调用它。我迷失在从Android清单中删除的内容。如何从启动程序隐藏Android应用程序
已经尝试删除...
<intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
...但随后从其他应用程序调用时它不会打开。
下面是如何我调用这个隐藏
Intent i;
PackageManager manager = getPackageManager();
try {
i = manager.getLaunchIntentForPackage("org.xbmc.xbmc");
if (i == null)
throw new PackageManager.NameNotFoundException();
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
} catch (PackageManager.NameNotFoundException e) {
这里是清单
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_TASKS" />
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:hasCode="true" android:debuggable="true">
<activity android:theme="@*android:style/Theme.NoTitleBar.Fullscreen" android:name=".Splash" android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:screenOrientation="sensorLandscape" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
没有工作,应用程序不能从其他应用程序打开 – cre8ful
你能发布你的整个'AndroidManifest.xml'文件吗?另外,你如何从你的其他应用程序打开这个应用程序? – Willis
加我原来的帖子^^^ – cre8ful