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

Bugfixes on Android iBeacon monitoring #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BeaconsPlugin(val registrar: Registrar) {
}

override fun onActivityDestroyed(activity: Activity) {
beaconClient.unbind()
// beaconClient.unbind()
permissionClient.unbind()
}

Expand Down
8 changes: 4 additions & 4 deletions lib/data/beacon_region.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class BeaconRegionIBeacon extends BeaconRegion {
BeaconRegionIBeacon({
@required String identifier,
@required String proximityUUID,
int major,
int minor,
String major,
String minor,
}) : super(
identifier: identifier,
ids: [],
Expand All @@ -44,7 +44,7 @@ class BeaconRegionIBeacon extends BeaconRegion {

String get proximityUUID => ids[0];

int get major => ids.length > 1 ? ids[1] : null;
String get major => ids.length > 1 ? ids[1] : null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this one on his example and it doesn't detect any beacons.
You're supposed to convert the Major and Minor to int or decimal.
changing it to string will convert the ids to string.


int get minor => ids.length > 2 ? ids[2] : null;
String get minor => ids.length > 2 ? ids[2] : null;
}