Skip to content

Commit

Permalink
updated to support android 10 and fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
JobGetabu committed Nov 4, 2020
1 parent 142831a commit 13a5efd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,10 @@ allprojects {

**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)

## for non androidX
```gradle
dependencies {
implementation 'com.github.JobGetabu:DroidLocation:v1.0'
implementation "com.google.android.gms:play-services-location:x.x.x"
}
```

## for androidX
```gradle
dependencies {
implementation 'com.github.JobGetabu:DroidLocation:v3.0.0'
implementation 'com.github.JobGetabu:DroidLocation:TAG'
implementation "com.google.android.gms:play-services-location:x.x.x"
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void doWeStartLocationService(int resultCode) {
* @param {requestcode}
* use -1 if no requestcode is available
* */
void showLocationSettingDialog(int requestcode) {
void showLocationSettingDialog(final int requestcode) {

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

Expand Down Expand Up @@ -232,7 +232,7 @@ public void onResult(LocationSettingsResult result) {
// requests here.

if (isLocationEnabled()) {
requestLocation(mLocationRequest, mLocationFetchMode);
requestLocation(mLocationRequest, mLocationFetchMode, requestcode);
droidLocationListener.onLocationProviderEnabled();
} else
droidLocationListener.onLocationProviderDisabled();
Expand Down Expand Up @@ -324,7 +324,7 @@ void onCreate() {
registerLocationBroadcastReceiver();
}

/* void onActivityResult(int requestCode) {
/* void onActivityResult(int requestCode) {
switch (requestCode) {
case ENABLE_LOCATION_SERVICES_REQUEST:
if (isLocationEnabled()) {
Expand Down

0 comments on commit 13a5efd

Please sign in to comment.