使用意向过滤器打开Android应用程序无法正常工作 [英] Open Android app using intent-filter not working

查看:152
本文介绍了使用意向过滤器打开Android应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试使用下面的code在Android清单文件,但它不是打开该应用程序。

I have using the following code in the android manifest file,but its not open the application.

   <activity
        android:name="ActivityIntroScreen"
        android:label="@string/app_name" 
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
                <intent-filter>
            <data android:scheme="market" android:host="details" android:path="" />
            <data android:scheme="http" android:host="play.google.com" android:pathPattern="/store/apps/details?id=.*" />
            <data android:scheme="https" android:host="play.google.com" android:pathPattern="/store/apps/details?id=.*" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>

在哪里错误... ??

Where is the mistake...??

推荐答案

,你将不得不以单意向的过滤器对每个方案。在这里看看: https://github.com/ligi/ PassAndroid / BLOB /主/ src目录/主/ AndroidManifest.xml中

you will have to to single intent-filters for each scheme. have a look here: https://github.com/ligi/PassAndroid/blob/master/src/main/AndroidManifest.xml

这篇关于使用意向过滤器打开Android应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆