Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Context from FREContext ?

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

like image 334
Khalil Bhm Avatar asked Feb 12 '26 01:02

Khalil Bhm


1 Answers

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();
}
like image 123
Michael Avatar answered Feb 14 '26 15:02

Michael



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!