The Android docs state that we need to call trackAppOpenedInBackground()
from either:
The main
Activity
'sonCreate()
.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:
If we implement the call on the
onCreate()
method - it will not be tracked.If we implement it on the
onReceive()
, it will ONLY be called on push opens, not on regular app open.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
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.