Skip to main content
Participant
June 25, 2014
Question

Communication from ANE to AIR application on a button click

  • June 25, 2014
  • 0 replies
  • 233 views

Hi,

I want to call a method in Air application from my ANE code on a button click event.

I tried using 'dispatchStatusEventAsync', It's just returning the value from the ANE to air application and its not working on a button click event..

But I need to call AIR method from ANE on a button click.

Native Android code:

import android.util.Log;

import com.adobe.fre.FREContext;

import com.adobe.fre.FREFunction;

import com.adobe.fre.FREObject;

public class ANESampleCallAir implements FREFunction{

       @2226279

       public FREObject call(FREContext ctx, FREObject[] arg1) {

            // TODO Auto-generated method stub

            Log.i("Call Air method", "Called");

            ctx.dispatchStatusEventAsync("CallAirApplication", "status");

            return null;

            }

}

On a button click I'm calling the above class didn't work. Should I need to include the classes that extends FREExtension and FREContext ? I tried even those but its throwing java null point exception on 'ctx.dispatchStatusEventAsync("CallAirApplication", "status");'

Please hep me to sort out this issue!

This topic has been closed for replies.