Manifest Requirements

Starting from Version 5.0 Android Native will make modifications to the AndroidManifes depended on API you are using with the plugin.

When is Android Native modifying manifest? 

  • When Android Native editor window is opened (if plugin is installed and up to date)
  • After plugin installation / update
  • After user is enable / disable APIs

 

How to Enable or Disable plugin APIs?

There are 2 ways how you can do this.

1) By enabling / disabling entire lib.  The android native consists of a few jar libs. Using Android Naive Libs menu, you can choose what libs will be included to the Assets/Plugins folder and will be compiled with your project.

 

2) By enabling / disabling APIs.

Each lib can be expanded, so you will able to see what API it's including, and you will be able to enable / disable API.

 

Disabling Facebook OAuth API

Facebook API can be disabled only be removing FB SDK from the project, the action cannot be reversed, that's why there is the separate button for this:

 

Will Android Native harm my own changes in the manifest?

Nope. Plugin only removes data related to the plugin feature, everything else will stay the same. As for permission event, if plugin does not require some permission anymore, it will not remove it from your manifest. But it will be indicated under Application Permissions menu, which also gives you an ability to remove unused permissions. For example, if we disable Google Play Advanced Sing In and  Push Notifications APIs, here is what will be in the Application Permissions menu:

 

How to disable auto manifest managing?

You can disable it by unchecking Keep Android Manifest Clean option. 

 

Libs Manifest Requirements

Native Lib

<activity android:name="com.androidnative.AndroidNativeProxy" .......... >

Billing Lib

<activity android:name="com.androidnative.billing.core.AN_BillingProxyActivity" .......... />

Google Play Lib

<activity android:name="com.androidnative.gms.core.GooglePlaySupportActivity" ......... />

 

 

API's Manifest Requirements

Note: Features which are not included in this list, do not have any manifest requirements.

App Licensing

Permissions:

<uses-permission android:name="com.android.vending.CHECK_LICENSE" />

Netwrok Info

Permissions:

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Play Service API

Android Manifest:

<application>
.....
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />

Play Service Advanced Sign In API

Permissions:

<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" />

Google Cloud API

Android Manifest:

<application>
.....
<meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="@string/app_id" />
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />

Push Notifications API

Android Manifest:

<application>
.....
<receiver android:exported="true" android:name="com.androidnative.gcm.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" >
	<intent-filter>
		<action android:name="com.google.android.c2dm.intent.RECEIVE" />
		<category android:name="APP_BUNDLE_ID" />
	</intent-filter>
</receiver>
<service android:name="com.androidnative.gcm.GcmIntentService" />
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />
<permission android:name=" applicationPackage + ".permission.C2D_MESSAGE"" android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name=" applicationPackage + ".permission.C2D_MESSAGE"" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />

Google Mobile Ad API

Android Manifest:

<application>
.....
<activity>  //lauchner activity
 <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>

<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />

Local Notifications API

Android Manifest:

<application>
.....
<receiver android:name="com.androidnative.features.notifications.LocalNotificationReceiver"> </receiver>
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />

Analytics API

Permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

In App Purchases API

Permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />

Camera and Gallery API

Permissions:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

Facebook API

Android Manifest:

<application>
.....
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 395891937214418" />
<activity
       android:name="com.facebook.LoginActivity"
       android:label="@string/app_name"
       android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        
<activity android:name="com.facebook.unity.FBUnityLoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
</activity>
<activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true">
</activity>
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />

Twitter API

Android Manifest:

<application>
.....
<activity android:name="com.androidnative.features.social.common.SocialProxyActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar">
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="oauth" android:host="APP_BUNDLE_ID" />
      </intent-filter>
</activity>
.....
</application>

Permissions:

<uses-permission android:name="android.permission.INTERNET" />

Native Sharing, Instagram Sharing

Android Manifest:

<application>
.....
<activity android:name="com.androidnative.features.social.common.SocialProxyActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar">
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="oauth" android:host="APP_BUNDLE_ID" />
      </intent-filter>
</activity>
.....
</application>

Permissions:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />