I remember I had asked why the media plugin can not work when set the target SDK to larger than 22 years ago, it seems the answer was the project can only support 22 by then. If the project is not using any plugin, I can set it to target 28 directly and it works fine, however, when the media plugin is used, set it to above 22 will not work.
I've not tested on 28, just 26 - but not tested media at all. I used to use media but I only used it for a couple of things that are now taken care of by other methods - saving png, etc...
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I don't plan to do anything new with the media, I just want to update my old project to target sdk to 26, but the media plugin will not work, I do not know why this happen.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
This would certainly be a permission issue. I notice that media plugin needs EXTERNAL_STORAGE permissions, which are now classified as dangerous (since API 23) and require special handling.
when select image from the album,an alert popup says: Warning: /data/user/0/com.test.game/cache/20180806_162037_gideros.jpg:Error while reading image file.
Look in the folder (somehow) - copy out the file and see if it's a valid jpg.
That way you know if it's image writing or image reading that's the problem.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
If the project is not using any plugin, I can set it to target 28 directly and it works fine, however, when the media plugin is used, set it to above 22 will not work.
Likes: antix
Likes: totebo
https://deluxepixel.com
https://deluxepixel.com
Which API calls are you using ?
I use the takePicture and getPicture.
String storageDir = sActivity.get().getCacheDir(null).toString();
Warning: /data/user/0/com.test.game/cache/20180806_162037_gideros.jpg:Error while reading image file.
That way you know if it's image writing or image reading that's the problem.
https://deluxepixel.com