简体   繁体   English

通过Intent从Web打开Android应用无法正常工作

[英]Opening Android app from Web via Intent not working

I'm having trouble starting my app from a URL using intent-filters. 我在使用意图过滤器从URL启动应用程序时遇到问题。 I have checked Android app not opening from URL using intent-filter and Open Android app from URL using intent-filter not working and even some more without making it work. 我已经检查了Android应用程序无法从使用intent-filter的URL打开,以及从URL使用意图过滤器 打开的Android app无法正常工作 ,甚至还有一些无法正常工作。

Do I have to do something special in the activity? 我必须在活动中做些特别的事情吗?

This is the activity I'm trying to start when browsing everything under http://www.speedle.se 这是我尝试浏览http://www.speedle.se下的所有内容时要开始的活动

 <activity
        android:name=".activity.LoginActivity"
        android:label="@string/title_activity_login"
        android:screenOrientation="portrait">

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="www.speedle.se"
                android:pathPattern=".*"
                android:scheme="http" />
        </intent-filter>


        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>



    </activity>

Regards and thanks Mattias 问候和感谢马蒂亚斯

Please refer to following answer and see if it solves your query 请参考以下答案,看看是否能解决您的查询

https://stackoverflow.com/a/2958870/2802705 https://stackoverflow.com/a/2958870/2802705

Let me know if you need further help. 让我知道您是否需要进一步的帮助。

Now it's working from the twitter app card, and from Facebook, thanks for all the help. 现在,它可以在twitter应用程序卡和Facebook上运行,感谢所有帮助。 My issue with Twitter was that Prerender.io had cached my page, and thus Twitter didn't get the new meta data. 我在Twitter上遇到的问题是Prerender.io已缓存了我的页面,因此Twitter没有获得新的元数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM