Esempio n. 1
0
        /// <summary>
        /// Called when download times out. </summary>
        /// <param name="context"> application context. </param>
        /// <param name="intent"> timeout intent containing content identifier. </param>
        private void onDownloadTimeout(Context context, Intent intent)
        {
            /* Delegate to agent */
            EngagementReachAgent reachAgent           = EngagementReachAgent.getInstance(context);
            EngagementReachInteractiveContent content = reachAgent.getContent(intent);

            if (content != null)
            {
                reachAgent.onDownloadTimeout(content);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Called when a notification has been exited (clear button from notification panel). </summary>
        /// <param name="context"> context. </param>
        /// <param name="intent"> intent containing the content identifier to exit. </param>
        private void onNotificationExited(Context context, Intent intent)
        {
            /* Get content */
            EngagementReachAgent reachAgent           = EngagementReachAgent.getInstance(context);
            EngagementReachInteractiveContent content = reachAgent.getContent(intent);

            /* Exit it if found */
            if (content != null)
            {
                content.exitNotification(context);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Called when a system notification for a content has been actioned. </summary>
        /// <param name="context"> context. </param>
        /// <param name="intent"> intent describing the content. </param>
        private void onNotificationActioned(Context context, Intent intent)
        {
            /* Get content */
            EngagementReachAgent reachAgent           = EngagementReachAgent.getInstance(context);
            EngagementReachInteractiveContent content = reachAgent.getContent(intent);

            /* If content retrieved successfully */
            if (content != null)

            /* Tell reach to start the content activity */
            {
                content.actionNotification(context, true);
            }
        }