Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: webrtc/examples/unityplugin/ANDROID_INSTRUCTION

Issue 2993423002: Update android build instruction for webrtc unity plugin. (Closed)
Patch Set: misc Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/unityplugin/ANDROID_INSTRUCTION
diff --git a/webrtc/examples/unityplugin/ANDROID_INSTRUCTION b/webrtc/examples/unityplugin/ANDROID_INSTRUCTION
index d782e9423468cc97b8f06041a86079153cf8e44a..7f69faa8349665945d91d4a0ba10c2b96bf0cfa4 100644
--- a/webrtc/examples/unityplugin/ANDROID_INSTRUCTION
+++ b/webrtc/examples/unityplugin/ANDROID_INSTRUCTION
@@ -4,9 +4,9 @@ Instruction of Running webrtc_unity_plugin on Android Unity
Checkout WebRTC codebase: fetch --no-hooks webrtc_android
If you already have a checkout for linux, add target_os=”android” into .gclient file.
Run gclient sync
+ Modify files src/build/android/android_only_jni_exports.lst and src/build/android/android_only_explicit_jni_exports.lst to expose all functions. Namely, change "global" section to "*", and remove "local" section. Otherwise, Unity C# code will not be able to access the functions defined in the plugin. If you do this step after you create a build folder, you may have to clean and recreate the build folder.
Run gn args out/Android, and again set target_os=”android” in the args.gn
- Modify file src/build/android/android_only_jni_exports.lst, to expose all functions. Namely, change "global" section to "*", and remove "local" section. Otherwise, Unity C# code will not be able to access the functions defined in the plugin.
- Run ninja -C out/Android webrtc_unity_plugin
+ Run ninja -C out/Android webrtc_unity_plugin
2. On Linux machine, compile target libwebrtc_unity under webrtc checkout. This is the java code for webrtc to work on Android.
@@ -26,8 +26,12 @@ Instruction of Running webrtc_unity_plugin on Android Unity
}
#endif
-6. Compile the unity project into an APK, and decompile the apk using apktool you can download from internet. And copy the AndroidManifest.xml to the Assets/Plugins/Android folder, and add two lines:
- <uses-permission android:name=”android.permission.RECORD_AUDIO” />
- <uses-permission android:name=”android.permission.CAMERA” />
+6. Compile the unity project into an APK, and decompile the apk using apktool that you can download from https://ibotpeaches.github.io/Apktool/
+ Run apktool d apkname.apk.
+Then copy the AndroidManifest.xml in the decompiled folder to the Assets/Plugins/Android folder, and add two lines:
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
+ <uses-permission android:name="android.permission.CAMERA" />
The purpose of using apktool is to get a well-written android manifest xml file. If you know how to write manifest file from scratch, you can skip using apktool.
+
+7. Compile the unity project into an APK again and deploy it to an android device.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698