5

On Android 6 devices, we've noticed that expansion files now need that we request the WRITE_EXTERNAL_STORAGE permission at runtime, which allows the user to deny, which doesn't allow us to continue with the app startup.

Is there a way to prevent the expansion files to use the WRITE_EXTERNAL_STORAGE or to prevent the user of denying?

If that request must appear when using expansion files, how are we supposed to handle that gracefully?

Floern
  • 33,559
  • 24
  • 104
  • 119

2 Answers2

0

I also have this problem. To resolve it for API 23 I download .obb file to private app's file directory instead of obb directory which my app hasn't access to. You can review my solution here . Usage:

repositories {
    maven { url 'https://dl.bintray.com/alexeydanilov/apk-expansion' }
}
dependencies {
    compile 'com.danikula.expansion:expansion:VERSION@aar'
    compile 'com.danikula.expansion:license:VERSION@aar'
    compile 'com.danikula.expansion:zip:VERSION@aar'
}

See the latest versions here.

danik
  • 796
  • 9
  • 17
0

Seems to be a bug on Android 6.0

https://code.google.com/p/android/issues/detail?id=197287

Emanuel Canha
  • 441
  • 5
  • 11