黑莓Android的运行不支持的意图 [英] Unsupported Intents on BlackBerry Android Runtime

查看:234
本文介绍了黑莓Android的运行不支持的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个应用程序转换到Android运行,但我的一些意图的行为不工作,没有错误/异常显示在LogCat中。我可以看到我的onSaveInstanceState code中运行,如果该活动已被暂停,但没有出现。
当使用IntentChooser,我可以在日志中看到:调用的onCreate()为活动com.android.internal.app.ChooserActivity,然而在剧本,没有任何反应。在BB10模拟器,选择器来了(即用和短信期权),但单击它们时,没有任何反应。
难道这些应该是工作?什么可能是错误的?该文档没有提到任何这些限制: http://developer.blackberry.com/android/apisupport /

 工作:
新意图(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI) - (联系人选择器)
新意图(MediaStore.ACTION_IM​​AGE_CAPTURE) - (摄象图片)不工作:
新意图(android.content.Intent.ACTION_SEND) - (发送电子邮件)
新意图(Intent.ACTION_GET_CONTENT) - (从设备选择介质)
新意图(Intent.ACTION_VIEW) - (文件/文件preVIEW)
新意图(Intent.ACTION_CALL) - (主叫电话号码 - 有适当的权限)
无论使用哪种收益率低于相同的结果,称他们。
context.startActivity(意向)
context.startActivity(Intent.createChooser(意向))


解决方案

其实这已经提到了一些正在使用不允许的意图的。

  Android应用程序无法在设备的其他部分提供了系统级的服务。例如:
拨号服务(处理android.intent.action.ACTION_DIAL)
查看功能(android.intent.action.ACTION_VIEW全系统移交)
数据共享功能(android.intent.action.ACTION_SEND)

希望你有参考此文档页面。在那里,他们都提到关于 ACTION_VIEW ACTION_SEND ,你在你的问题提到。

但他们都没有提到如何克服这个问题。

I'm converting one app to the Android Runtime, however some of my Intent actions aren't working, no error/exception is shown on LogCat. I can see my onSaveInstanceState code being run as if the Activity was being paused, but nothing comes up. When a IntentChooser is used, I can see in the logs: "invoking onCreate() for Activity com.android.internal.app.ChooserActivity" , however on the PlayBook, nothing happens. On the BB10 simulator, the chooser comes up (i.e with Messages and SMS options) but nothing happens when clicking them. Are these supposed to be working? What may be wrong ? The docs don't mention any of these limitations : http://developer.blackberry.com/android/apisupport/

working:
new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI) - (contact picker)
new Intent(MediaStore.ACTION_IMAGE_CAPTURE) - (camera pick image)

not working:
new Intent(android.content.Intent.ACTION_SEND) - (send e-mail)
new Intent(Intent.ACTION_GET_CONTENT) - (pick media from device)
new Intent(Intent.ACTION_VIEW) - (file/document preview)
new Intent(Intent.ACTION_CALL) - (calling phone number - have proper permissions)


Calling them with either below yields same results.
context.startActivity(intent)
context.startActivity(Intent.createChooser(intent))

解决方案

Actually it has mentioned some of the Intents that you are using is not allowed.

Android applications cannot provide system-wide services to the rest of the device. E.g:
Dialing services (handling android.intent.action.ACTION_DIAL)
Viewing capabilities (system-wide handing of android.intent.action.ACTION_VIEW)
Data sharing capabilities (android.intent.action.ACTION_SEND)

Hope you have refer this documentation page. There they have mentioned about ACTION_VIEW and ACTION_SEND that you have mentioned in your question.

But they haven't mentioned how to overcome that issue.

这篇关于黑莓Android的运行不支持的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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