小编Paz*_*Paz的帖子

从网页打开Android应用程序

我知道要从网页内的链接打开android应用程序,我们必须在AndroidManifest.xml中编写以下内容:

        <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:scheme="my_scheme" android:host="my_host" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

问题是我用以下方式编写它:

        <intent-filter>
            <action android:name="my_action"/>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="my_scheme" android:host="my_host" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

我没有添加"android.intent.action.VIEW",而是添加了我自己的动作.我无法更改它,因为该版本已经发布.

问题是,如果有办法让应用程序从JavaScript或简单的html页面运行,可能是通过定义页面中的特定操作?

谢谢,

拉巴斯.


解决了:

感谢大卫我找到了一个解决方案:

<a href="intent://my_host#Intent;scheme=my_scheme;action=my_action;end">Link to my stuff</a> 
Run Code Online (Sandbox Code Playgroud)

html javascript android action android-intent

18
推荐指数
2
解决办法
5万
查看次数

Android APN执行

有人知道是否有一种编程方式在设备上使用特定的定义APN而不是默认的APN?

谢谢.

android enforcement apn

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×2

action ×1

android-intent ×1

apn ×1

enforcement ×1

html ×1

javascript ×1