Use Google Maps API MapView without permission

你离开我真会死。 提交于 2019-12-02 04:37:31

Per the specify Android permissions section:

The following location permissions are recommended, but you can omit them if your application doesn't access the user's current location, either programmatically or by enabling the My Location layer.

The only case where it should request the permission is if you are calling setMyLocationEnabled(true).

If your just want to show a map with a marker, I'd suggest using the Google Maps Static Maps API. Using this you can display an image of the map with markers and lot of other maps option. You can then open the actual Google Maps when the user clicks on the image. This would require the internet permission though.

<uses-permission android:name="android.permission.INTERNET" /> 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!