4

I am working an Android project that uses Google maps. The app is working perfectly in my Cell phone, having 5.1.1 Android version, because I used it for the development of the project, but the same app is not working in other cell phone (6.0.0 Android). In other cell phone Google Map is not updating. (Not going to current location). Why the Google Map is not updating in other cell phone?

Prompting this;

12-13 08:25:55.796 11170-11170/com.example.mapspractice1 W/f: Suppressed StrictMode policy violation: StrictModeDiskReadViolation

12-13 08:25:55.796 11170-11170/com.example.mapspractice1 W/f: Suppressed StrictMode policy violation: StrictModeDiskWriteViolation

12-13 08:25:55.939 11170-11458/com.example.mapspractice1 W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.

12-13 08:25:55.949 11170-11458/com.example.mapspractice1 I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:2

12-13 08:25:55.949 11170-11458/com.example.mapspractice1 I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 2

12-13 08:25:59.044 11170-11209/com.example.mapspractice1 V/FA: Inactivity, disconnecting from the service
user6750923
  • 469
  • 2
  • 11
  • 22

1 Answers1

4

I don't think the log warnings you see are relevant to the problem, they're just warnings, and I believe you can safely ignore them.

What might be related to not being able to get current location in Android M (6) is the new Runtime Permissions model. If you've set your android:targetSdkVersion to 23 or higher you need to explicitly ask for each permission you need from the user, in addition to putting it on AndroidManifest.

To check this, on an Android M device,

open the phone's Settings app > apps > find and select your app > permissions > enable "Location" permission.

It should now recognize the location in the app properly.

See this: https://developer.android.com/training/permissions/requesting.html on how to request permissions from your users in runtime.

marmor
  • 27,641
  • 11
  • 107
  • 150
  • Thanks Thanks and Thanks for telling me the reason. I tackled the poblem by `if (ActivityCompat.checkSelfPermission(getApplicationContext(),.........` method. No one was replying. After 40 views you came. Thanks a lot again. I have simple words; May God you. :) Now it is working fine. – user6750923 Dec 13 '16 at 08:18
  • 1
    glad it helped. You should mark the answer as accepted to mark the question as resolved, and help keep StackOverflow clean – marmor Dec 13 '16 at 08:25