Skip to content

Commit 13a5efd

Browse files
committed
updated to support android 10 and fixed some bugs
1 parent 142831a commit 13a5efd

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

README.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,10 @@ allprojects {
9393

9494
**x.x.x** can be replaced with google play service version your app is using [versions information available here](https://developers.google.com/android/guides/releases)
9595

96-
## for non androidX
97-
```gradle
98-
dependencies {
99-
implementation 'com.github.JobGetabu:DroidLocation:v1.0'
100-
implementation "com.google.android.gms:play-services-location:x.x.x"
101-
}
102-
```
103-
10496
## for androidX
10597
```gradle
10698
dependencies {
107-
implementation 'com.github.JobGetabu:DroidLocation:v3.0.0'
99+
implementation 'com.github.JobGetabu:DroidLocation:TAG'
108100
implementation "com.google.android.gms:play-services-location:x.x.x"
109101
}
110102
```

droidLocationLibrary/src/main/java/ax/synt/droidlocation/DroidLocationDelegate.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void doWeStartLocationService(int resultCode) {
199199
* @param {requestcode}
200200
* use -1 if no requestcode is available
201201
* */
202-
void showLocationSettingDialog(int requestcode) {
202+
void showLocationSettingDialog(final int requestcode) {
203203

204204
//requestcode = (requestcode == -1) ? ENABLE_LOCATION_SERVICES_REQUEST : requestcode;
205205

@@ -232,7 +232,7 @@ public void onResult(LocationSettingsResult result) {
232232
// requests here.
233233

234234
if (isLocationEnabled()) {
235-
requestLocation(mLocationRequest, mLocationFetchMode);
235+
requestLocation(mLocationRequest, mLocationFetchMode, requestcode);
236236
droidLocationListener.onLocationProviderEnabled();
237237
} else
238238
droidLocationListener.onLocationProviderDisabled();
@@ -324,7 +324,7 @@ void onCreate() {
324324
registerLocationBroadcastReceiver();
325325
}
326326

327-
/* void onActivityResult(int requestCode) {
327+
/* void onActivityResult(int requestCode) {
328328
switch (requestCode) {
329329
case ENABLE_LOCATION_SERVICES_REQUEST:
330330
if (isLocationEnabled()) {

0 commit comments

Comments
 (0)