Okay, I would like to know if anyone managed to pull this thing of? I am making native extension and my native JAR uses Google Play Services via reflection. I have added Google Play Services library to my native extension, here's how platform.xml
looks like:
<platform xmlns="http://ns.adobe.com/air/extension/3.1">
<packagedDependencies>
<packagedDependency>android-support-v4.jar</packagedDependency>
<packagedDependency>google-play-services.jar</packagedDependency>
</packagedDependencies>
<packagedResources>
<packagedResource>
<packageName>com.google.android.gms</packageName>
<folderName>google-play-services-res</folderName>
</packagedResource>
</packagedResources>
</platform>
My android
build folder has structure like this:
android
- nativeLib.jar
- android-support-v4.jar
- google-play-services-res (folder)
- google-play-services.jar
- library.swf
When I build my ANE w/o Google Play Services library (which has around 5.1 mb), I see that my ANE has for example 800 kb. After adding Google Play Services dependency like this, ANE has around 6 mb which for me indicates that these JARs stated in platform.xml
are somehow bundled in native extension. Now, my native JAR has some function where I can see if calling method from Google Play Services library fails or not. It always fails when I call it from AIR Android app I made and where I integrated this generated ANE.
So, my native
JAR and google-play-services
JAR are standing next to each other before packing them in my ANE, but after triggering method from my native jar, it turns out that it isn't aware that google-play-services.jar is anywhere around.
Just for the record, I don't have any issues in bridging AIR with native library, all calls are working properly and interface I am exposing to ActionScript files is fully functional, it's just that native library is performing certain actions depending on wether Google Play Services are found or not and in my case -> they are never found.
Any ideas what I may be doing wrong and how to pull this thing of?
Thanks in advance.