react-native-maps 1.1.0-beta.1 → 1.1.0-beta.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.
@@ -45,9 +45,9 @@ repositories {
45
45
  dependencies {
46
46
  def work_version = safeExtGet('targetSdkVersion', 27) < 31 ? "2.5.0" : "2.7.1"
47
47
  implementation 'com.facebook.react:react-native:+'
48
- implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '18.0.1')}"
48
+ implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '18.1.0')}"
49
49
  implementation "com.google.android.gms:play-services-maps:${safeExtGet('playServicesVersion', '18.0.2')}"
50
- implementation "com.google.android.gms:play-services-location:19.0.1"
50
+ implementation "com.google.android.gms:play-services-location:20.0.0"
51
51
  implementation 'com.google.maps.android:android-maps-utils:0.5'
52
52
  implementation "androidx.work:work-runtime:$work_version"
53
53
  }
@@ -16,7 +16,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
16
16
  import com.facebook.react.uimanager.ViewGroupManager;
17
17
  import com.facebook.react.uimanager.annotations.ReactProp;
18
18
  import com.facebook.react.uimanager.events.RCTEventEmitter;
19
- import com.google.android.gms.location.LocationRequest;
19
+ import com.google.android.gms.location.Priority;
20
20
  import com.google.android.gms.maps.GoogleMap;
21
21
  import com.google.android.gms.maps.GoogleMapOptions;
22
22
  import com.google.android.gms.maps.model.LatLng;
@@ -52,10 +52,10 @@ public class AirMapManager extends ViewGroupManager<AirMapView> {
52
52
  );
53
53
 
54
54
  private final Map<String, Integer> MY_LOCATION_PRIORITY = MapBuilder.of(
55
- "balanced", LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY,
56
- "high", LocationRequest.PRIORITY_HIGH_ACCURACY,
57
- "low", LocationRequest.PRIORITY_LOW_POWER,
58
- "passive", LocationRequest.PRIORITY_NO_POWER
55
+ "balanced", Priority.PRIORITY_BALANCED_POWER_ACCURACY,
56
+ "high", Priority.PRIORITY_HIGH_ACCURACY,
57
+ "low", Priority.PRIORITY_LOW_POWER,
58
+ "passive", Priority.PRIORITY_PASSIVE
59
59
  );
60
60
 
61
61
  private final ReactApplicationContext appContext;
@@ -1,5 +1,6 @@
1
1
  package com.airbnb.android.react.maps;
2
2
 
3
+ import android.annotation.SuppressLint;
3
4
  import android.content.Context;
4
5
  import android.location.Location;
5
6
  import android.os.Looper;
@@ -9,6 +10,7 @@ import com.google.android.gms.location.LocationCallback;
9
10
  import com.google.android.gms.location.LocationRequest;
10
11
  import com.google.android.gms.location.LocationResult;
11
12
  import com.google.android.gms.location.LocationServices;
13
+ import com.google.android.gms.location.Priority;
12
14
  import com.google.android.gms.maps.LocationSource;
13
15
  import com.google.android.gms.tasks.OnSuccessListener;
14
16
 
@@ -24,7 +26,7 @@ public class FusedLocationSource implements LocationSource {
24
26
  fusedLocationClientProviderClient =
25
27
  LocationServices.getFusedLocationProviderClient(context);
26
28
  locationRequest = LocationRequest.create();
27
- locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
29
+ locationRequest.setPriority(Priority.PRIORITY_HIGH_ACCURACY);
28
30
  locationRequest.setInterval(5000);
29
31
  }
30
32
 
@@ -40,6 +42,7 @@ public class FusedLocationSource implements LocationSource {
40
42
  locationRequest.setFastestInterval(fastestInterval);
41
43
  }
42
44
 
45
+ @SuppressLint("MissingPermission")
43
46
  @Override
44
47
  public void activate(final OnLocationChangedListener onLocationChangedListener) {
45
48
  try {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "lib/index.js",
6
6
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
7
7
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
8
- "version": "1.1.0-beta.1",
8
+ "version": "1.1.0-beta.2",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",