<div dir="ltr">On Fri, May 8, 2015 at 2:10 AM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, May 7, 2015 at 11:58 PM, Daniel Passos <span dir="ltr">&lt;<a href="mailto:dpassos@redhat.com" target="_blank">dpassos@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Just to be clear, we are talking about metrics for messages delivered (received on device) or about really read/open?<br><br>Because in Android land is not possible know when message was read/opened. We delegate how the message will be delivered/showed to the MessageHandler[1] and we don&#39;t have access to it.<br></div></div></blockquote><div><br></div></span><div>when the user clicks on the message, the app opens. That&#39;s what we track w/ this PR, not the actual: I read the message - more &quot;App was opened due to push&quot;, see:</div><div><a href="https://issues.jboss.org/browse/AGPUSH-971" target="_blank">https://issues.jboss.org/browse/AGPUSH-971</a><br></div></div></div></div></blockquote><div><br>I can&#39;t do that. I can&#39;t do an action when app was opened. To do that we would need to create our own application[1] class, and all projects would need to extend it. As I have told in my previous email, for now I only can do something when the message is delivered to the device.<br><br>[1] <a href="http://developer.android.com/reference/android/app/Application.html">http://developer.android.com/reference/android/app/Application.html</a><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><div dir="ltr"><div><br>Today we only have access when the message is delivered. Basically we receive the message in a AeroGearGCMMessageReceiver[2] do some checks and push the message for all Handles registered[3][4]<br><br>[1] <a href="https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/MessageHandler.java" target="_blank">https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/MessageHandler.java</a><br>[2] 
<a href="https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/gcm/AeroGearGCMMessageReceiver.java" target="_blank">https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/gcm/AeroGearGCMMessageReceiver.java</a><br>[3] <a href="https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/RegistrarManager.java#L118" target="_blank">https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/RegistrarManager.java#L118</a><br>[4] <a href="https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/RegistrarManager.java#L130" target="_blank">https://github.com/aerogear/aerogear-android-push/blob/master/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/RegistrarManager.java#L130</a><span><font color="#888888"><br><br></font></span></div><span><font color="#888888">-- Passos</font></span><span><br><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 6, 2015 at 6:38 AM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,<br></div><div><br></div><div>as discussed on the previous thread, there will be a new endpoint to &#39;track&#39; the &quot;App opened/launched due to received push notification&quot;.</div><div><br></div><div>Internally, on the UPS, the Push Message has an ID, which get&#39;s append to the payload of the notification, like here:</div><div><a href="https://github.com/matzew/aerogear-unifiedpush-server/blob/analytics/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/APNsPushNotificationSender.java#L107-L108" target="_blank">https://github.com/matzew/aerogear-unifiedpush-server/blob/analytics/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/APNsPushNotificationSender.java#L107-L108</a></div><div><br></div><div>On the client SDKs this will be read and a HTTP call made to the soon introduced MetricsEndpoint. Currently this info is send to the RegistrationEndpoint, including the deviceToken/registrationId. However, I think that the deviceToken/registrationId is currently not needed for metrics, since we are just interested in anonymous &quot;app launched/opened due to push&quot;, and not a specific &quot;DEVICE X did open, while DEVICE Y did not yet open&quot;.</div><div><br></div><div>So all we really need is the ID of the push notification, to be processed by our Metrics Service</div><div><a href="https://github.com/matzew/aerogear-unifiedpush-server/blob/analytics/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L128-L133" target="_blank">https://github.com/matzew/aerogear-unifiedpush-server/blob/analytics/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L128-L133</a></div><div><br></div><div>Therefore my proposal is have an endpoint:</div><div><br></div><div>PUT /metrics/pushmessage/{pushMessageID}</div><div><br></div><div>I think PUT is good/best, because there is nothing really created on the server, it&#39;s more updating the &#39;counter&#39; on the existing PushMessageInformation object.</div><div><br></div><div>Thoughts?</div><div>-Matthias</div></div></blockquote></div></div></span></div>
<br></span><span class="">_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></span></blockquote></div><span class=""><br><br clear="all"><div><br></div>-- <br><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</span></div></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">-- Passos<br></div></div>
</div></div>