Learn how to configure and send a push notification to users of an Android™ application.
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’re 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’ll 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’s 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’re not going to be using all of them today. Let’s focus on a couple of interesting ones. The sticky, if it’s 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’ll 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’s 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’s send a notification. First, let me minimize my application on the Android phone, so that it’s not active. Now I can activate the delivery in campaign.
I’ll 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’s wait a little bit, and here it is. Let’s look at the notification.
Here you can see the icon I added and here’s 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’t defined a specific click action, the application is opened by default. By the way, the gray of pop up that you’ve seen in the app is for this demo. So we can see what the app is doing in the background. Normally, you won’t receive this feedback in the interface. Let’s go back to campaign and look at the logs.
We can see that everything’s okay. The notification has been sent. Now let’s 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’ll 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’s 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’s 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’re 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’s add the title, the image URL and the icon URL.
And now we’re ready to send the message. From the campaign side the data message works exactly the same as the notification message. It’s 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’t touched on, please view the product documentation. Thank you for watching. -