android – 标准意图URI坏了吗?

android – 标准意图URI坏了吗?,第1张

概述我在特定设备上遇到意图URI问题,所以我尝试了这里建议的CommonsWare URLHandler示例: Launching my app using the intent URI,其示例页面上的意图URI超链接也无法调用该应用程序.该示例声明了其intent-filter,如下所示: <intent-filter> <action android:name="com.commonswa 我在特定设备上遇到意图URI问题,所以我尝试了这里建议的CommonsWare URLHandler示例: Launching my app using the intent URI,其示例页面上的意图URI超链接也无法调用该应用程序.该示例声明了其intent-filter,如下所示:
<intent-filter>    <action androID:name="com.commonsware.androID.MY_ACTION" />    <category androID:name="androID.intent.category.DEFAulT" />    <category androID:name="androID.intent.category.broWSABLE" /></intent-filter>

示例网页中的超链接是:

<a href="intent:#Intent;action=com.commonsware.androID.MY_ACTION;end">link back to URLHandler via intent: URL</a>

这适用于大多数设备,但不适用于运行AndroID 4.0.3的HTC Amaze 4G.当我触摸链接时,logcat给出:

I/PRIME(9029): <CallBackProxy> Send to WebVIEwClIEnt.I/PRIME(9029): <browser> Send to HtclinkifydispatcherI/ActivityManager(262): START intent from pID 9029D/MP-Decision(891): Aggress decision engine: OffD/MP-Decision(891): Switch back to normal parameters:     Nw=2.700000,Tw=180,Ns=2.100000,Ts=270,Decision_ms=100,Poll_ms=10V/NfcService(600): setForegroundNdefPush msg = null callback = nullD/HtcTelephony(561): requestSetFastDormancy: module=0 mode=0D/WebVIEwTimersControl(9029): onbrowserActivityPauseD/WebVIEwTimersControl(9029): Pausing webvIEw timers,vIEw=com.androID.browser.browserWebVIEw@40e562f8I/ActivityManager(262): Start proc com.htc.Htclinkifydispatcher for    activity com.htc.Htclinkifydispatcher/.HtclinkifydispatcherActivity:    pID=11087 uID=1000 gIDs={1015,3002,3001,3003,5001,5003,3007,3006,2001,1007}D/ConnectivityService(262): onUIDRulesChanged(uID=1000,uIDRules=0)V/browser(9029): browserActivity.onWindowFocusChangedD/HtclinkifydispatcherActivity(11087):  @@@@@ receive action=com.commonsware.androID.MY_ACTIONI/HtcAppAssociationsUtils (dispatcher)(11087):  @@@@@ enable by 2 = trueI/HtcAppAssociationsUtils (dispatcher)(11087):  @@@@@ method = 0I/HtcAppAssociationsUtils (dispatcher)(11087):  @@@@@ check enable = trueD/MP-Decision(891): Aggress decision engine: OnD/ActivityManager(262): Config after re-evaluted by window manager: nullD/MP-Decision(891): Switch to aggressive parameters:     Nw=1.990000,Tw=140,Ns=1.400000,Ts=190,Decision_ms=50,Poll_ms=10V/browser(9029): browserActivity.onWindowFocusChangedD/HtcTelephony(561): requestSetFastDormancy: module=0 mode=1W/inputManagerService(262): Window already focused,ignoring focus gain of:     com.androID.internal.vIEw.IinputMethodClIEnt$Stub$Proxy@40e75100D/WebVIEwTimersControl(9029): onbrowserActivityResumeD/WebVIEwTimersControl(9029): Resuming webvIEw timers,vIEw=com.androID.browser.browserWebVIEw@40e562f8W/BaseUi(9029): mMainVIEw is already attached to wrapper in attachTabToContentVIEw!W/BaseUi(9029): mContainer is already attached to content in attachTabToContentVIEw!V/NfcService(600): setForegroundNdefPush msg = null     callback = androID.nfc.INdefPushCallback$Stub$Proxy@40e73470D/memalloc(9029): /dev/pmem: UnmapPing buffer base:0x569c5000 size:4386816 offset:4177920D/browser(9029): [browserActivity::Connectivity_Type] ===== 1I/ActivityManager(262): No longer want     com.htc.provIDers.settings:remote (pID 10935): hIDden #16,adj=15D/Process(262): killProcessQuIEt,pID=10935D/Process(262): dalvik.system.VMStack.getThreadStackTrace(Native Method)D/ConnectivityService(262): onUIDRulesChanged(uID=1000,uIDRules=0)D/Process(262): java.lang.Thread.getStackTrace(Thread.java:599)D/Process(262): androID.os.Process.killProcessQuIEt(Process.java:823)D/Process(262): com.androID.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:15132)D/Process(262): com.androID.server.am.ActivityManagerService.trimApplications(ActivityManagerService.java:15294)D/Process(262): com.androID.server.am.ActivityStack.activityIDleInternal(ActivityStack.java:3450)D/Process(262): com.androID.server.am.ActivityManagerService.activityIDle(ActivityManagerService.java:4303)D/Process(262): androID.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:362)D/Process(262): com.androID.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1706)D/Process(262): androID.os.Binder.execTransact(Binder.java:338)D/Process(262): dalvik.system.NativeStart.run(Native Method)

有人知道这里的意图URI是怎么回事吗?为什么不能工作?有解决方法吗?

谢谢,
西蒙

解决方法 由于我可以在HTC One S上复制此问题,并且我无法在其他ICS / JB设备上复制此问题,因此我认为这是linkify解决方法 HTC put in place in response to Apple-led litigation的另一个结果.

And is there a workaround?

如果您控制双方(例如,包含链接的WebVIEw以及响应意图URL的应用程序),您可以通过Intent.createChooser()手动强制选择器,这可能会起作用.

但是,如果您依赖第三方代码(例如,Web浏览器)来打开您的应用程序,那么在这些HTC设备上,我相信您只是被搞砸了.

总结

以上是内存溢出为你收集整理的android – 标准意图URI坏了吗?全部内容,希望文章能够帮你解决android – 标准意图URI坏了吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1149380.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存