Ionic android-targetsdk version 29 issue with plugins

When i was trying to build with targetsdk version 29.

some of the plugins are not working on android 10 devices.

Photo Library and Image Picker are not working with Android SDK 29.

from November 1st onwards google play is not accepting android-targetSdkVersion=28

so I need to use 29 which is making an issue with plugins can anyone has a solution for this.

and I want ionic to fix these problems with plugins. which is very bad when we are updating the app for new API levels

1 Like

@mhartington plesae look into this issue i have seen you are active.

1 Like

ImagePicker solution for Android 10: https://github.com/Telerik-Verified-Plugins/ImagePicker/issues/208

Also this is been added on latest version update the ImagePicker plugin

For photo library what errors are you getting ?

1 Like

yes, i have added this, but it is not working ionic 3 cordova 8.1.1

do you have solution for that…

Thank you

1 Like

create an github repo with minimal code to reproduce for ImagePicker

1 Like

just intall the image picker in a fresh ionic 5 project…and build release apk with targetsdk version 29

for the first time iam feeling pitty ,sad and anger for choosing ionic for the app development with lot of unsupported plugins it makes developer and client relationship goes bad.

1 Like

@RajeshReddy Please provide a sample repo that we can look at. This will reduce an potential errors that could appear if we try to recreate the issue.

1 Like

I had the same issue with base64togallery plugin. So I finally managed to solved it.

To anyone who is struggling, I will explain as below.

As mentioned in the git, GitHub - Nexxa/cordova-base64-to-gallery: this project is not longer maintained - Cordova plugin to save base64 data as a png image into the device , ionic Cordova base64togallery plugin has been discontinued.

And also when trying to submit the ionic mobile app for Android production, it’s saying that the target SDK version should be more than 29.

But as usual, if we add <preference name="android-targetSdkVersion" value="29" /> to the config.xml file under the Android platform, it will not work the base64togallery plugin (not saving images to your device)

So you have to do like below,

In your ionic project, go to build.gradle file ( platforms\android\build.gradle ) and change defaultTargetSdkVersion and defaultCompileSdkVersion to 29. (as below)

defaultTargetSdkVersion=29 
defaultCompileSdkVersion=29

And then go to AndroidManifest.xml file ( platforms\android\app\src\main\AndroidManifest.xml ) and add android:requestLegacyExternalStorage="true" to the application tag, as showing below.

<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" android:requestLegacyExternalStorage="true" android:supportsRtl="true">

Then try to build your app for debug or release versions.

1 Like

For photo library what errors are you getting ?

www . suitsmeonline . com