Android Application Class

Application wide object.

You can actually create an “Application” class that can be used to essentially create Application wide settings.

Just create a new class and extend Application, then set any class members and appropriate getter/setter methods and you can access them throughout your application.

You then need to update your manifest as follows:

 <application android:icon="@drawable/logo"
         android:label="@string/app_name"
         android:name=".application.CustomApplication">
         

Then in any activity you can access it as follows:

 CustomApplication app = ((CustomApplication)getApplication());

Get Application context from phonegap cordova plugin

cordova.startActivityForResult(this, intent,0); </code>