Track Push opened in parse

Asked

Viewed 44 times

2

I have an application in Parse.com that sends Pushs with custom API messages to open an Activity, my Custom Receiver is 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);

}

On my manifest it’s 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 ok Pushs and even opens the Activity MyClass.class, but in the Parse panel I can’t see how many users opened the PUSH sent. I only see how many users were sent.

  • Matthew, could you run a test and use the trackAppOpened(intent) instead of the current one (I know you don’t want to stop the Receiver, but it’s just like testing. ParseAnalytics?

  • Testei continued the same thing. Now I don’t understand your question about setting up Parseanalytcs @Wakim

  • Is that to use the ParseAnalytics you need to include his jar in the project (should have already been done) and configure it in the onCreate of his Application. Can you verify that second item?

  • The Analytcs . jar I didn’t add no to.. I just added the Compile 'com.parse.bolts:bolts-android:1.+ ' Compile fileTree(include: 'Parse-*.jar', dir: 'libs') As specified here https://www.parse.com/apps/quickstart#Analytics/Events/mobile/android/Native/existing

  • But inside the briefcase libs has the jar? My suggestion is you add the jar if you do not have and initialize ParseAnalytics in the onCreate.

  • Parse SDK has no Parseanalytcs.jar.. @Wakim

  • Hmm, I mistook it for the ParseCrashReporting. Looking at doc. is right the way you are using and you don’t even need to configure in Application. My mistake. In this case, you’re saving the ParseInstallation right?

  • @Wakim yes I am...

  • It seems that the push open is bug.. I saw several people posting this on the Developers facebook forum..

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.