1

The Android docs state that we need to call trackAppOpenedInBackground() from either:

  1. The main Activity's onCreate().

  2. The onReceive() method of the BroadcastReceiver which handles the OPEN intent.

This raises a problem with opening the push when the app is the background:

  1. If we implement the call on the onCreate() method - it will not be tracked.

  2. If we implement it on the onReceive(), it will ONLY be called on push opens, not on regular app open.

  3. If we implement on both, we get double reports.

On the iOS platform this is handled correctly - push clicks when the app is in the background are registered, but no double rports.

So - how should we implement this on the Android platform?

Thanks, Vaiden

Nikola Despotoski
  • 49,966
  • 15
  • 119
  • 148
Vaiden
  • 15,728
  • 7
  • 61
  • 91

2 Answers2

0

Actually, one receives double activations on iOS as well. Simply managed by tracking the unique id assigned to each push (which you are responsible for) upon receiving the push.. prior to acting on any push, just check the tracking collection; if found, don't act.

drew..
  • 3,234
  • 3
  • 16
  • 19
  • This means I won't get accurate push engagemnet figures: Suppose the app is already opened, and the user clicks on a push - I want to know he enganged with this push notification. In your solution - I won't – Vaiden Dec 09 '14 at 11:06
  • I don't believe this is the case, as you have already processed any push once in order to see the dup. This is NOT a dup from source, but via how Apple has setup the workflow. – drew.. Dec 10 '14 at 14:47
0

Oh well - we've decided we probably don't and shouldn't care about app opens.

We track sessions using Google Analytics anyway, so the key metric that we care about on Parse.com is the push interaction. So we've implemented the tracking code on BOTH the suggested locations.

Vaiden
  • 15,728
  • 7
  • 61
  • 91