Android SDK TO Adobe Air - android

We have Some native android SDK libraries , now we need to use them in Adobe Air (android) app with Flash Builder, Is that possible to somehow integrate them and use them inside FlashBuilder project with ActionScript ?

You can use an Air Native Extension to do that.
The ANE framework gives you a bridge that lets you interface your Actionscript code with native libraries, your Android jar library in this case.
Once you successfully built the extension you can use it as any other swc library in FlashBuilder or other IDE.

Related

Can Android library (jar/aar) be used for iOS in Xamarin

I know that I can add Android library (jar/aar) to Xamarin project. If I compile this project for iOS, will it work ? I read that it is not possible because of iOS do not have jvm. Is this situation same for Xamarin ?
Is this situation same for Xamarin?
Yes, you can't add jar to Xamarin.Ios.
Xamarin.Android or Xamarin.Ios is just a wrapper for Native Android or Ios.
You can use c# to code Xamarin.Android project, and run the Xamarin.Android project on a Android device,these all based on Android Callable Wrappers and Managed Callable Wrappers.

How to compile the Xamarin android app with C# classlibrary + C++ Native library?

I have a Chip card reader application which is written by C# and C++ lib as a low-level layer.
Now I want to have the same application in IOS and Android.
So for to achieve this, I have setup the XamarinSDK in VS2017.
I have created the sample android app and imported my existing card reader c# class library and I have calling C++ methods using DllImport inside the C# library and finally compiled both successfully without error.
But when I run the APK on the device it showing exception when calling C++ lib from C# lib.
The code flow is like below image.
So can anyone help me about how to achieve this same?
Highly appreciated your help on this.
Your libs must be compatible with the Android platform. If they're written to Windows or other platform you have to recompile and maybe adapt them. The C# lib tend to be an PCL or .Net Standard lib and the C++ lib have to target the android platform.
I don't have experience with C++ Android development but all C++ applications and libraries have to be compatible with the platform they run.

External C# libraries on mobile

Is it possible to use an external C# library in a unity project to be compiled for iOS and Android?
In my case I need to use the encog library in my game, will I encounter issues from the translation for native iOS/Android code?
Basically, the problem is that unity uses a version of .Net that is older than what Encog supports. More info on this question:
Encog dll in Unity?

Could I wrap c++ library to Adobe Air native extension for mobile IOS/Android

Can I wrap a C++ library to Adobe Air native extension IOS/Android?
I have a C++ library that was written by third party. I want to use that library for an adobe air native extension for mobile?
Will I be able to do it. If so, where can I find some guidelines?
I'll attempt to answer the Android part of the question.
I haven't seen it spelled out explicitly in the Adobe Air documentation that this is possible, but in the Adobe Help docs for Adobe Air, section Packaging a native extension: Building the native library, it says:
Android native libraries: When you use the Android NDK, provide a shared library with a filename as follows (etc)
The NDK as you may know lets you to implement parts of your Android app using native-code languages including C++.
I take it this reference in the docs means it's possible. As a starting point, I'd get familiar with the details of the NDK.
While this is not a detailed guideline on how to proceeed, I hope it provides a pointer in the right direction.
An alternative to building an ANE to wrap the C++ library is to compile it into Flash bytecode, using the new Adobe "C++ to Flash" compiler (previously known as Alchemy). It can produce a swf that you can later call from ActionScript. Here is a tutorial that explains how to do it. And here is its official website.
for iOS you can use the c library if you can statistically link to it. ANE on iOS does not support dynamic linking (as of 3.2 not sure if something changed in newer releases). Static linking is fairly easy process in Xcode just google it.
for Android:
If you have the .so file you can write your ANE in JAVA and use jni(System.loadLibrary) to talk to your cpp library. its better than writing ANE in CPP completely. See ane documentation "Including additional Android shared .so libraries in the ANE package" section to know more.

Flurry SDK for Android using AIR 3.0

I am writing application for Android using Adobe AIR 3.0. And I need to integrate Flurry analytics in this project. On official site http://www.flurry.com/ I downloaded Flurry SDK for Android. It is jar file. How can I integrate it to my action script 3 project? I am using Flash builder 4.6. Thanks.
Develop a native extension.
http://www.adobe.com/devnet/air/articles/developing-native-extensions-air.html
You cannot as far as I can tell. There is no way to include native development SDKs in your Air/Flex applications.
The problem is that your AIR application doesn't have direct access to the native SDKs functionality; only the functionality that Adobe has bubbled to the surface. Since Flurry's SDK interacts directly with the native Java implementation, Adobe would have to write code to let those events, triggers, methods & classes be accessible inside of the AIR runtime.

Categories

Resources