1
A
回答
2
這將創建Android的意圖,以顯示圖像/ PNG。
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(path)), "image/png");
startActivity(intent);
只要確保該文件位於所有人都可見的位置,而不是在您的私人沙箱中。將其保存到數據文件夾中的SD卡是常見的,例如。 /sdcard/data/appname/filename.png
0
使用本
intent.setData(android.Provider.MediaStore.Images.Media.Data);
相關問題
- 1. android intent image如何以最好的方式發送它
- 2. Android Image view - Camera
- 3. Android onActivityResult()with Intent
- 4. android linkify intent
- 5. nullpointer on intent android
- 6. Android StartAcitivty()with intent
- 7. Android Intent-filter VerifyError
- 8. Android ViewPageIndication with intent
- 9. Android Flavor related Intent
- 10. android intent putExtras
- 11. android listview and intent
- 12. Android ViewFlipper With Intent
- 13. ACTION_SEND intent android
- 14. android listview intent
- 15. Android - ImageView Image Boundaries Bidder then Image
- 16. Android Intent從Gridview共享
- 17. Image-Crop-Activity不會將Image-Uri發送到接收活動(Android-Image-Cropper)
- 18. android intent call without inquiry
- 19. Android Intent for google.maps onclick
- 20. android intent過濾器?
- 21. android intent activity with id
- 22. Android Intent not calling class
- 23. 上下文intent android
- 24. android intent for sdcard ready
- 25. Android響應URL Intent
- 26. Android SMS Via Intent Without Chooser
- 27. Android Image Asset Opacity
- 28. Android SimpleCursorAdaptor Image ViewBinder
- 29. Android studio image spawn
- 30. Android,Canvas,draw image
的[在Android的內置圖庫應用程序打開一個圖像編程]可能重複(http://stackoverflow.com/questions/2169649 /開放式的圖像功能於機器人-內置畫廊-APP-編程) – MByD 2012-02-17 13:01:36
退房[此] [1] [1]:http://stackoverflow.com/questions/ 2169649/open-an-image-in-androids-built-in-gallery-app-programmatically – 2012-02-17 13:36:11
Chekc out [this] [1] [1]:http://stackoverflow.com/questions/2169649/open-an-image-in-androids-built-in-gallery-app-programmatically – 2012-02-17 13:37:27