We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core GuidesMap KitAndroid SDKApp DevelopmentPreparationsAdding Permissions

Adding Permissions

To call capabilities of HUAWEI Map Kit, you must apply for the following permissions for your app:

Collapse
Word wrap
Dark theme
Copy code
  1. <uses-permission android:name="android.permission.INTERNET"/>
  2. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  3. <uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA"/>

To obtain the current device location, you need to add the following permissions in the AndroidManifest file. In Android 6.0 and later, you need to apply for these permissions dynamically.

Collapse
Word wrap
Dark theme
Copy code
  1. <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  2. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

This page may contain third-party content. For details, click here.
Search in Guides
Enter a keyword.