Not able to launch Gallery from Android Instant app

前端 未结 1 1956
南笙
南笙 2021-01-15 01:32

I created an app which picks up images from images folder in emulator and displays selected image in my layout of application. When I converted my app to instant app, the sa

相关标签:
1条回答
  • 2021-01-15 02:22

    Instant Apps are blocked from accessing some features that regular Android apps can access. The exception:

    java.lang.SecurityException: Not allowed to start activity Intent...

    Means you have found one such feature. In this case it is Intent.ACTION_GET_CONTENT which is not currently allowed. Support for additional features such as this may be introduced over time.

    In addition, Instant Apps do not have access to read or write from external storage so requesting access to READ_EXTERNAL_STORAGE will also not work or throw an exception. See here for a list of permissions that are supported by Instant Apps.

    0 讨论(0)
提交回复
热议问题