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

App Update Error, Not Checking The device version #3

Open
jerryodhiambo opened this issue Jun 11, 2021 · 2 comments
Open

App Update Error, Not Checking The device version #3

jerryodhiambo opened this issue Jun 11, 2021 · 2 comments

Comments

@jerryodhiambo
Copy link

jerryodhiambo commented Jun 11, 2021

Your Environment

  • Plugin version: 1.0.3
  • Platform: Android
  • OS version: Mac Os
  • Device manufacturer / model:
  • Cordova version (cordova -v): Cordova 10.0.0
  • Cordova platform version (cordova platform ls): Android 9.1.0 and iOS 6.2.0
  • Plugin config

Expected Behavior

Actual Behavior

I am getting this error
"java.lang.NumberFormatException: For input string: "Varies with device"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at java.lang.Float.valueOf(Float.java:416)
at com.kungfukingbetty.cordova.appupdate.CDVAppUpdate.needsUpdate(CDVAppUpdate.java:185)
at com.kungfukingbetty.cordova.appupdate.CDVAppUpdate.execute(CDVAppUpdate.java:66)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:117)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
at org.apache.cordova.PluginManager.exec(PluginManager.java:139)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loop(Looper.java:183)
at android.os.HandlerThread.run(HandlerThread.java:67)
"

Context

I am running this function on device ready
function checkForUpdate() {
window.AppUpdate.needsUpdate(function (updateObj) {
if (updateObj.update_available == 1) {
console.log("App Update Success:")
}
}, function (error) {
console.log("App Update ERROR:", error);
});
}

Debug logs

@kungfu-king-betty
Copy link
Owner

Hello,

Unfortunately right now the plugin does not support multiple APKs for Android. I am working on an update to use the In-app Updates API for Android which will fix this issue. I should have the update in place soon and I will post here as soon as the new update is available for you. I appreciate your patience and I will try to get this working for you as soon as I can.

@kungfu-king-betty
Copy link
Owner

Hello,
I'm sure you have moved on from this open source plugin by now, but I just wanted to put an update in this issue that a new version is available (2.0.0) which should permanently fix this issue. I will leave the issue open for a while in case there are issues or other feedback.

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

No branches or pull requests

2 participants