Skip to main content
Inspiring
Apr 20, 2015 3:13 PM UTC
Question

Accessing from ANE to Android Main Activity

Hi,

I'm building an ANE to access to a third party library.

If I would like to add the SDK to native code, I could do two things

1) Change MainActivity, let it implement an interface and implement some methods.

2) In the MainActivity, write code on "onCreate()", "onStart()", "onStop()", "onNewIntent(Intent)", "onResume()" methods

Basically, I would like to ask if there is any way access to main activity and and reimplement those methods. Or inject behaviour somehow.

Thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Apr 22, 2015 9:56 AM UTC

Solution found. Thanks to Vrvy.

[Android] Getting onActivityResult and onStart/onPause/.... events from AIR activity [solution]

I don't really know why Adobe does not have this solution added to their docs (or at least something similar!!) . Implement MainActivity behaviour is a must-need-for-sure during ANE development in Android. AndroidActivityWrapper class seems to be a "magical class which will solve are your problems" and I wasn't able to find any docs about that.

Translate
Oldes
Inspiring
Mar 5, 2018 12:28 PM UTC

AndroidActivityWrapper does not provide onNewIntent which I need. Any idea?

Translate