@capacitor/android 3.3.1 → 3.3.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.3.2](https://github.com/ionic-team/capacitor/compare/3.3.1...3.3.2) (2021-11-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **android:** Allow web geolocation if only COARSE_LOCATION is granted ([#5236](https://github.com/ionic-team/capacitor/issues/5236)) ([bc7b24e](https://github.com/ionic-team/capacitor/commit/bc7b24e9b58b194b32b750c5816c8d8ef180834a))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.3.1](https://github.com/ionic-team/capacitor/compare/3.3.0...3.3.1) (2021-11-05)
7
18
 
8
19
  **Note:** Version bump only for package @capacitor/android
@@ -7,6 +7,7 @@ import android.app.AlertDialog;
7
7
  import android.content.ActivityNotFoundException;
8
8
  import android.content.Intent;
9
9
  import android.net.Uri;
10
+ import android.os.Build;
10
11
  import android.os.Environment;
11
12
  import android.provider.MediaStore;
12
13
  import android.view.View;
@@ -280,7 +281,13 @@ public class BridgeWebChromeClient extends WebChromeClient {
280
281
  if (isGranted) {
281
282
  callback.invoke(origin, true, false);
282
283
  } else {
283
- callback.invoke(origin, false, false);
284
+ final String[] coarsePermission = { Manifest.permission.ACCESS_COARSE_LOCATION };
285
+ // TODO replace with Build.VERSION_CODES.S once we target SDK 31
286
+ if (Build.VERSION.SDK_INT >= 31 && PermissionHelper.hasPermissions(bridge.getContext(), coarsePermission)) {
287
+ callback.invoke(origin, true, false);
288
+ } else {
289
+ callback.invoke(origin, false, false);
290
+ }
284
291
  }
285
292
  };
286
293
  permissionLauncher.launch(geoPermissions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/android",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "8ff7434e9b775e6acb05efae23771ee1b18e26c9"
30
+ "gitHead": "3158cd9a293ac79de801c833bb937d2df54e0d96"
31
31
  }