adjust / cordova_sdk

This is the Cordova SDK of
http://www.adjust.com
Other
37 stars 43 forks source link

sdk no more compatible with Google Play Store #177

Closed gterminator closed 1 year ago

gterminator commented 1 year ago

Most Intents doesnt have set the android:export flag.

This is mandatory since Jan 2022. Therefore you cannot deploy any apps anymore with this ionic plugin.

uerceg commented 1 year ago

Hi @gterminator,

Can you point to which intents exactly you are noticing that they don't contain android:export flag and which belong to Adjust SDK?

gterminator commented 1 year ago

Check your config file, or deploy your testapp on the store. You will find it out.

uerceg commented 1 year ago

We have checked our plugin.xml file and we have dozens of Cordova / Ionic apps running in Play Store and no one reported this type of the issue. It would be great if you could send us the rejection message you are getting from Play Store when you try to update your app to see what exactly from plugin's configuration is causing troubles for your app.

gterminator commented 1 year ago

no one reported it because: a) nobody uses this library anymore b) didnt update his app on the app store c) you didnt upload a app with this library into the google play store.

I fixed it, I wont share my solution because it took too much lifetime for me debugging it.

Just one tip: If you checkout the project with the newest version of android sdk and add adjust you will see the error in your IDE.

uerceg commented 1 year ago

Thanks for the reply.

Sorry to hear that you had these issues and happy to hear that you managed to solve them. Unfortunately, due to lack of more exact information on what exactly the issue was, only thing we can do on our end is to guess what is that you might had the issues with.

Based on your original message:

Most Intents doesnt have set the android:export flag.

This is mandatory since Jan 2022. Therefore you cannot deploy any apps anymore with this ionic plugin.

thing we can assume is that you might be talking about change which Google introduced with all the apps which are targeting Android 12 or later (API 31 or higher). Reason why this comes up to our mind is the word Intents you mentioned. Next to all the changes which compilation of the app against API 31 carries with itself is also the change where each Android component which is containing intent filters is now expected to explicitly define android:exported attribute (whereas before you were not in obligation to define it and default value was used).

If we assume that this is the topic you are talking about, the thing which confuses us is the year 2022 your mentioned because Google is forcing all the apps to target Android 12 (API 31 or later) as of January 2023 (source).

Next thing is that you are saying Most Intents. Only component which Adjust Cordova plugin will add to your AndroidManifest.xml file is the default broadcast receiver for INSTALL_REFERRER intent. Also, if you check that component, you will notice that it does have android:exported attribute defined. There is no other component in Adjust Cordova plugin which contains intent filter, just that one.

Under the hood, Adjust Cordova plugin is running on top of native Adjust Android SDK which is being added to your app via Gradle as a dependency pulled from Maven repository. Latest Adjust Cordova plugin version is using native Adjust Android SDK v4.32.0. If we check the target and compile API version used to generate that binary, you can see that it's 33. That means that native Android SDK dependency is compatible with Android 12 targeting requirements from Google.

After this, any potential incompatibility of the app with this Android 12 targeting requirement should not have anything to do with Adjust Cordova plugin, but instead either the app configuration itself or configuration of the other plugins which app is using.

Going now to your tip:

Just one tip: If you checkout the project with the newest version of android sdk and add adjust you will see the error in your IDE.

If you are referring to example Ionic app for not being compatible with this Google's requirement, then you're right. We have built these apps a while ago and in there we are just trying to showcase how usage of our plugin should look like, but keeping those apps up-to-date and in line with all the requirements which Google or Apple are throwing at developers for their apps, this is not something which is in focus of these apps. Super quick look at example Ionic app from this repository will show that compile and target API level is set to 29 which would mean that if we were to take this app and ship it to Play Store, it would probably not pass the submission process having in mind January 2023 requirement set by Google. Going further, even if we would bump this to 31 or higher, singleTask activity which runs under the hood of the Ionic Android app which contains intent filters does not contain android:exported attribute and it would need to be added to comply with this requirement from Google. But like said, goal of these apps is only to showcase how SDK should be used.

I fixed it, I wont share my solution because it took too much lifetime for me debugging it.

Sorry one more time to hear that you spent a lot of time to fix your issue, but I would like to encourage you in the future to open ticket in our repository as soon as you notice that your app is having issues caused by Adjust Cordova plugin. We are here to try to help you with those issues and hopefully solve them so that you don't need to spend your time.

I also respect your choice not to share the solution you came up with even though in spirit of open source community it would be great if you could explain what the issue exactly was and how did you manage to solve it and by doing that, to help anyone who might potentially encounter the same issue in the future.

I will close this ticket for now, but in case you have any further comments, feel free to drop them in this ticket.

Wish you all the best. Cheers