- Home /
Android Plugins - embedding data into the .APK
I need to: Embed some data into my .APK that's readable by .java in the main activity's onCreate(), which is executing before Unity is up and running. Unfortunately, the data (some hashes) changes with every build, which means if I encode it into the plugin I have to rebuild the plugin prior to every Unity build.
It would really simplify my build scripts if, during the Unity build I could just embed some data into the APK that's reachable from Java-land without being pushed from Unity. E.g., if I could embed a res/xml file into the .apk, my java-side code could read the data there - and there would be no need to rebuild the plugin when the hash changes.
I didn't see anything in the plug-in's area about embedding android resource files, etc... Does anyone have anything that saves the day? Or am I doomed to write convolutely and hacky build server scripts that rebuild the plug-in, in the middle of a Unity build?
Your answer
Follow this Question
Related Questions
How to build Android app without resources mismatch? 0 Answers
AndroidJavaClass. Call returns null ptr. 1 Answer
CommandInvokationFailure: Unable to convert classes into dex format - Unity 1 Answer
Sound files not included in android APK 2 Answers
App in background still receive UnityPlayer.UnitySendMessage from Android plugin, normal ? 0 Answers