I quit the app, relaunch it, I am getting an exception.
public void onCreate() {
-->here Parse.initialize(this, "adfsfasdfs",
"asdfadfsdf");
ParseInstallation.getCurrentInstallation().saveInBackground();
ParseInstallation.create(identity == null ? "No Identity Set"
: identity);
Exception
07-08 23:27:29.411: E/AndroidRuntime(4889): Caused by: java.lang.IllegalStateException: ParsePlugins is already initialized
07-08 23:27:29.411: E/AndroidRuntime(4889): at com.parse.ParsePlugins.set(ParsePlugins.java:27)
07-08 23:27:29.411: E/AndroidRuntime(4889): at com.parse.ParsePlugins.access$200(ParsePlugins.java:11)
07-08 23:27:29.411: E/AndroidRuntime(4889): at com.parse.ParsePlugins$Android.initialize(ParsePlugins.java:141)
07-08 23:27:29.411: E/AndroidRuntime(4889): at com.parse.Parse.initialize(Parse.java:178)
07-08 23:27:29.411: E/AndroidRuntime(4889): at com.mcruiseon.caregiri.Registration.onCreate(Registration.java:98)
Manifest file
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
Edit :
I wonder why Parse would throw an exception for this. Why not just info
and move on. Its initialized, so big deal if I initialized it again.
Solution
I have given up on Parse. Dont like the Application way, just to irritating to maintain.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…