How to get Context from FREContext ?

932 views Asked by At

I'm trying to create and ANE that will handle the autoupdate, (because we're not going to put the application on the android market) This is how it works :

autoUpdate = new AutoUpdateApk(getApplicationContext());

But how am I able to get the context from the FREContext I would really appreciate any help, thank you in advance

1

There are 1 answers

6
Michael On BEST ANSWER

Very simply you can use your main activity for references to the application context, for example in a FREFunction implementation:

public FREObject call(FREContext context, FREObject[] args)
{
    Context androidContext = context.getActivity();
}