Flutter beacons plugin for Android and iOS.

Overview

Beacons

pub package

Flutter plugin to work with beacons.
Supports Android API 16+ and iOS 8+.

Features:

  • Automatic permission management
  • Ranging
  • Monitoring (including background)

Supported beacons specifications:

  • iBeacon (iOS & Android)
  • Altbeacon (Android)

Installation

Add to pubspec.yaml:

dependencies:
  beacons: ^0.3.0

Note: The plugin is written in Swift for iOS.
There is a known issue for integrating swift plugin into Flutter project using the Objective-C template. Follow the instructions from Flutter#16049 to resolve the issue (Cocoapods 1.5+ is mandatory).

Setup specific for Android

Create a subclass of FlutterApplication:

class App : FlutterApplication() {

    override fun onCreate() {
        super.onCreate()

        // Beacons setup for Android
        BeaconsPlugin.init(this, object : BeaconsPlugin.BackgroundMonitoringCallback {
            override fun onBackgroundMonitoringEvent(event: BackgroundMonitoringEvent): Boolean {
                val intent = Intent(this@App, MainActivity::class.java)
                startActivity(intent)
                return true
            }
        })
    }
}

And register it in android/app/src/main/AndroidManifest.xml:

<manifest ...>
  ...
  <application
    android:name=".App"
    android:label="beacons_example"
    android:icon="@mipmap/ic_launcher">
    ...
  </application>
</manifest>

BeaconsPlugin.BackgroundMonitoringCallback is required to react to background monitoring events. The callback will be executed when a monitoring event is detected while the app is running in background. In the snipped above, it will start the Flutter app. It will also allow to receive a callback on the Flutter side. See background monitoring section for more details.

For permission, see below.

Setup specific for iOS

Nothing. Contrary to the general opinion, you do not need to enable any background mode.

For permission, see below.

Permission

In order to use beacons related features, apps are required to ask the location permission. It's a two step process:

  1. Declare the permission the app requires in configuration files
  2. Request the permission to the user when app is running (the plugin can handle this automatically)

For iOS

There are two available permissions in iOS: when in use and always.
The latter is required for background monitoring.

For more details about what you can do with each permission, see:
https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services

Permission must be declared in ios/Runner/Info.plist:

<dict>
  <!-- When in use -->
  <key>NSLocationWhenInUseUsageDescription</key>
  <string>Reason why app needs location</string>

  <!-- Always -->
  <!-- for iOS 11 + -->
  <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
  <string>Reason why app needs location</string>
  <!-- for iOS 9/10 -->
  <key>NSLocationAlwaysUsageDescription</key>
  <string>Reason why app needs location</string>
  ...
</dict>

For Android

There are two available permissions in Android: coarse and fine.
For beacons related features, there are no difference between the two permission.

Permission must be declared in android/app/src/main/AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <!-- or -->
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>

How-to

Ranging and monitoring APIs are designed as reactive streams.

  • The first subscription to the stream will start the ranging/monitoring ;
  • The last cancelling (when there are no more subscription) on the stream will stop the ranging/monitoring operation.

Ranging beacons

Beacons.ranging(
  region: new BeaconRegionIBeacon(
    identifier: 'test',
    proximityUUID: '7da11b71-6f6a-4b6d-81c0-8abd031e6113',
  ),
  inBackground: false, // continue the ranging operation in background or not, see below
).listen((result) {
  // result contains a list of beacons
  // list can be empty if no matching beacons were found in range
}

Background ranging

When turned off, ranging will automatically pause when app goes to background and resume when app comes back to foreground. Otherwise it will actively continue in background until the app is terminated by the OS.

Ranging beacons while the app is terminated is not supported by the OS. For this kind of usage, see background monitoring.

Monitoring beacons

Beacons.monitoring(
  region: new BeaconRegionIBeacon(
    identifier: 'test',
    proximityUUID: '7da11b71-6f6a-4b6d-81c0-8abd031e6113',
  ),
  inBackground: false, // continue the monitoring operation in background or not, see below
).listen((result) {
  // result contains the new monitoring state:
  // - enter
  // - exit
}

Background monitoring

When turned off, monitoring will automatically pause when app goes to background and resume when app comes back to foreground. Otherwise it will actively continue in background until the app is terminated by the OS.

Once the app has been terminated, the monitoring will continue.
If a monitoring event happens, the OS will start the app in background for several seconds (nothing will be visible for the user). The OS is providing you the opportunity to perform some quick operation, like showing a local notification.

In order to listen to background monitoring events, you can subscribe to a special stream. This stream is passive: it does not start a monitoring operation. You are still required to start it using Beacons.monitoring(inBackground: true).

Because the OS will run the app in background for several seconds only, before terminating it again, the good place to setup the listener is during app startup.

class MyApp extends StatefulWidget {
  MyApp() {
    Beacons.backgroundMonitoringEvents().listen((event) {
      final BackgroundMonitoringEventType type = event.type // didEnterRegion, didExitRegion or didDetermineState
      final BeaconRegion region = event.region // The monitored region associated to the event
      final MonitoringState state = event.state // useful for type = didDetermineState

      // do something quick here to react to the background monitoring event, like showing a notification
    });
  }

  @override
  _MyAppState createState() => new _MyAppState();
}

For testing background monitoring and what result you should expect, read:
https://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html

Alternatively to starting/stoping monitoring using Beacons.monitoring() stream subscription, you can use the following imperative API:

// Result will be successful if monitoring has started, or contain the reason why it has not (permission denied, etc)
final BeaconsResult result = await Beacons.startMonitoring(
  region: BeaconRegionIBeacon(
    identifier: 'test',
    proximityUUID: 'uuid',
  ),
  inBackground: true,
);

await Beacons.stopMonitoring(
  region: BeaconRegionIBeacon(
    identifier: 'test',
    proximityUUID: 'uuid',
  ),
);

Note that these functions can only start/stop the monitoring.
To receive the associated monitoring events, listen to the stream from Beacons.backgroundMonitoringEvents().

Beacons types

For every API that requires or return a region or a beacon, you can work with the different types of beacons specs.

Regardless of the beacons specs, each region requires an unique identifier that are used by the engine under the hood to uniquely identify and manage a ranging/monitoring request.

Generic

Beacons.ranging(region: BeaconRegion(
    identifier: 'test',
    ids: ['id1', 'id2', 'id3'],
  ),
).listen((result) {
  final Beacon beacon = result.beacons.first;
});

iBeacon

Beacons.ranging(region: BeaconRegionIBeacon(
    identifier: 'test',
    proximityUUID: 'some-uuid',
    major:0,
    minor: 0,
  ),
).listen((result) {
  final BeaconIBeacon beacon = BeaconIBeacon.from(result.beacons.first);
});

Under the hood

  • iOS uses native iOS CoreLocation
  • Android uses the third-party library android-beacon-library (Apache License 2.0)

Each technology has its own specificities.
The plugin does its best to abstract it and expose a common logic, but for an advanced usage, you would probably still need to familiarize yourself with the native technology.

Sponsor

Beacons plugin development is sponsored by Pointz, a startup that rewards people for spending time at local, brick and mortar businesses. Pointz is proudly based in Birmingham, AL.

Author

Beacons plugin is developed by Loup, a mobile development studio based in Montreal and Paris.
You can contact us at [email protected]

License

Apache License 2.0

Comments
  • Not detecting changes when app is killed (iOS)

    Not detecting changes when app is killed (iOS)

    After killing the app we're are not getting any notifications when we enter and exit regions on iOS.

    I suspect it's because the notifyEntryStateOnDisplay is not getting set to true by default.

    To recreate, monitor a region and write a value to database each time enter and exit region, kill the app, enter/exit region => no change detected in database.

    enhancement 
    opened by AndrewPetrovics 12
  • Trouble integrating Swift plugin

    Trouble integrating Swift plugin

    Couldn't integrate plugin into my Flutter project. I believe the problem has to do with the note mentioned in the readme.

    After adding the package to .yaml...

    First error:

    The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift...
    

    Then, I added the following to Podfile...

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['SWIFT_VERSION'] = '3.2'
        end
      end
    end
    

    Next error:

    /Users/andrew/dev/Pointz/Frontend/ios/Pods/Headers/Public/beacons/BeaconsPlugin.h:1:9: error: 'Flutter/Flutter.h' file not found
        #import <Flutter/Flutter.h>
    

    Then, I added the following to Podfile...

    use_frameworks!
    

    and

    pre_install do |installer|
     Pod::Installer::Xcode::TargetValidator.send(:define_method,:verify_no_static_framework_transitive_dependencies) {}
    end
    

    and

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.headers_build_phase.files.each do |file|
          file.settings = { 'ATTRIBUTES' => ['Public'] }
        end
      end
    end
    

    and then, I deleted Podfile.lock, /ios/Pods and ran flutter clean and got the following error:

    Warning: Multiple build commands for output file /Users/andrew/dev/Pointz/Frontend/build/ios/Debug-iphoneos/BoringSSL/openssl.framework/Headers/x509.h
        Warning: Multiple build commands for output file /Users/andrew/dev/Pointz/Frontend/build/ios/Debug-iphoneos/BoringSSL/openssl.framework/Headers/x509_vfy.h
        Warning: Multiple build commands for output file /Users/andrew/dev/Pointz/Frontend/build/ios/Debug-iphoneos/BoringSSL/openssl.framework/Headers/x509v3.h
        In file included from /Users/andrew/dev/Pointz/Frontend/ios/Pods/GoogleToolboxForMac/Foundation/GTMLogger.m:19:
        /Users/andrew/dev/Pointz/Frontend/ios/Pods/GoogleToolboxForMac/Foundation/GTMLogger.h:53:9: fatal error: 'GTMDefines.h' file not found
        #import "GTMDefines.h"
                ^~~~~~~~~~~~~~
        1 error generated.
    Could not build the precompiled application for the device.
    

    I've tried a bunch of other stuff as well, but no dice.

    Here's my flutter doctor -v output:

    [✓] Flutter (Channel master, v0.4.5-pre.55, on Mac OS X 10.12.6 16G1212, locale en-US)
        • Flutter version 0.4.5-pre.55 at /Users/Andrew/dev/flutter
        • Framework revision be6501a91c (9 hours ago), 2018-05-21 11:54:38 +0100
        • Engine revision 1179c38a42
        • Dart version 2.0.0-dev.55.0.flutter-43635d3372
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 9.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 9.1, Build version 9B55
        • ios-deploy 1.9.2
        • CocoaPods version 1.5.0
    
    [✓] Android Studio (version 2.3)
        • Android Studio at /Applications/Android Studio 2.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
    
    question 
    opened by AndrewPetrovics 5
  • Never ending console output on android

    Never ending console output on android

    When using the plugin there is a continuous stream of the following output:

    ...
    D/ScanRecord( 5830): parseFromBytes
    D/ScanRecord( 5830): first manudata for manu ID
    D/ScanRecord( 5830): parseFromBytes
    D/ScanRecord( 5830): first manudata for manu ID
    D/ScanRecord( 5830): parseFromBytes
    D/ScanRecord( 5830): first manudata for manu ID
    D/ScanRecord( 5830): parseFromBytes
    D/ScanRecord( 5830): first manudata for manu ID
    D/ScanRecord( 5830): parseFromBytes
    D/ScanRecord( 5830): first manudata for manu ID
    ...
    

    This doesn't affect anything but makes debugging anything else extremely difficult.

    There is a new output at least every second.

    I would love if there is a way to suppress these messages.

    enhancement 
    opened by adamfuller 3
  • [ERROR]java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c

    [ERROR]java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c

    E/AndroidRuntime(15227): java.lang.RuntimeException: Unable to destroy activity {com.example.finalparola/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}: java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c E/AndroidRuntime(15227): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5139) E/AndroidRuntime(15227): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5162) E/AndroidRuntime(15227): at android.app.ActivityThread.access$1700(ActivityThread.java:229) E/AndroidRuntime(15227): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1880) E/AndroidRuntime(15227): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(15227): at android.os.Looper.loop(Looper.java:148) E/AndroidRuntime(15227): at android.app.ActivityThread.main(ActivityThread.java:7325) E/AndroidRuntime(15227): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(15227): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1321) E/AndroidRuntime(15227): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1211) E/AndroidRuntime(15227): Caused by: java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c E/AndroidRuntime(15227): at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1160) E/AndroidRuntime(15227): at android.app.ContextImpl.unbindService(ContextImpl.java:1475) E/AndroidRuntime(15227): at android.content.ContextWrapper.unbindService(ContextWrapper.java:644) E/AndroidRuntime(15227): at io.intheloup.beacons.logic.BeaconsClient.unbindService(BeaconsClient.kt:246) E/AndroidRuntime(15227): at org.altbeacon.beacon.BeaconManager.unbind(BeaconManager.java:453) E/AndroidRuntime(15227): at io.intheloup.beacons.logic.BeaconsClient.unbind(BeaconsClient.kt:61) E/AndroidRuntime(15227): at io.intheloup.beacons.BeaconsPlugin$1.onActivityDestroyed(BeaconsPlugin.kt:35) E/AndroidRuntime(15227): at android.app.Application.dispatchActivityDestroyed(Application.java:275) E/AndroidRuntime(15227): at android.app.Activity.onDestroy(Activity.java:1883) E/AndroidRuntime(15227): at android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:382) E/AndroidRuntime(15227): at android.app.Activity.performDestroy(Activity.java:7130) E/AndroidRuntime(15227): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1171) E/AndroidRuntime(15227): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5117) E/AndroidRuntime(15227): ... 9 more

    I have Google sign in package, and when I try to log in in my physical device, this gives me an error. while on emulator, it doesnt, because emulators don't have bluetooth.

    References to this Issue >> https://github.com/AltBeacon/android-beacon-library/issues/139

    opened by vinceramcesoliveros 2
  • App crashes when checking permissions

    App crashes when checking permissions

    App crashes when Beacons.checkStatus is called only when Location Permission is set to "when in use" on device.

    Beacons.checkStatus(permission: new LocationPermission(ios: LocationPermissionIOS.always));

    When Location Permission is set to "Always" or "Never" the call works fine.

    opened by adamfuller 2
  • Stop ranging / monitoring?

    Stop ranging / monitoring?

    Does cancelling a subscription automatically stop the ranging and monitoring on the device (i.e. call stopMonitoringForRegion / stopRangingForRegion)?

    Or is there another way to do this?

    Thanks!

    question 
    opened by AndrewPetrovics 2
  • How to stop ranging?

    How to stop ranging?

    Hi,

    I could not find a method to call to stop ranging beacons. There's a stopMonitoring method. Could anyone kindly tell me how to programmatically stop ranging beacons after calling Beacons.ranging().

    Thanks,

    opened by oaansari 0
  • Android crashes when monitoring background events

    Android crashes when monitoring background events

    Tested with the example project.

    When an enter event is triggered while the app is in the background (still running, not terminated) the app crashes with the following error in the console

    E/flutter ( 2680): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
    E/flutter ( 2680): 'file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart': Failed assertion: line 161 pos 16: 'false': cannot parse json to MonitoringState: enter
    E/flutter ( 2680): #0      _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:37:39)
    E/flutter ( 2680): #1      _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:33:5)
    E/flutter ( 2680): #2      _JsonCodec.monitoringStateFromJson (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart)
    E/flutter ( 2680): #3      _JsonCodec.monitoringResultFromJson (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart:96:32)
    E/flutter ( 2680): #4      _Codec.decodeMonitoringResult (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart:14:18)
    E/flutter ( 2680): #5      _Channels.monitoring.<anonymous closure> (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/channel.dart:54:21)
    E/flutter ( 2680): #6      _MapStream._handleData (dart:async/stream_pipe.dart:227:21)
    E/flutter ( 2680): #7      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:164:13)
    E/flutter ( 2680): #8      _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
    E/flutter ( 2680): #9      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330:11)
    E/flutter ( 2680): #10     _DelayedData.perform (dart:async/stream_impl.dart:578:14)
    E/flutter ( 2680): #11     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:694:11)
    E/flutter ( 2680): #12     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:654:7)
    E/flutter ( 2680): #13     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
    E/flutter ( 2680): #14     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
    E/flutter ( 2680): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
    E/flutter ( 2680): 'file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart': Failed assertion: line 161 pos 16: 'false': cannot parse json to MonitoringState: enter
    E/flutter ( 2680): #0      _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:37:39)
    E/flutter ( 2680): #1      _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:33:5)
    E/flutter ( 2680): #2      _JsonCodec.monitoringStateFromJson (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart)
    E/flutter ( 2680): #3      _JsonCodec.monitoringResultFromJson (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart:96:32)
    E/flutter ( 2680): #4      _Codec.decodeMonitoringResult (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/codec.dart:14:18)
    E/flutter ( 2680): #5      _Channels.monitoring.<anonymous closure> (file:///Users/alfuller/development/flutter/.pub-cache/hosted/pub.dartlang.org/beacons-0.2.1/lib/channel/channel.dart:54:21)
    E/flutter ( 2680): #6      _MapStream._handleData (dart:async/stream_pipe.dart:227:21)
    E/flutter ( 2680): #7      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:164:13)
    E/flutter ( 2680): #8      _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
    E/flutter ( 2680): #9      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330:11)
    E/flutter ( 2680): #10     _DelayedData.perform (dart:async/stream_impl.dart:578:14)
    E/flutter ( 2680): #11     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:694:11)
    E/flutter ( 2680): #12     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:654:7)
    E/flutter ( 2680): #13     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
    E/flutter ( 2680): #14     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
    I/flutter ( 5830): monitoring: {"data":"enter","isSuccessful":true,"region":{"identifier":"test","ids":["d9407f30-f5f8-466e-aff9-25556b57fe6d"]}}```
    
    My Device:
    Samsung Galaxy S7
    Android 7.0
    bug 
    opened by adamfuller 0
  • Need help (informations)! :)

    Need help (informations)! :)

    Hello,

    can you help me and explain me with a little words what exaclty is this package ? Is an app or is a plugin that I can use in my app ?

    I have some beacons devices and I'm trying to create an app that get notifications from beacons. Is this possible and how ?

    Thankyou very much!

    opened by PetrosPoll 0
  • Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.    > Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.70.      Required by:          project :app

    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. > Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.70. Required by: project :app

    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

    Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.70. Required by: project

    1. what is this issue? How can I correct it?
    2. why will I use this kotlin, if I am doing flutter dart language project?
    opened by Emily-li1999 0
  • Build failed

    Build failed

    FAILURE: Build failed with an exception.

    • What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'beacons' is using version 1.2.41.

    • Try:

    opened by sabrisoft 0
  • Can't run or build for Android

    Can't run or build for Android

    (master) ➜ flutter build appbundle 035fef9 Waiting for another flutter command to release the startup lock...

    FAILURE: Build failed with an exception.

    • What went wrong:
      The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version:
      project ':beacons' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41
    opened by plamenGo 0
  • Start Tracking is crashing the example application

    Start Tracking is crashing the example application

    E/AndroidRuntime(32216): FATAL EXCEPTION: IntentService[BeaconIntentProcessor] E/AndroidRuntime(32216): Process: io.intheloup.beaconsexample, PID: 32216 E/AndroidRuntime(32216): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: IntentService[BeaconIntentProcessor] E/AndroidRuntime(32216): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:795) E/AndroidRuntime(32216): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:685) E/AndroidRuntime(32216): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:80) E/AndroidRuntime(32216): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:168) E/AndroidRuntime(32216): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:117) E/AndroidRuntime(32216): at io.intheloup.streamschannel.StreamsChannel$IncomingStreamRequestHandler$EventSinkImplementation.success(StreamsChannel.java:153) E/AndroidRuntime(32216): at io.intheloup.beacons.channel.Channels$Handler$onListen$1.invoke(Channels.kt:88) E/AndroidRuntime(32216): at io.intheloup.beacons.channel.Channels$Handler$onListen$1.invoke(Channels.kt:80) E/AndroidRuntime(32216): at io.intheloup.beacons.logic.BeaconsClient.didRangeBeaconsInRegion(BeaconsClient.kt:218) E/AndroidRuntime(32216): at org.altbeacon.beacon.IntentHandler.convertIntentsToCallbacks(IntentHandler.java:49) E/AndroidRuntime(32216): at org.altbeacon.beacon.BeaconIntentProcessor.onHandleIntent(BeaconIntentProcessor.java:61) E/AndroidRuntime(32216): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) E/AndroidRuntime(32216): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(32216): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime(32216): at android.os.HandlerThread.run(HandlerThread.java:61) I/AndroidRuntime(32216): To Report FATAL to activityManagerService D/beacons monitoring(32216): detach foreground notifier D/beacons client(32216): stop Ranging (inBackground:false) for region: test I/BeaconService(32216): stop ranging received I/AndroidRuntime(32216): Finished reporting FATAL to activityManagerService I/Process (32216): Sending signal. PID: 32216 SIG: 9 Lost connection to device. I/Kernel (32216): [16622.359851]Mali<2>: I/Kernel (32216): Session has ended I/Kernel (32216): [16622.359910] (3)[32434:SendFrameDataTa][ION]warning: release handle @ client destory: handle=d1300bc0, buf=ddbf0d80, ref=7, size=2359296, kmap=0

    opened by vikramkapoor 0
  • Error: Caused by: java.lang.ClassNotFoundException: Didn't find class

    Error: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager"

    E/AndroidRuntime(25157): FATAL EXCEPTION: main E/AndroidRuntime(25157): Process: com.flutterbeaconexample, PID: 25157 E/AndroidRuntime(25157): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager; E/AndroidRuntime(25157): at org.altbeacon.beacon.BeaconLocalBroadcastProcessor.unregister(BeaconLocalBroadcastProcessor.java:82) E/AndroidRuntime(25157): at org.altbeacon.beacon.BeaconLocalBroadcastProcessor.register(BeaconLocalBroadcastProcessor.java:74) E/AndroidRuntime(25157): at org.altbeacon.beacon.service.BeaconService.ensureNotificationProcessorSetup(BeaconService.java:257) E/AndroidRuntime(25157): at org.altbeacon.beacon.service.BeaconService.onCreate(BeaconService.java:219) E/AndroidRuntime(25157): at android.app.ActivityThread.handleCreateService(ActivityThread.java:3534) E/AndroidRuntime(25157): at android.app.ActivityThread.-wrap6(ActivityThread.java) E/AndroidRuntime(25157): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1732) E/AndroidRuntime(25157): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(25157): at android.os.Looper.loop(Looper.java:154) E/AndroidRuntime(25157): at android.app.ActivityThread.main(ActivityThread.java:6776) E/AndroidRuntime(25157): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(25157): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496) E/AndroidRuntime(25157): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386) E/AndroidRuntime(25157): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/com.flutterbeaconexample-2/base.apk"],nativeLibraryDirectories=[/data/app/com.flutterbeaconexample-2/lib/arm, /data/app/com.flutterbeaconexample-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] E/AndroidRuntime(25157): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) E/AndroidRuntime(25157): at java.lang.ClassLoader.loadClass(ClassLoader.java:380) E/AndroidRuntime(25157): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) E/AndroidRuntime(25157): ... 13 more Lost connection to device.

    opened by DatHoang95 1
Releases(v0.3.0)
Owner
Loup
Loup
Flutter plugin for accessing the NFC features on Android and iOS.

nfc_manager Flutter plugin for accessing the NFC features on Android and iOS. Note: This plugin depends on NFCTagReaderSession (requires iOS 13.0 or l

null 126 Jan 1, 2023
Ready for Building Production-Ready Healthcare/ Doctor Consult Android and iOS app UI using Flutter.

Production-Ready Doctor Consultant App - Flutter UI Watch it on YouTube Packages we are using: flutter_svg: link Complete Source code (Patreon) In thi

Abu Anwar 211 Jan 1, 2023
ESC/POS (thermal, receipt) printing for Flutter & Dart (Android/iOS)

esc_pos_bluetooth The library allows to print receipts using a Bluetooth printer. For WiFi/Ethernet printers, use esc_pos_printer library. TODO (PRs a

Andrey 175 Jan 6, 2023
This Android/IOS application intends to help users to get an early notification for slot availability for Covid19 vaccination.

Cowin Slot Reminder Objective: This Android/IOS application intends to help users to get an early notification for slot availability for Covid19 vacci

null 6 Oct 7, 2022
iOS App to Record Daily Sun Intake

Why Suncheck 당신은 하루에 해를 얼마나 보나요? 코시국에 더욱 우울하거나 무기력한 건 햇살을 충분히 받지 못해서 일 수도 있어요. 매일 단 15분의 햇살만으로 우리 뇌에서는 우울증을 예방할 수 있을 만큼의 세로토닌이 분비됩니다. 만약 하루 동안 내가 얼마나

Sohee Kim 14 Oct 18, 2022
Bluetooth plugin for Flutter

Introduction FlutterBlue is a bluetooth plugin for Flutter, a new app SDK to help developers build modern multi-platform apps. Alpha version This libr

Paul DeMarco 2.2k Jan 5, 2023
A Flutter plugin for turning your device into a beacon.

Beacon Broadcast plugin for Flutter A Flutter plugin for turning your device into a beacon. Usage To use this plugin, add beacon_broadcast as a depend

Paulina Szklarska 75 Dec 14, 2022
Using Bluetooth plugin in Flutter (flutter_bluetooth_serial)

Flutter Bluetooth NOTE: This is the updated version of the app (using flutter_bluetooth_serial 0.2.2). This version has much fewer bugs and provides a

Souvik Biswas 179 Nov 22, 2022
null 5 Nov 21, 2022
Vernet - Network Analyzer and Monitoring Tool

Vernet Vernet - Network Analyzer and Monitoring Tool Features Shows Wi-Fi details Scans for devices(or hosts) on network Scans for open ports of targe

null 109 Dec 28, 2022
I have created app to connect printer with bluetooth. And I already fix library bugs

flutter_bluetooth_printer A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to ge

Bounphone KOSADA 1 May 11, 2022
Source code and instructions for do-it-yourself projects.

Ammolytics Projects Source code and instructions for do-it-yourself projects. Projects Open Trickler is a Do-It-Yourself, mobile-controlled powder tri

Ammolytics 39 Nov 15, 2022
Flutter library that handles BLE operations for multiple devices.

Flutter reactive BLE library Flutter library that handles BLE operations for multiple devices. Usage The reactive BLE lib supports the following: BLE

Philips Hue 473 Jan 4, 2023
FlutterBleLib - A library for all your Bluetooth Low Energy needs in Flutter.

FlutterBleLib A library for all your Bluetooth Low Energy needs in Flutter. Internally utilises Polidea's MultiPlatformBleAdapter, which runs on RxAnd

null 4 Jun 10, 2022
Bluetooth Low Energy library for Flutter with support for simulating peripherals

FlutterBleLib A library for all your Bluetooth Low Energy needs in Flutter. Internally utilises Polidea's MultiPlatformBleAdapter, which runs on RxAnd

intent 509 Jan 3, 2023
A Flutter Template to communicate with an esp32 over bluetooth

Flutter Esp32 Bluetooth Template Changes in android/ [1 if you take the code to an other project, 2 still nessesarely]: Change minSdkVersion from 16 t

0x4d/Martin Loretz 23 Dec 20, 2022
This flutter app will help you to connect to Bluetooth Devices (like, HC-05)

Flutter Bluetooth NOTE: This is the updated version of the app (using flutter_bluetooth_serial 0.2.2). This version has much fewer bugs and provides a

Riyad Al-Ali 1 Jun 5, 2022
Flutter basic implementation for Classical Bluetooth (only RFCOMM for now)

flutter_bluetooth_serial Flutter basic implementation for Classical Bluetooth (only RFCOMM for now). Features The first goal of this project, started

null 1 Nov 7, 2022
Position calculation and beacons scanning, using Dart language with Flutter Framework.

BeaconLocation A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started i

Dimitris Motsios 0 Dec 29, 2021
WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

WooSignal 314 Jan 9, 2023