Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/190.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 隐式意图无法显示应用程序菜单_Android_Android Intent - Fatal编程技术网

Android 隐式意图无法显示应用程序菜单

Android 隐式意图无法显示应用程序菜单,android,android-intent,Android,Android Intent,我有一个应该调用隐式意图的应用程序,我有一个我想要接收意图的目标。它总是打开默认应用程序。我不确定错误在哪里。 代码如下: private void startImplicitActivation() { Intent baseIntent = new Intent (Intent.ACTION_VIEW, Uri.parse(URL)); Intent chooserIntent = Intent.createChooser(baseIntent, CHOOSER_TEXT)

我有一个应该调用隐式意图的应用程序,我有一个我想要接收意图的目标。它总是打开默认应用程序。我不确定错误在哪里。 代码如下:

private void startImplicitActivation() {
    Intent baseIntent = new Intent (Intent.ACTION_VIEW, Uri.parse(URL));
    Intent chooserIntent = Intent.createChooser(baseIntent, CHOOSER_TEXT) ;
    startActivity(chooserIntent);
 }

你的回答不正确。替换

<data android:mimeType="http"/>


http不是有效的mime类型,可能也不是您想要的类型。

以下是日志信息在phone/emulator中关闭应用程序,然后再次运行。在phone中运行应用程序,而不是在emulator中运行,因为不会安装很多应用程序来处理此目的。
[2015-01-29 18:23:14 - IntentsLab] Android Launch!
[2015-01-29 18:23:14 - IntentsLab] adb is running normally.
[2015-01-29 18:23:14 - IntentsLab] Performing course.labs.intentslab.ActivityLoaderActivity activity launch
[2015-01-29 18:23:15 - IntentsLab] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'smallapp'
[2015-01-29 18:23:17 - IntentsLab] Application already deployed. No need to reinstall.
[2015-01-29 18:23:17 - IntentsLab] Starting activity course.labs.intentslab.ActivityLoaderActivity on device emulator-5554
[2015-01-29 18:23:21 - IntentsLab] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=course.labs.intentslab/.ActivityLoaderActivity }
[2015-01-29 18:23:21 - IntentsLab] ActivityManager: Warning: Activity not started, its current task has been brought to the front
<data android:mimeType="http"/>
<data android:scheme="http"/>