Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Unity android app, how to receive content from a service of a referenced android library

I want to use an android library in Unity. The library contains a service which delivers some content to consume in your app. For native android apps (apps programmed using java), this content can be easily received by extending the library's service in the application. But I want to use this service (in fact the content that this service provides) in a Unity application. Can anyone explain how to do this?

like image 590
Akram Avatar asked Aug 20 '16 06:08

Akram


1 Answers

First you can't use .aar library files inside unity because the new format for Android Archives (.aar) is integrated with the new Gradle build system, however, Unity does not use that when building the project for Android yet.

So , you can compile your .aar file , extract it, and use the classes.jar to access the java classes inside the project you have. ( I've used this method when I converted from Eclipse to Android Studio ).

like image 170
sam Avatar answered Oct 16 '22 18:10

sam