سؤال

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

هل كانت مفيدة؟

المحلول

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();
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top