App Crashes If App Is Closed Using Push Service: Parse.com
I replace receiver in manifest to mine:
Solution 1:
I experienced the same problem, and solved it by adding android:name=".MyApplication" to the application tag in the Android manifest, and then creating a new class that looks like this:
publicclassMyApplicationextendsApplication
{
@OverridepublicvoidonCreate() {
Parse.initialize(getApplicationContext(), myAppId, myClientKey);
}
}
Previously I'd put the Parse initialisation call in the onCreate() method of my main Activity, but as the error message you posted suggests, the subtleties of the Android lifecycle mean you can't do that.
Post a Comment for "App Crashes If App Is Closed Using Push Service: Parse.com"