Domanda

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

È stato utile?

Soluzione

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();
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top