Tagging is a flexible way to send push notifications to segments of your users. Your users can be assigned to a tag with just one line of code.
Here are some use cases of how tags can be useful:
- A news app will use tags to send fashion news to only those who are interested in fashion, and politics to those who are interested in politics.
- A food app can send certain deals to those who like burger and meat.
- A travel app might have have a tag for each country so that it can send promotions based on users preferences for destinations.
How to set tags
Inside onCreate() Method of your Activity add the following:
JSONArray tags = new JSONArray();
//Add array of tags
//Remove array of tags
After setting your tags you can now go to the dashboard, and open your push composer and use the tags text area to specify the message to a certain audience