Adobe-Runtime-Support icon indicating copy to clipboard operation
Adobe-Runtime-Support copied to clipboard

[Feature Request] Compile to android AAR (Android library)

Open bobaoapae opened this issue 2 years ago • 5 comments

If possible will be amazing to compile to android AAR instead of APK directly, with this will be possible to create my own android application with anything i like and then using the AAR generated launch the AIR application and change the created activity to visible.

Currently to do this will be need to use the config "KeepAndroidStudioOutput" and then modify the generated project.

bobaoapae avatar Sep 11 '23 16:09 bobaoapae

Yes we'd wondered about packaging up AIR as a library that could just be imported into other projects .. the trouble is, currently that's not within the description of the license that we have from Adobe (the AIR SDK license that we inherited from them only allows you to distribute the AIR runtime when it's embedded in an application as a result of using the AIR build tools).

I'm hoping to get that restriction relaxed at some point, to make it a bit more flexible :-)

ajwfrost avatar Sep 11 '23 17:09 ajwfrost

And about keep packing normally using AIR tools. The package generate will be the same as now, Air runtime + swf + descriptor + java class all of this. But packed as a AAR so I can just import this from my own project and use the generated activity to start whenever I want. This it's not allowed too? Because currently anyone can do this without problem.. Just set to true the config to keep the android project, and change the main activity to anything they want and just call the air activity when they want to display the air content. Allowing better integrations

bobaoapae avatar Sep 14 '23 22:09 bobaoapae

I agree with you there - about the fact that it is possible to do, and that the integrations can be better. Looking at the terminology again, it's perhaps a bit of a grey area, so might be something we can clarify or relax without needing legal updates...

(i) Distribution with Developer Application. You may distribute (A) ... (B) Object Code Redistributables, other than of Pre-release Software, only as incorporated automatically (i.e., incorporated solely as a byproduct of your use of the Build Tools) into a Developer Application for Mac, Windows, iOS, or Android platforms, by using the Object Code Redistributables in the ... folders, respectively;

So it could be argued that what you're doing is using the Build Tools to create something that you're then turning into a Developer Application. What you're not allowed to do is take the raw runtime libraries and incorporate them somehow into your own applications. So potentially, by us changing the Build Tools, we are changing what's actually permitted here. Which I don't think is a problem... Anyway -> let me just get some clarifications on this part!

thanks

ajwfrost avatar Sep 15 '23 10:09 ajwfrost

Also related feature requests: https://github.com/airsdk/Adobe-Runtime-Support/issues/2468 https://github.com/airsdk/Adobe-Runtime-Support/issues/2466

itlancer avatar Sep 19 '23 13:09 itlancer

@ajwfrost I'm also interesting in packaging AIR app as Android library (in AAR format). Use case:

  • AIR native application with Java native extensions should be packaged as AAR library.
  • AIR application (as library) should be initialized (AS3 main class etc) by somehow (Java call for example) via "main" application (Java code). It could be some function start(Context context, Activity activity, Rect viewPort) And activity could be null in case to launch library without UI. viewPort rectangle could be used for start position of library in cause of UI usage. Could be related to console (terminal) execution https://github.com/airsdk/Adobe-Runtime-Support/issues/461
  • AIR application (as library) should register functions which should be called by "main" app (AS3 or like native extension Java code).
  • "Main" application should have ability to call "registered" functions to execute some logic or get data. Similar to native extensions I think.
  • AIR application (as library) should have ability to work even without Activity. Just for logic, without UI.

itlancer avatar May 30 '24 14:05 itlancer