Cordova Security Alert Google Play Android - android

I have an app published on Google Play and I have received this warning recently:
https://support.google.com/faqs/answer/6325474
I have upgraded cordova version via command line and re-uploaded the apk and I still get the same warning.
Any ideas on how to resolve this issue?
Thanks,
Chris

You need not necessarily update android version explicitly. Updating Cordova version through CLI automatically updates the cordova android version as well. All you need to do is to remove android platform and add it once again after cordova update and rebuild android platform again. Hope it helps.

Related

Crosswalk not being added to Cordova Android App

To increase compatibility with older Android devices (4.0+) for my Cordova App I am wanting to use the Crosswalk Webview instead of the device webview. I am using Cordova Tools (CLI 6.3.0) for Visual Studio (2015 - Update 3) and have added the Plugin "Crosswalk WebView Engine" using the plugins panel in the config.xml. However, when I start up the app, debug it and inspect the useragenet (using "navigator.userAgent" from the console) it is not reporting as running using the Crosswalk WebView Engine.
Now I have heard some people suggest that you remove the Android platform, install the plugin and then rebuild, but that isn't fixing it for me. Perhaps I am removing the Android platform incorrectly? (I am just deleting the folder from disk).
Is this a case of my build steps being incorrect? Any assistance would be appreciated.
After persisting with this problem, assuming it to be a problem with my set-up, I got it working.
The key was to update everything. I installed the latest Java JDK (v1.8) - Updated mt CLI version to 6.5.0 - Installed any updates using the Android Update Manager (I also updated some files within Android Studio itself) and then finally installed Crosswalk (2.3.0).
Works like a dream now.

Updating salesforce Hybrid cordova app

I am a little new to Salesforce Hybrid Mobile application development.
I have a well running hybrid application.
But recently when uploading the APK to play store, play store gives an error
Your APK has been rejected for containing security vulnerabilities, which violates the Malicious Behavior policy. The Alerts page has more information about how to resolve the issue. If you submitted an update, the previous version of your app is still live on Google Play.
After some analysis I found that my android platform version is 3.6.x which might be the reason for rejection.
So I updated cordova android platform of my existing Salesforce Hybrid app using the following command.
cordova platform update android
After updating the version of android platform is 5.2.2
Salesforce Mobile sdk guide says to reinstall the salesforce plugin
So,
cordova plugin remove com.salesforce
And then
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
But, while re-adding the plugin it gives the following message
Plugin doesn't support this project's cordova-android version. cordova-android: 5.2.2, failed version requirement: 5.0.0
Skipping 'com.salesforce' for android
And again running the project in eclipse gives many errors.
Not able to pin point the specefic issue here.
Any help is appretiated.
Thanks in advance.
You have to update to 5.0.0 instead of 5.2.2 because Salesforce plugin is made to 5.0.0 version.
You can see that in the plugin.xml file, in the engine tag.
<engines>
<engine name="cordova-android" version="5.0.0" />
<engine name="cordova-ios" version="4.2.0" />
</engines>

Google Play services: Error while building ionic android app

I am creating new ionic application. In this app I have added Google Play services package revision no. 31. Also added package to my app cordova plugin add cordova-plugin-googleplus. This is used for google plus authentication.
So now I am facing problem while building android app using ionic build android. It gives me following error,
But when I remove the package cordova plugin remove cordova-plugin-googleplus and build the app it succeeds.
Is it because of the revision number of googleplus package?
The problem is because you Android SDK does not have Google Play Services installed. Therefore, it cannot compile your application which has Google Play Services reference (and Android SDK does not have those). Go to your Android SDK Manager and install Google Play Services for your android API version. PS you can see those errors in your console.
Found the solution,
I have downgrade the following packages to previous revision.
Remember you need to restart your machine if you are using windows to reflect changes in android sdk.
The error comes because this app is not using androidX but these plugins solve errors.Use these two plugin. Its solved my issueionic cordova plugin add cordova-plugin-androidx && ionic cordova plugin add cordova-plugin-androidx-adapter

Google Play Developer Console Showing Alerts Even After Updating the Cordova Version

Google Play is showing Cordova Security Alerts on my app. And they suggested me to update existing cordova version to higher at 4.1.1.
Please migrate your app(s) to Apache Cordova v.4.1.1 or higher as soon
as possible and increment the version number of the upgraded APK. If
you are using a 3rd party library that includes Apache Cordova, please
notify the 3rd party and work with them to address the issue.
I have already upgraded my Cordova version to: 4.2.0 and here is the code:
Mds-MacBook-Pro:BanglaGaanerTaroka Morol$ cordova -v
4.2.0
Mds-MacBook-Pro:BanglaGaanerTaroka Morol$
Google Play Developer console still showing this alert and that affected my latest APK version too.
Is there anyone facing the same issue? Or how to solve it?
Thanks in advance.
First of all, you should understand that there is a cordova CLI version and cordova platform versions.
When google play ask you to update to cordova 4.1.1, he is not asking you to update the CLI to cordova 4.1.1, he is asking you to update the cordova android (platform) version to 4.1.1.
If you update the CLI to 4.2.0 you get cordova android 3.6.4 that is still vulnerable.
So, the first thing you should do is to update the cli to 6.0.0 (latest version right now) with
npm install -g cordova
But updating the CLI isn't enough, you have to update your project too.
Go to your project folder and run
cordova platform update android
That will update your project to Cordova Android: ~5.1.0

cordova build android removes older version

I have recently upgraded Cordoova to version 6 with android platforms 5.1.0 and ios 4.0.1 in one of the projects.
After also upgrading all plugins to the latest version the app is finally working again as it should.
However, I have noticed one very annoying difference:
With the old version when I ran the command:
cordova build android
it was compiling the app and installing it on the phone. However, it kept all the "data" from the previous version. So for example localStorage or SQLite database remained available.
When I run the same command under the new version, it replaces the app, removing all of it's "data".
As the app has a "setup process" I will now need to complete this every time I deploy a new version to the phone for testing, which is quite time consuming.
Is there any settings available to change this behavior?
I already checked the change log from Cordova but could not find any evidence what they have changed...
This issue was related to a bug in cordova, which got fixed with the latest release on March 2nd.
To fix it I did:
npm install -g cordova
cordova platform update android#5.1.1
details about the issue:
https://issues.apache.org/jira/browse/CB-10157
So in case you face a similar issue try to update your project - it worked just fine for me.

Categories

Resources