diff options
| author | Cody Northrop <cnorthrop@google.com> | 2016-09-26 17:53:00 -0600 |
|---|---|---|
| committer | Cody Northrop <cnorthrop@google.com> | 2016-09-28 10:36:18 -0600 |
| commit | 9b4b8f604359c4c0eae45fe961dd4dbf9f899906 (patch) | |
| tree | 3020f934bbbd0c050c013930bba69f96cb3a1141 | |
| parent | be75457a2cebdaec0e61d3d60f63b636438807a9 (diff) | |
| download | usermoji-9b4b8f604359c4c0eae45fe961dd4dbf9f899906.tar.xz | |
demos: Add APK with layers to cube
| -rw-r--r-- | demos/android/cube-with-layers/AndroidManifest.xml | 27 | ||||
| -rw-r--r-- | demos/android/cube-with-layers/custom_rules.xml | 25 | ||||
| -rw-r--r-- | demos/android/cube-with-layers/res/values/strings.xml | 24 |
3 files changed, 76 insertions, 0 deletions
diff --git a/demos/android/cube-with-layers/AndroidManifest.xml b/demos/android/cube-with-layers/AndroidManifest.xml new file mode 100644 index 00000000..50ac9272 --- /dev/null +++ b/demos/android/cube-with-layers/AndroidManifest.xml @@ -0,0 +1,27 @@ +<?xml version="1.0"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.CubeWithLayers" android:versionCode="1" android:versionName="1.0">
+
+ <!-- Allow this app to read and write files (for use by tracing libraries). --> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.INTERNET"/> +
+ <!-- This is the platform API where NativeActivity was introduced. -->
+ <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23"/>
+
+ <!-- This .apk has no Java code itself, so set hasCode to false. -->
+ <application android:label="@string/app_name" android:hasCode="false" android:debuggable='true'>
+
+ <!-- Our activity is the built-in NativeActivity framework class.
+ This will take care of integrating with our NDK code. -->
+ <activity android:name="android.app.NativeActivity" android:label="@string/app_name" android:exported="true">
+ <!-- Tell NativeActivity the name of or .so -->
+ <meta-data android:name="android.app.lib_name" android:value="Cube"/>
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
diff --git a/demos/android/cube-with-layers/custom_rules.xml b/demos/android/cube-with-layers/custom_rules.xml new file mode 100644 index 00000000..ab517bfe --- /dev/null +++ b/demos/android/cube-with-layers/custom_rules.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="NativeActivity" default="help"> + +<property name="cubeWithLayersDir" location="../libs-with-layers" /> +<property name="cubeDir" location="../libs" /> +<property name="layersDir" location="../../../build-android/libs" /> + +<echo>CubeWithLayers: Creating libs-with-layers</echo> +<mkdir dir="${cubeWithLayersDir}"/> + +<echo>CubeWithLayers: Copying libs from demos/android</echo> +<copy todir="${cubeWithLayersDir}"> +<fileset dir="${cubeDir}"/> +</copy> + +<echo>CubeWithLayers: Copying layers from build-android</echo> +<copy todir="${cubeWithLayersDir}"> +<fileset dir="${layersDir}"/> +</copy> + +<!-- Point ndk-build at the libs-with-layers common dir --> +<echo>CubeWithLayers: Overriding native.libs.absolute.dir with ${cubeWithLayersDir}</echo> +<property name="native.libs.absolute.dir" location="${cubeWithLayersDir}" /> + +</project> diff --git a/demos/android/cube-with-layers/res/values/strings.xml b/demos/android/cube-with-layers/res/values/strings.xml new file mode 100644 index 00000000..bdf81e5b --- /dev/null +++ b/demos/android/cube-with-layers/res/values/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2013 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- This file contains resource definitions for displayed strings, allowing + them to be changed based on the locale and options. --> + +<resources> + <!-- Simple strings. --> + <string name="app_name">CubeWithLayers</string> + +</resources> |
