- Home /
How to use Android Api in Unity
Hi I know that we can use android api in unity but could someone tell me how to build a java plugin that contains the method that calls the android api and how to call it from unity. And Thanks in advance.
If you want to call the api framework from unity, use the AndroidJavaClass/Object classes and the Call method to construct and call the java api.
Yeaah I know but I can't create the plugin I want a to know the steps of creating it and the way to implement it.
Answer by fafase · Aug 25, 2014 at 04:29 PM
Mark your project as library. In eclipse, it is in properties->android and tick is library.
Building the project will add a lib folder containing the jar file.
Create a plugin folder inside assets and an android folder inside of plugin. Drag the jar file in there.
That should be it.
The folder should be named Plugins/Android (and not plugin, as mentioned)
Your answer
Follow this Question
Related Questions
Problem reading sensor plugin, event won't trigger 2 Answers
Now that Unity 4.1.2 broke the Android plugin examples, what do you use to learn them? 1 Answer
UnityPlayerActivity vs. UnityPlayerNativeActivity 0 Answers
java android plugin worker thread ends up in Unity mainthread 1 Answer
Unity 3D Java plugin issues 5 Answers