The Parse push service cannot start because Parse.initialize has not yet been called. If you call Parse.initialize from an Activity's onCreate, that call should instead be in the Application.onCreate. Be sure your Application class is registered in your AndroidManifest.xml with the android:name property of your tag.
Try to seperate Activity and Application, create a new class file e.g. MainApplication.
PushApp.java:
public class PushApp extends CordovaActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.init();
// Set by <content src="index.html" /> in config.xml
super.loadUrl(Config.getStartUrl());
//super.loadUrl("file:///android_asset/www/index.html");
}
}
MainApplication.java:
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Parse.initialize(this, "xJK9ZA0Dtsjd8RwoNUUsIHPXzMRbmcxXGWqiw", "19g9eUKjLjlUdogHEXStUABNcvy2rA6azb5mXy");
PushService.setDefaultPushCallback(this, PushApp.class);
ParseInstallation.getCurrentInstallation().saveInBackground();
}
}
and change:
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="PushApp" android:theme="@android:style/Theme.Black.NoTitleBar">
to:
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="MainApplication" android:theme="@android:style/Theme.Black.NoTitleBar">
now you should also receive push notifications when app is closed / screen is locked