Android required permissions

In Visual Studio 2015 if you checked same permissions on your project properties and when reopen it, your checks are disappeared, you have two ways:

  1. Is the manifest file marked as ‘read only’ in Windows Explorer? You have to select the Properties directory and un-tick ‘read only’ for the entire folder.
  2. Add manually in AndroidManifest.xml file same new rows:
    <?xml version="1.0" encoding="utf-8"?>
    
    <manifest xmlns:android="http://schemas.android.com/apk/res/android">
    
      <uses-sdk android:minSdkVersion="15" />
      <application android:label="$safename$">
        <meta-data android:name="com.google.android.maps.v2.API_KEY" 
                      android:value="yourcode" />
      </application>
    
      <uses-permission android:name="android.permission.INTERNET" />
      <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    
      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
      <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
      <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
      <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
      <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
      <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    
    </manifest>
    
    

Happy coding!

Leave a comment

Send a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.