nbsp-team / MaterialFilePicker

Picking files since 2015
Apache License 2.0
1.15k stars 229 forks source link

getIntent() is now private? #113

Closed drmrbrewer closed 4 years ago

drmrbrewer commented 4 years ago

With version 1.8 I get an Intent using new MaterialFilePicker().withActivity(this).[various].getIntent().

This means that I can then add this Intent to Intent.createChooser() and then chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { materialFilePickerIntent, otherPickerIntent }) to give the user a choice between MaterialFilePicker and other file pickers.

But with version 1.9 it complains that .getIntent() has private access. Instead it seems you are meant to open MaterialFilePicker directly.

Why has this been done, and is it possible with 1.9 to continue to do something similar?

dimorinny commented 4 years ago

Hello, thank you a lot for your report. Yeah, it's the completely valid case here, we'd fixed it and made a new 1.9.1 release.

drmrbrewer commented 4 years ago

Thanks for the quick fix. Out of interest, how long does it take for the new version to be accessible from Android Studio? Mine is still showing 1.9 as the latest, and it doesn't compile if I try 1.9.1.

Also, is there a changelog (other than looking at the commits)? It'd be good to see what changed between 1.8 and 1.9.

lukaville commented 4 years ago

@drmrbrewer

It should not take more than a few hours. Did you update the artifact name? It should be com.nbsp:materialfilepicker:

repositories {
    jcenter()
}

dependencies {
    implementation 'com.nbsp:materialfilepicker:1.9.1'
}
drmrbrewer commented 4 years ago

@lukaville D'oh I didn't spot that change. I can see it now.

Another thing... I note that minSdkVersion is now 19. The minSdkVersion for my project is 16, so that's a shame. I assume the change up to 19 was necessary?