Last active
January 20, 2016 13:25
-
-
Save phi-lira/db8191fdae3873291d56 to your computer and use it in GitHub Desktop.
Mali Graphics Debugger Activity. It extends UnityNativePlayerActivity and loads MGD library in order to connect MGD to Unity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.arm.mgdactivity" android:versionName="1.0.0" android:versionCode="1"> | |
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" /> | |
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:debuggable="false"> | |
<activity android:name="com.arm.mgdactivity.MGDNativeActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:configChanges="screenSize|orientation|keyboardHidden|keyboard"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> | |
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="21" /> | |
<uses-feature android:glEsVersion="0x00030000" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.CAMERA" /> | |
</application> | |
</manifest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// replace package name with your bundle identifier | |
package com.arm.mgdactivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
public class MGDNativeActivity extends UnityPlayerNativeActivity | |
{ | |
@Override protected void onCreate (Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
try { | |
System.loadLibrary("MGD"); | |
} | |
catch( UnsatisfiedLinkError e ) { | |
// Feel free to remove this log message. | |
Log.i("MGD", "libMGD.so not loaded."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment