@capgo/capacitor-ibeacon 8.0.7 → 8.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -53,7 +53,7 @@ dependencies {
|
|
|
53
53
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
54
54
|
implementation project(':capacitor-android')
|
|
55
55
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
56
|
-
implementation 'org.altbeacon:android-beacon-library:2.21.
|
|
56
|
+
implementation 'org.altbeacon:android-beacon-library:2.21.2'
|
|
57
57
|
testImplementation "junit:junit:$junitVersion"
|
|
58
58
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
59
59
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -8,11 +8,13 @@ import android.content.pm.PackageManager;
|
|
|
8
8
|
import androidx.core.app.ActivityCompat;
|
|
9
9
|
import com.getcapacitor.JSArray;
|
|
10
10
|
import com.getcapacitor.JSObject;
|
|
11
|
+
import com.getcapacitor.PermissionState;
|
|
11
12
|
import com.getcapacitor.Plugin;
|
|
12
13
|
import com.getcapacitor.PluginCall;
|
|
13
14
|
import com.getcapacitor.PluginMethod;
|
|
14
15
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
15
16
|
import com.getcapacitor.annotation.Permission;
|
|
17
|
+
import com.getcapacitor.annotation.PermissionCallback;
|
|
16
18
|
import java.util.ArrayList;
|
|
17
19
|
import java.util.Collection;
|
|
18
20
|
import java.util.HashMap;
|
|
@@ -36,7 +38,7 @@ import org.altbeacon.beacon.Region;
|
|
|
36
38
|
)
|
|
37
39
|
public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
|
|
38
40
|
|
|
39
|
-
private final String pluginVersion = "8.0.
|
|
41
|
+
private final String pluginVersion = "8.0.9";
|
|
40
42
|
private BeaconManager beaconManager;
|
|
41
43
|
private Map<String, Region> monitoredRegions = new HashMap<>();
|
|
42
44
|
private Map<String, Region> rangedRegions = new HashMap<>();
|
|
@@ -228,6 +230,17 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
|
|
|
228
230
|
requestWhenInUseAuthorization(call);
|
|
229
231
|
}
|
|
230
232
|
|
|
233
|
+
@PermissionCallback
|
|
234
|
+
private void locationPermissionCallback(PluginCall call) {
|
|
235
|
+
JSObject ret = new JSObject();
|
|
236
|
+
if (getPermissionState("location") == PermissionState.GRANTED) {
|
|
237
|
+
ret.put("status", "authorized_when_in_use");
|
|
238
|
+
} else {
|
|
239
|
+
ret.put("status", "denied");
|
|
240
|
+
}
|
|
241
|
+
call.resolve(ret);
|
|
242
|
+
}
|
|
243
|
+
|
|
231
244
|
@PluginMethod
|
|
232
245
|
public void getAuthorizationStatus(PluginCall call) {
|
|
233
246
|
JSObject ret = new JSObject();
|
|
@@ -4,7 +4,7 @@ import CoreLocation
|
|
|
4
4
|
|
|
5
5
|
@objc(CapacitorIbeaconPlugin)
|
|
6
6
|
public class CapacitorIbeaconPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
7
|
-
private let pluginVersion: String = "8.0.
|
|
7
|
+
private let pluginVersion: String = "8.0.9"
|
|
8
8
|
public let identifier = "CapacitorIbeaconPlugin"
|
|
9
9
|
public let jsName = "CapacitorIbeacon"
|
|
10
10
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED