cordova-plugin-ibeacon
cordova-plugin-ibeacon copied to clipboard
Ibeacon App with Ionic 3 Crashing in Andriod 8 (Oreo)
I have developed an android Ibeacon app using ionic 3 according to this tutorial. https://ionicallyspeaking.com/2017/01/16/creating-a-beacon-application-with-ionic-2/
App is working fine in all the devices except android 8 (Oreo). App is crashing and also cannot find any error logs. Trying to debug in device using chrome inspect., expecting some error logs in catch., But could not find any error log. I got a major release this week. Any help would be appreciated. Thanks
Please check this link to get sample app https://github.com/sidPuttur/sampleBeacon
check more Info at: https://github.com/ionic-team/ionic/issues/13844
cli packages: (/usr/lib/node_modules)
@ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0 global packages:
cordova (Cordova CLI) : 8.0.0 local packages:
@ionic/app-scripts : 3.1.0 Cordova Platforms : android 7.0.0 Ionic Framework : ionic-angular 3.9.2 System: Node : v6.9.1 npm : 5.5.1 OS : Linux 4.4
Environment Variables:
ANDROID_HOME : /home/siddiq/Android/Sdk Misc:
backend : pro
I have an error too with android 7.1.2 and in ios(ios version is the same that I test weeks ago), the app was working when I push it to stores, but weeks later I intent to use and it fail There is someone who knows what has happened and where I have to keep looking?
The error was a modification into database, it is solved. Sorry for not advise.
algun permiso nuevo que se aplique?
Same issue here. With android 8.0 the app crashes as soon as I "startMonitoringForRegion". With android 7.0 it is working and detecting the beacons. Btw. I am also using Ionic3 and followed the example from https://ionicframework.com/docs/native/ibeacon/ as well as the examples from this repo. Would be great if this gets fixed, so we can use it with android 8 and new phones.
Apparently this is causing the crash (the second point might be a follow up error):
-
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager;
-
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/io.ionic.starter-5w0z6VpbHwI1ydxKFAZwDg==/base.apk"],nativeLibraryDirectories=[/data/app/io.ionic.starter-5w0z6VpbHwI1ydxKFAZwDg==/lib/arm64, /system/lib64, /system/vendor/lib64]]
This is the log error stack from adb:
--------- beginning of crash 03-09 10:38:02.724 31694 31710 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 03-09 10:38:02.724 31694 31710 E AndroidRuntime: Process: io.ionic.starter, PID: 31694 03-09 10:38:02.724 31694 31710 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground() 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:353) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager; 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.BeaconLocalBroadcastProcessor.unregister(BeaconLocalBroadcastProcessor.java:82) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.BeaconLocalBroadcastProcessor.register(BeaconLocalBroadcastProcessor.java:74) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.service.ScanJobScheduler.ensureNotificationProcessorSetup(ScanJobScheduler.java:69) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.service.ScanJobScheduler.schedule(ScanJobScheduler.java:122) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.service.ScanJobScheduler.applySettingsToScheduledJob(ScanJobScheduler.java:85) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.service.ScanJobScheduler.applySettingsToScheduledJob(ScanJobScheduler.java:92) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.BeaconManager.applyChangesToServices(BeaconManager.java:962) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at org.altbeacon.beacon.BeaconManager.startMonitoringBeaconsInRegion(BeaconManager.java:902) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at com.unarin.cordova.beacon.LocationManager$16.run(LocationManager.java:832) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at com.unarin.cordova.beacon.LocationManager$33.doInBackground(LocationManager.java:1433) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at com.unarin.cordova.beacon.LocationManager$33.doInBackground(LocationManager.java:1427) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:333) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: ... 4 more 03-09 10:38:02.724 31694 31710 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/io.ionic.starter-5w0z6VpbHwI1ydxKFAZwDg==/base.apk"],nativeLibraryDirectories=[/data/app/io.ionic.starter-5w0z6VpbHwI1ydxKFAZwDg==/lib/arm64, /system/lib64, /system/vendor/lib64]] 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 03-09 10:38:02.724 31694 31710 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
I'm seeing the same issue on android 8 with a cordova app using this plugin. App crashes as soon as I call window.cordova.plugins.locationManager.startRangingBeaconsInRegion
but works on iOS.
falta una clase, quizas desapareció en la version 8.0. habria que ver como importarla al plugin