Configuring and sending push notifications
Learn how to configure and send a push notification to users of an Android applications.
Transcript
In this video, you will learn how to configure and send the push notification to Android app users. My Neotrip Android app is set up with the campaign STK and configured in campaign.
I also have the service configured, and as you can see a user has subscribed to the service and I have also received the personalization attribute from the app. The first name, which I will now use to personalize the push notification. So it looks like we鈥檙e ready to configure and send the push notification. In the Explorer view, go to campaign Management, Deliveries and I have created a dedicated folder for push. Now I can create a new delivery message. So I will select the template.
I can select the default template but I have already created a template for this demo, which already includes some message content. So I will select this one. You can see that all information is pre-filled but there are still a couple of things I need to do. First, I鈥檒l need to change the target to make sure that we are targeting the new application I created earlier.
Next, we will need to choose the message type. We have two options, the data message and the notification message. Let鈥檚 start with the notification message. And I will explain the difference between the two messages a bit later. So you have the title and of course the message itself. As you can see here, the additional parameter, which I use to store the first name has already been added to the template, but let me show you how to add it. So I will remove it.
And you can see the ad param one as available, from the additional options available to us because I want to send a rich notification, I will add a specific icon in addition to the notification itself. And I would also like to add an image.
Since our mobile app has been configured to use the HTTPv1 API, I will explain some of the HTTPv1 options even if we鈥檙e not going to be using all of them today. Let鈥檚 focus on a couple of interesting ones. The sticky, if it鈥檚 set to false, the notification will automatically be dismissed when the user clicks on it. If you would like the notification to still display after the user has clicked on it, you will need to set the value to true. I鈥檒l leave it false. The notification count allows you to set the number of new unread information to display directly on the application icon.
Another thing that鈥檚 interesting is the click action. If specified, an activity with a matching intent filter within your application is launched when a user clicks on the notification.
I will leave it blank for now. So let鈥檚 send a notification. First, let me minimize my application on the Android phone, so that it鈥檚 not active. Now I can activate the delivery in campaign.
I鈥檒l click on send and then choose to deliver as soon as possible.
As expected, the system identified one subscriber.
Now, when I confirm the delivery, it will be sent out. Let鈥檚 wait a little bit, and here it is. Let鈥檚 look at the notification.
Here you can see the icon I added and here鈥檚 the personalization attribute, as well as the image. And when I click on it, three things happen. The notification is dismissed as we set it to nonsticky. Then the tracking API is triggered and it sends the message that someone has clicked through the notification back to the campaign API. And since we haven鈥檛 defined a specific click action, the application is opened by default. By the way, the gray of pop up that you鈥檝e seen in the app is for this demo. So we can see what the app is doing in the background. Normally, you won鈥檛 receive this feedback in the interface. Let鈥檚 go back to campaign and look at the logs.
We can see that everything鈥檚 okay. The notification has been sent. Now let鈥檚 check the tracking.
We do not see any tracking data yet because the tracking workflow and internal workflow, which pulls all the tracking details only runs every hour. So I鈥檒l go ahead and start it manually.
Now, when we look at the audits, we see that one record has been identified and ingested into the database. Let鈥檚 go back to the delivery and have a look.
And if we look at the tracking, we will see two entries, one for the click on the notification and one for the opening of the mobile application.
Now let鈥檚 take a look at the data message.
The notification message works differently to the data message. The notification message will directly go to the notification center without passing through the app. So it allows you to send push notifications, basically out the box. The data message however, directly flows into the application itself like a silent push. And it provides the application with the payload the information that we鈥檙e going to be adding here. It then depends on the application, whether a pop-up notification is displayed in the notification center. So the data message option allows it to do both, silent push and push notifications. The downside is that with the data message you will need to manually code the display of the push in the notification center into your application. So let鈥檚 add the title, the image URL and the icon URL.
And now we鈥檙e ready to send the message. From the campaign side the data message works exactly the same as the notification message. It鈥檚 the receiving side that differs.
It is sent to the app directly and here you can see the app was not configured to show the message in the notification center regardless of the application being open or not.
So now you understand the difference between the data message and the notification message should be able to set these up. For more information on the separate fields that I haven鈥檛 touched on, please view the product documentation. Thank you for watching. -
Previous Step
Step 2: Configuring an Android service and creating an Android mobile application in Campaign
recommendation-more-help
e811a650-48fd-4e5a-ab38-22c535840186