Skip to main content
Inspiring
September 11, 2012
Question

Difference Between native Android and ANE

  • September 11, 2012
  • 2 replies
  • 2171 views

I'm trying to build an ANE that will display the native MediaPlayer object on top of my Flex Mobile app. So far, I have successfully done it. The issue is that it won't show up until after the app state changes (most easily by turning the screen off and back on). I was able to create a MediaPlayer in a native Android app using the exact same method (in this case, using a button to delay the creation). and it works exactly as it should.

It would be great if someone knew why this was happening (it seems to be isolated to SurfaceView and VideoView), but I would really like to know what the difference is between the AIR app and the Native App. I was under the impression that the AIR app was just a single Activity class that acted as a container of sorts for the AIR app. Is this not the case? The getActivity() from FREContext seems to provide a completely valid activity, yet there seems to be little issues all over the place with interacting with that activity and a great deal many things it does not like to do.

Could anyone explain the differences please?

This topic has been closed for replies.

2 replies

Participating Frequently
June 7, 2013

i want to ask u another question,if u jump from the flex to ane,would it be slow?

if u return from the ane to flex,and than go back to ane,would the activity recreate or keep?

esdebon
Inspiring
September 11, 2012

AIR is like the Java Virtual Machine,  is a program runing on your device natively, but an app Runing on AIR is no a native App.

Inspiring
September 11, 2012

That is what I assumed. The resulting app is, in Android's case, a single Activity that runs as a window to the AIR app. What I'd like to figure out is why modifying that Activity using native Java is different than using a native app. I'm not modifying the AIR app itself, just the activity the AIR app is using.

Participant
October 2, 2012

I've got exactly the same problem : did you found a solution ?

If I observe the view hierarchy created after adding a VideoView, I get :

android.widget.FrameLayout

|-android.widget.FrameLayout (a different one)

   |-com.adobe.AIRWindowSurfaceView

   |-android.widget.VideoView

I tried a lot of things : invalidating the views on Java side, refreshing on Actionscript side, bringing the VideoView to front in Java code ... But nothing works : when the VideoView is starting, the sound begins but the VideoView seems to be behind the AirWidnowSurfaceView until I perform a standby.

I've tried to place the VideoView just above the root FrameLayout, but it changed nothing.

According to his name, I think AIRWindowSurfaceView is derivating from SurfaceView so I can't add any child.

More ideas ?

Regards