loup-v / beacons

Flutter beacons plugin for Android and iOS.
Apache License 2.0
78 stars 53 forks source link

(WIP) Fix for flutter 1.6 above. #35

Closed awazgyawali closed 4 years ago

awazgyawali commented 5 years ago

Changed the api calls, this PR is work in progress as it depends upon stream_channel where I have sent another PR to address this issue.

awazgyawali commented 5 years ago

Hi @lukaspili, it seems that you have abandoned this project. Are you ok to give someone full access to the repo so that they can maintain it? If you are comfortable with it then I would like to work on it as my organization heavily relies on this plugin and I want to add more to it.

axellebot commented 5 years ago

Hey @awazgyawali I'm looking for a beacon lib but this one seems outdated, so I tried your update branch but I still having an issue when launching the example app, can you help me out ? 😁

Stacktrace

``` 13:33:53.576 14 info flutter.tools I/flutter (15020): Beacon scanner initialized 13:33:53.593 15 info flutter.tools D/FlutterBeaconPlugin(15020): START RANGING=[{identifier=com.beacon}] 13:33:53.611 16 info flutter.tools I/CycledLeScanner(15020): This is Android 5.0. We are using new scanning APIs 13:33:53.615 17 info flutter.tools I/BeaconService(15020): beaconService version 2.16.1 is starting up on the main process 13:33:53.617 18 info flutter.tools D/AndroidRuntime(15020): Shutting down VM 13:33:53.621 19 info flutter.tools E/AndroidRuntime(15020): FATAL EXCEPTION: main 13:33:53.621 20 info flutter.tools E/AndroidRuntime(15020): Process: com.flutterbeaconexample, PID: 15020 13:33:53.622 21 info flutter.tools E/AndroidRuntime(15020): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager; 13:33:53.622 22 info flutter.tools E/AndroidRuntime(15020): at org.altbeacon.beacon.BeaconLocalBroadcastProcessor.unregister(BeaconLocalBroadcastProcessor.java:82) 13:33:53.622 23 info flutter.tools E/AndroidRuntime(15020): at org.altbeacon.beacon.BeaconLocalBroadcastProcessor.register(BeaconLocalBroadcastProcessor.java:74) 13:33:53.622 24 info flutter.tools E/AndroidRuntime(15020): at org.altbeacon.beacon.service.BeaconService.ensureNotificationProcessorSetup(BeaconService.java:257) 13:33:53.623 25 info flutter.tools E/AndroidRuntime(15020): at org.altbeacon.beacon.service.BeaconService.onCreate(BeaconService.java:219) 13:33:53.623 26 info flutter.tools E/AndroidRuntime(15020): at android.app.ActivityThread.handleCreateService(ActivityThread.java:3531) 13:33:53.623 27 info flutter.tools E/AndroidRuntime(15020): at android.app.ActivityThread.-wrap6(ActivityThread.java) 13:33:53.623 28 info flutter.tools E/AndroidRuntime(15020): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1729) 13:33:53.623 29 info flutter.tools E/AndroidRuntime(15020): at android.os.Handler.dispatchMessage(Handler.java:102) 13:33:53.623 30 info flutter.tools E/AndroidRuntime(15020): at android.os.Looper.loop(Looper.java:154) 13:33:53.623 31 info flutter.tools E/AndroidRuntime(15020): at android.app.ActivityThread.main(ActivityThread.java:6780) 13:33:53.623 32 info flutter.tools E/AndroidRuntime(15020): at java.lang.reflect.Method.invoke(Native Method) 13:33:53.623 33 info flutter.tools E/AndroidRuntime(15020): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1500) 13:33:53.623 34 info flutter.tools E/AndroidRuntime(15020): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1390) 13:33:53.624 35 info flutter.tools E/AndroidRuntime(15020): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/com.flutterbeaconexample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.flutterbeaconexample-1/lib/arm64, /data/app/com.flutterbeaconexample-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] 13:33:53.624 36 info flutter.tools E/AndroidRuntime(15020): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 13:33:53.624 37 info flutter.tools E/AndroidRuntime(15020): at java.lang.ClassLoader.loadClass(ClassLoader.java:380) 13:33:53.624 38 info flutter.tools E/AndroidRuntime(15020): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 13:33:53.624 39 info flutter.tools E/AndroidRuntime(15020): ... 13 more ```

axellebot commented 5 years ago

It does work after many attempt 🤔 Dunno why

lukaspili commented 4 years ago

Hello @awazgyawali @nabinkh, I apologize for the very late response. My organization plans to restart maintenance of this plugin, starting in January. Are you still interested to join? I can give you a write access right now, so you can merge your work.

awazgyawali commented 4 years ago

Hi @lukaspili happy to see you back. We initially tried to maintain this project but as you were not available ATM we tweaked the project in such a way that now it only scans our beacons. So this PR shall not be merged else it will bring very false result.

@nabinkh and I are from the same team and we are also planning to build a package from scratch from around January. We shall continue working at that time, but for now, I am afraid I have to close this PR for the sake of sanity.

lukaspili commented 4 years ago

Sure. Sorry again for replying so late!