I have an application on Parse.com that sends Push with custom Api messages to open an Activity, my Custom Receiver looks like this:
public class CustomReceiver extends ParsePushBroadcastReceiver {
private static final String TAG = "PUSH";
@Override
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, MyClass.class);
i.putExtras(intent.getExtras());
Log.d(TAG, intent.getExtras().getString("com.parse.Data"));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
@Override
protected void onPushOpen(Context context, Intent intent) {
Log.d(TAG,"OPEN PUSH");
ParseAnalytics.trackAppOpenedInBackground(intent);
}
In my manifest it looks like this:
<service android:name="com.parse.PushService" />
<receiver android:name="com.myapp.services.CustomReceiver" 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" />
<action android:name="com.myapp.CustomAction" />
</intent-filter>
</receiver>
I get the Pushs ok and even open the Activity MyClass.class
, but in the Parse panel I can not see how many users opened the sent PUSH. I only see how many users were sent.