I am new to android, I am making an app which is installed by n users. When they add a new record in the database I would like to notify all users who has installed the app with,"[user] added a new comment [data]". I tried to use parse sdk,like onCreate I added,
public void onCreate() {
Parse.initialize(this, "aaaa", "bbbb");
ParseInstallation.getCurrentInstallation().saveInBackground();
}
Also I changed the xml file and added,
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<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>
and some other as stated in the website. But I have to manually go to the parse website and "create push" and send to all. But I want to make it automatic. Like whenever a new message is inserted, push it. How can I achieve it programmatically.