Repository navigation
Native camera + microphone streaming, push, billing, foldables — AIR apps on iOS, Android and macOS with only self-contained ANEs (no APM needed) #4374
apofis1969
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
we just finished a larger refactoring of our apps. They are AIR apps (AIR 51.x) on iOS, iPadOS, Android and macOS.
The goal was simple: every native extension in our apps is self-contained. One ANE per feature, no shared core library, no dependency ANEs, no package manager. Since today the iOS and the Android versions run that way and are tested on real devices.
Highlights
Streaming with the native camera and microphone (KlugMedia)
Foldables (KlugLayout)
Before / after
<gradle>block in platform.xml)What the extensions do
KlugMedia — iOS, Android, macOS
KlugPush — iOS, Android, macOS
.p8key over HTTP/2. No Firebase SDK in the app.firebase-messagingcomes via gradle inside the ANE.KlugBilling — iOS (StoreKit), Android (Play Billing 8)
KlugGallery — iOS (PhotoKit), Android (MediaStore)
KlugLayout — display metrics, safe-area insets, orientation, immersive mode, foldables (Galaxy Z Flip / Z Fold, iPhone Duo).
KlugSystem — device info, a stable device id, Android runtime permissions (camera, microphone …), opening the app's system settings, in-app review.
Plus a few small ones (dialogs, torch, keychain, sign in with Apple/Google, QR pairing).
Things we learned on the way — maybe useful for your own ANEs
platform.xmlcontains a<gradle>block, theextension.xmland all platform.xml files of that ANE must usehttp://ns.adobe.com/air/extension/50.2, otherwise ADT refuses to package.firebase-messaging26.x requires minSdk 24. If your app still supports Android 6 (minSdk 23), stay on 25.1.x.android.jarbootclasspath there is noLambdaMetafactory; anonymous classes work everywhere.setIntent()inonNewIntent(). So an ANE can read the notification extras from the activity's intent both on a cold and on a warm start.amxmlccan't compile MXML, but the legacylib/mxmlc.jarcan. ANEs are not accepted there, but an ANE's root is a SWC, so copying the.anefiles to.swcand passing them as-external-library-pathworks.Availability
Several of these extensions are available on our website, with documentation and code examples: https://klughomesolutions.com
KlugPush, KlugBilling and KlugGallery will follow there soon. If you need one of them now, or have questions, write to office@klughomesolutions.com.
Happy to answer questions here as well.
Klug Home Solutions
All reactions