Unsupported Intents on BlackBerry Android Runtime

大城市里の小女人 提交于 2019-12-11 09:39:43

问题


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))

回答1:


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.




回答2:


in the document: Unsupported APIs for BlackBerry 10 you can find features that are not supported by the BlackBerry Runtime for Android apps on BlackBerry 10.

See: Intents

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)


来源:https://stackoverflow.com/questions/13823295/unsupported-intents-on-blackberry-android-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!