Telerik-Verified-Plugins / ImagePicker

Cordova Plugin For Multiple Image Selection
MIT License
182 stars 331 forks source link

Android Manifest Merge Issue (Unable to find explicit activity class) #228

Open brassier opened 4 years ago

brassier commented 4 years ago

As noted in this ticket, there are often cases where the activity that is supposed to be added to the android manifest is not actually added. My hunch is that this happened due to this recent commit, for Android 10 support.

There are numerous folks claiming that edit-config has been known to remove chunks of the file being edited, which seems to be what happens here. The activity isn't reliably added to the manifest (i.e. it could be getting removed). Maybe there are other ways this can get the requestLegacyExternalStorage flag set? Like a hook, as suggested by the SO post below?

brassier commented 4 years ago

I tested out version 2.3.3, which is prior to the addition of the edit-config plugin.xml addition. I am seeing the <activity> element added to the manifest both on platform add (when the plugin has already been previously added), and on new plugin additions. This is more proof to me that this edit-config is causing problems with the manifest setup.

It would be great if this requestLegacyExternalStorage flag could move from the current edit-config to a hook. I think that would resolve the problem.

anujraghuvanshi commented 4 years ago

@brassier - Will be great & thankful if you could submit PR on your suggestions. We can take that up and add to next release soon.

brassier commented 4 years ago

@Anuj-Raghuvanshi - Yes, I should be able to get a PR out here on Monday. Thanks!

brassier commented 4 years ago

@Anuj-Raghuvanshi - PR is created (https://github.com/Telerik-Verified-Plugins/ImagePicker/pull/232)