2013-03-17 31 views
1

我可以通过手机中的网络浏览器发送意向广播吗?可以通过Android中感兴趣的广播接收器(本机应用程序)接收该意向广播?我可以从感兴趣的广播接收器(本地应用程序)可以接收的电话中的网络浏览器发送意向广播吗?

+0

你是在说一个网站或者使用Web技术,如phonegab的应用程序? – 2013-03-17 08:44:29

+0

从手机浏览器到该手机中的Android应用程序 – Sibish 2013-03-21 02:37:58

回答

2

在HTML中使用此:

<a href="intent://my_host#Intent;scheme=my_scheme;action=my_action;end">Link to my stuff</a> 

然后把这些在清单:

<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> 
+0

我们可以发送像html一样的广播吗? – Sibish 2013-03-21 05:59:52

+0

Intent intent = new Intent(); intent.setAction(“de.vogella.android.mybroadcast”); sendBroadcast(intent); – Sibish 2013-03-21 06:02:22

+0

Sibish:您在网站按钮点击或应用程序按钮点击时写入的HTML代码? – 2015-04-29 11:36:47