ImagePicker: Plugin's showing 'MultiImageChooserActivity' error while running on Android 9 devices.

Hi,

I’m currently facing a problem with the plugin running on a release version apk of android. It’s crucial to note that it only happens on Android 9 devices but not the older ones. When I start the this.imagePicker.getPictures(options) method, it shows the following error: “Unable to find explicit activity class {…synconset.MultiImageChooserActivity}; have you declared this activity in your AndroidManifest.xml?”

Any help would be much appreciated.

Ps: below is my development enviroment and the plugin version is ‘cordova-plugin-telerik-imagepicker 2.2.2’

Ionic:

   ionic (Ionic CLI)  : 4.0.1 (C:\Users\hn162\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.1

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.0.0

System:

   NodeJS : v8.11.1 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23

Most upvoted comments

I do have a workaround but I don’t know if it is a good practice.

I added this to the config.xml then re-added the platform android: Code_n8CObnsUCk

@sbellver thank you, i had to add that activity line into the manifest directly for it to work as well, if i remove the plugin and readd it in and do a rebuild, now it crashes the build process.

I am using cordova android 10.1.1 and installing gradle separately. So the only method that got it working for me is directly adding the activity into the manifest.

put it inside the <platform name="android"></platform>

<config-file target="res/xml/config.xml" parent="/*">
            <feature name="ImagePicker">
                <param name="android-package" value="com.synconset.ImagePicker"/>
            </feature>
        </config-file>