Android Ultimate Plugin Tutorial part 1 – Testing Demo

Hi Guys, for those who bought our Android Ultimate Plugin we are very thankful and Happy to further extend our support here’s a tutorial on how to used our plugin.

If you want video tutorial just watch this

 

Or if you want to read just follow this steps below

 

1. Open Unity3d  and create a new project

2. On Unity3d menu select File/build settings/ select Android and switch platform

3.  On Unity3d menu go to  Assets/Import Package/Custom Package and select our plugin if you have the .unitypackagefile or download our plugin via window/ Asset Store

Note:

before doing step 4 make sure you don’t have an existing Android Manifest file on “Assets/Plugins/Android” to avoid over writing your own Android Manifest with our sample Android Manifest file.

if you have an existing manifest just add, the required permission on your Android Manifest to avoid app crashed or error.

for example if you want to use vibrator feature just add this permission on your existing Android Manifest file.

<uses-permission android:name=”android.permission.VIBRATE”/>

Remember:
most of the features on Android required a permission before you can use them.

4. once you downloaded or imported our plugin files, go to “Assets/Plugins/Android/SampleAndroidManifest” and copy Android manifest and paste it on “Assets/Plugins/Android

Here’s our sample Android Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<uses-sdk android:minSdkVersion="16" />

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

<!--for flash light-->
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera.flash" />
<!--for flash light-->

<!--Vibration-->
<uses-permission android:name="android.permission.VIBRATE"/>
<!--Vibration-->

<!--RecordAudio also used by SpeechRecognizer-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!--RecordAudio-->

<!--for GPS-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!--for GPS-->

<!--BlueTooth-->
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<!--BlueTooth-->

<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<!--Google indexing-->
<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="https"
android:host="play.google.com"
android:pathPrefix="/store/apps/details?id=com.gigadrillgames.androidultimateplugin"/>
</intent-filter>
<!-- Accept adb data flag -->
<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="https"
android:host="play.google.com/store/apps/details?id=com.gigadrillgames.androidultimateplugin"/>
</intent-filter>
<!--Google indexing-->

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

<!--for local notification  -->
<receiver android:name="com.gigadrillgames.androidplugin.notification.NotificationPublisher" />
<!--for local notification  -->
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>

5. To test on Unity3d menu select File/build settings/Player Settings then change Bundle Identifier with your Bundle Indentifier ex. “com.myawesomestudio.bestgame” then build and run on your actual Android Device to see the Android Ultimate Plugin in Action.

Note: the most common error is missing an Android Manifest file, please make sure you have an Android Manifest file inside “Assets/Plugins/Android” directory, without this your application will not work or will crash or will stop.

For more questions or comments or suggestions just email us at gigadrillgames@gmail.com

Leave a Reply

Your email address will not be published. Required fields are marked *

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