我正在將一個應用程序轉換爲Android Runtime,但是我的一些Intent操作不起作用,LogCat上沒有顯示任何錯誤/異常。我可以看到我的onSaveInstanceState代碼正在運行,就好像活動正在暫停一樣,但什麼都沒有出現。 當使用IntentChooser時,我可以在日誌中看到:「爲Activity com.android.internal.app.ChooserActivity調用onCreate()」,但是在PlayBook上,沒有任何反應。在BB10模擬器上,選擇器出現(即使用消息和短信選項),但點擊時沒有任何反應。 這些應該是工作?什麼可能是錯的?該文檔沒有提到任何這些限制:http://developer.blackberry.com/android/apisupport/BlackBerry Android Runtime上不支持的內容
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))