Domanda

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))
È stato utile?

Soluzione

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.

Altri suggerimenti

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)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top