src/permissions.android.js
function getContext() {
	if (application.android.context) {
		return (application.android.context);
	}
	if (typeof application.getNativeApplication === 'function') {
		let ctx = application.getNativeApplication();
		if (ctx) {
			return ctx;
		}
	}


	//noinspection JSUnresolvedFunction,JSUnresolvedVariable
	let ctx = java.lang.Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", null).invoke(null, null);
	if (ctx) return ctx;

	//noinspection JSUnresolvedFunction,JSUnresolvedVariable
	ctx = java.lang.Class.forName("android.app.ActivityThread").getMethod("currentApplication", null).invoke(null, null);
	if (ctx) return ctx;

	return ctx;
}
function getContext() {
	if (application.android.context) {
		return (application.android.context);
	}
	if (typeof application.getNativeApplication === 'function') {
		let ctx = application.getNativeApplication();
		if (ctx) {
			return ctx;
		}
	}


	//noinspection JSUnresolvedFunction,JSUnresolvedVariable
	let ctx = java.lang.Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", null).invoke(null, null);
	if (ctx) return ctx;

	//noinspection JSUnresolvedFunction,JSUnresolvedVariable
	ctx = java.lang.Class.forName("android.app.ActivityThread").getMethod("currentApplication", null).invoke(null, null);
	if (ctx) return ctx;

	return ctx;
}
function getContext ( ) { if ( application . android . context ) { return ( application . android . context ) ; } if ( typeof application . getNativeApplication === 'function' ) { let ctx = application . getNativeApplication ( ) ; if ( ctx ) { return ctx ; } } //noinspection JSUnresolvedFunction,JSUnresolvedVariable let ctx = java . lang . Class . forName ( "android.app.AppGlobals" ) . getMethod ( "getInitialApplication" , null ) . invoke ( null , null ) ; if ( ctx ) return ctx ; //noinspection JSUnresolvedFunction,JSUnresolvedVariable ctx = java . lang . Class . forName ( "android.app.ActivityThread" ) . getMethod ( "currentApplication" , null ) . invoke ( null , null ) ; if ( ctx ) return ctx ; return ctx ; }
gets the current application context
@returns {*}
@private
gets the current application context