我正在将一个应用程序转换为 Android 运行时,但是我的一些 Intent 操作不起作用,LogCat 上没有显示错误/异常。我可以看到我的 onSaveInstanceState 代码正在运行,就好像 Activity 被暂停一样,但什么也没出现。当使用 IntentChooser 时,我可以在日志中看到:“invoking onCreate() for Activity com.android.internal.app.ChooserActivity”,但是在 PlayBook 上,没有任何反应。在 BB10 模拟器上,出现了选择器(即带有消息和 SMS 选项),但单击它们时没有任何反应。这些应该工作吗?可能有什么问题?文档没有提到任何这些限制: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))