简体   繁体   中英

Intent.ACTION_GET_CONTENT opens different folder in Gallery on different flavours of the app

I have following piece of code,

Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
intent.setType("image/*");
startActivityForResult(intent, IMAGE_PICK);

When i try to choose image, it opens recents in one flavour of app and in another, it opens screenshots, is there a way I can force to open same directory/folder inside gallery app so behaviour is synced on both flavours.

It seems to start in the last folder a photo was selected from. Ie if I open app A and set an image from folder “Foo”, it will open in “Foo” the next time as well. The setting is separate for the app B. If I set an image from folder “Bar” in the app B it will open in “Bar” the next time in the app B, but still “Foo” for the app A.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM