Skip to content

Commit

Permalink
update v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
alann-maulana committed Aug 21, 2019
1 parent 1d87e14 commit 9f45362
Show file tree
Hide file tree
Showing 4,930 changed files with 1,050,519 additions and 1,092 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
206 changes: 84 additions & 122 deletions .idea/workspace.xml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.2.3]

* Update gradle build to latest version
* Update stop

## [0.2.2]

* Update gradle to latest version
Expand Down
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add to pubspec.yaml:

```yaml
dependencies:
flutter_beacon: ^0.2.2
flutter_beacon: ^0.2.3
```
### Setup specific for Android
Expand Down Expand Up @@ -65,7 +65,7 @@ Ranging APIs are designed as reactive streams.
```dart
try {
await flutterBeacon.initializeScanning;
} on PlatformException {
} on PlatformException catch(e) {
// library failed to initialize, check code and message
}
```
Expand All @@ -84,10 +84,37 @@ if (Platform.isIOS) {
regions.add(Region(identifier: 'com.beacon'));
}
flutterBeacon.ranging(regions).listen((RangingResult result) {
// to start ranging beacons
_streamRanging = flutterBeacon.ranging(regions).listen((RangingResult result) {
// result contains a region and list of beacons found
// list can be empty if no matching beacons were found in range
});
// to stop ranging beacons
_streamRanging.cancel();
```

### Monitoring beacons

```dart
final regions = <Region>[];
if (Platform.isIOS) {
regions.add(Region(
identifier: 'Apple Airlocate',
proximityUUID: 'E2C56DB5-DFFB-48D2-B060-D0F5A71096E0'));
} else {
// android platform, it can ranging out of beacon that filter all of Proximity UUID
regions.add(Region(identifier: 'com.beacon'));
}
// to start monitoring beacons
_streamMonitoring = flutterBeacon.monitoring(regions).listen((MonitoringResult result) {
// result contains a region, event type and event state
});
// to stop monitoring beacons
_streamMonitoring.cancel();
```

## Under the hood
Expand All @@ -97,7 +124,7 @@ flutterBeacon.ranging(regions).listen((RangingResult result) {

# Author

Flutter Beacon plugin is developed by Alann Maulana. You can contact me at <alann.maulana@outlook.com>.
Flutter Beacon plugin is developed by Alann Maulana. You can contact me at <kangmas.alan@gmail.com>.


## License
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.android.tools.build:gradle:3.4.2'
}
}
rootProject.allprojects {
Expand Down
18 changes: 18 additions & 0 deletions android/src/main/java/com/flutterbeacon/FlutterBeaconPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ private void startRanging() {
}

private void stopRanging() {
if (regionRanging != null && !regionRanging.isEmpty()) {
try {
for (Region region : regionRanging) {
beaconManager.stopRangingBeaconsInRegion(region);
FlutterBeaconPlugin.this.beaconManager.removeRangeNotifier(rangeNotifier);
}
} catch (RemoteException ignored) {
}
}
this.eventSinkRanging = null;
}

Expand Down Expand Up @@ -296,6 +305,15 @@ private void startMonitoring() {
}

private void stopMonitoring() {
if (regionMonitoring != null && !regionMonitoring.isEmpty()) {
try {
for (Region region : regionMonitoring) {
beaconManager.stopMonitoringBeaconsInRegion(region);
FlutterBeaconPlugin.this.beaconManager.removeMonitorNotifier(monitorNotifier);
}
} catch (RemoteException ignored) {
}
}
this.eventSinkMonitoring = null;
beaconManager.unbind(beaconConsumer);
}
Expand Down
41 changes: 35 additions & 6 deletions doc/api/__404error.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="made with love by dartdoc 0.24.1">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
<meta name="generator" content="made with love by dartdoc 0.28.2">
<meta name="description" content="flutter_beacon API docs, for the Dart programming language.">
<title>flutter_beacon - Dart API docs</title>

<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="static-assets/github.css">
<link rel="stylesheet" href="static-assets/styles.css">
<link rel="icon" href="static-assets/favicon.png">

</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
<button id="sidenav-left-toggle" type="button">&nbsp;</button>
<ol class="breadcrumbs gt-separated dark hidden-xs">
<li><a href="https://github.com/alann-maulana/flutter_beacon">flutter_beacon package</a></li>
</ol>
Expand All @@ -31,15 +33,38 @@

<main>

<div class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
<div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
<header id="header-search-sidebar" class="hidden-l">
<form class="search-sidebar" role="search">
<input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
</form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
<li><a href="https://github.com/alann-maulana/flutter_beacon">flutter_beacon package</a></li>
</ol>

<h5><span class="package-name">flutter_beacon</span> <span class="package-kind">package</span></h5>
<ol>
<li class="section-title">Libraries</li>
<li><a href="flutter_beacon/flutter_beacon-library.html">flutter_beacon</a></li>
<li class="section-title">Dart</li>
<li><a href="dart-ui/dart-ui-library.html">dart:ui</a></li>
<li class="section-subtitle">Core</li>
<li class="section-subitem"><a href="dart-async/dart-async-library.html">dart:async</a></li>
<li class="section-subitem"><a href="dart-collection/dart-collection-library.html">dart:collection</a></li>
<li class="section-subitem"><a href="dart-convert/dart-convert-library.html">dart:convert</a></li>
<li class="section-subitem"><a href="dart-core/dart-core-library.html">dart:core</a></li>
<li class="section-subitem"><a href="dart-developer/dart-developer-library.html">dart:developer</a></li>
<li class="section-subitem"><a href="dart-math/dart-math-library.html">dart:math</a></li>
<li class="section-subitem"><a href="dart-typed_data/dart-typed_data-library.html">dart:typed_data</a></li>
<li class="section-subtitle">VM</li>
<li class="section-subitem"><a href="dart-io/dart-io-library.html">dart:io</a></li>
<li class="section-subitem"><a href="dart-isolate/dart-isolate-library.html">dart:isolate</a></li>
</ol>
</div>

<div class="col-xs-12 col-sm-9 col-md-8 main-content">
<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
<h1>404: Something's gone wrong :-(</h1>

<section class="desc">
Expand All @@ -54,13 +79,17 @@ <h1>404: Something's gone wrong :-(</h1>
</section>
</div> <!-- /.main-content -->

<div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
</div>

</main>

<footer>
<span class="no-break">
flutter_beacon 0.2.1
flutter_beacon 0.2.3
</span>


</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
Expand Down
84 changes: 83 additions & 1 deletion doc/api/categories.json
Original file line number Diff line number Diff line change
@@ -1 +1,83 @@
[]
[
{
"name": "dart:async",
"qualifiedName": "dart:async",
"href": "dart-async/dart-async-library.html",
"type": "library",
"categories": [
"Core"
]
},
{
"name": "dart:collection",
"qualifiedName": "dart:collection",
"href": "dart-collection/dart-collection-library.html",
"type": "library",
"categories": [
"Core"
]
},
{
"name": "dart:convert",
"qualifiedName": "dart:convert",
"href": "dart-convert/dart-convert-library.html",
"type": "library",
"categories": [
"Core"
]
},
{
"name": "dart:core",
"qualifiedName": "dart:core",
"href": "dart-core/dart-core-library.html",
"type": "library",
"categories": [
"Core"
]
},
{
"name": "dart:developer",
"qualifiedName": "dart:developer",
"href": "dart-developer/dart-developer-library.html",
"type": "library",
"categories": [
"Core"
]
},
{
"name": "dart:io",
"qualifiedName": "dart:io",
"href": "dart-io/dart-io-library.html",
"type": "library",
"categories": [
"VM"
]
},
{
"name": "dart:isolate",
"qualifiedName": "dart:isolate",
"href": "dart-isolate/dart-isolate-library.html",
"type": "library",
"categories": [
"VM"
]
},
{
"name": "dart:math",
"qualifiedName": "dart:math",
"href": "dart-math/dart-math-library.html",
"type": "library",
"categories": [
"Core"
]
},
{
"name": "dart:typed_data",
"qualifiedName": "dart:typed_data",
"href": "dart-typed_data/dart-typed_data-library.html",
"type": "library",
"categories": [
"Core"
]
}
]
Loading

0 comments on commit 9f45362

Please sign in to comment.