Android Image Viewer from App

前端 未结 3 2069
闹比i
闹比i 2020-12-30 17:44

I\'m trying to launch an image which is written to my application directory with the builtin Android image viewer. This image has been written in a different part of the app

3条回答
  •  执念已碎
    2020-12-30 17:58

    Your image is within your application sandbox, so you should use ContentProvider to give other apps external access to your image data. Keep in mind that in Android, pre-installed apps don't have higher priority than third-party apps - you still have to give permission to your data, even if you want to use the default apps.

    Otherwise, take a look at the Gallery activity's IntentFilter tags in the Camera application, for a reference what Intent you can use to open an image with the default viewer.

提交回复
热议问题