android - Detect when Notification is clicked to send analytic's event -
we have app gcm notifications working fine, set pendingintent
activity want open when notification clicked. however, need send event google analytics
each time 1 notification (and there different types of notifications) clicked. how achieve this? don't want parse intent in activity, think not solution (we using taskstackbuilder
not same activity open same notification), there receiver can use detect when notification clicked/open?
thanks in advance
put flag
variable on notification intent.
intent.putextra("notification","clicked");
now check in activity
, whether bundle having "notification" key or not
if(getintent().hasextra("notification")) //write code analytics
Comments
Post a Comment