Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): allow compilation in old cordova-android versions #803

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Oct 20, 2020

since the plugin don't have engines for cordova-android, people is using it in old cordova-android versions and it fails to compile because it uses some code that is not supported in older SDK compile versions.

This PR should make it compile in older versions (tested only 6.2.3 which targets android-25, could still fail in even older versions)

closes #554

after this is merged we should do a patch/minor release and then we can revert and set the engines to cordova-android 9 and remove a lot of code that wouldn't be needed, and then do a major release as updating the engines is a breaking change

@breautek
Copy link
Contributor

I'm assuming this will cause breakage if running on later android targets. We should probably attempt to get this patch and the new major released around the same time.

@jcesarmobile
Copy link
Member Author

no, it should still work on any capacitor-android version, even on newer ones, it just replaces constants which might not exist with the number they represent
and this other change https://github.com/apache/cordova-plugin-inappbrowser/pull/803/files#diff-b73be6c976a963c35af9c94c6c85447ca3fa5a70f417912f71cce92b16896874L272-L277 just removes getWebViewClient usage, which is not available if you compile on cordova-android 6.2.3 (SDK 25) or older, but the code does the same thing.

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a big fan of introducing magic numbers, the Android constants exists for a reason and make reading the code a lot easier.

@jcesarmobile
Copy link
Member Author

Yeah, this is a temporary fix, will revert it once released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InAppBrowser.java:268:error: cannot find symbol
4 participants