We are having a cashback and coupon android app based in India only. And now we are expanding to Indonesia and Singapore. We are Using Parse for push notification. Now my problem is How to send the push notification only to Indonesia users with the same Parse account. Like users are downloading the same global app from the playstore but issue is that Indian store is different from Indonesia & Singapore store. And if i am sending a push notification to only Indian user then they are also forwarding to the Indonesia users also. So How to categorize or segment both the country. Thanks Kumar
Asked
Active
Viewed 300 times
2 Answers
0
Well, you can try something like this,
Store the users' country in SharedPreference after registration / login.
Then put the Country name to
ParseInstallation
like this.ParseInstallation installation = ParseInstallation.getCurrentInstallation(); installation.put("country", countryNameFromSharedPreference); installation.saveInBackground();
Now, in your admin panel of Parse, you'll be able to filter the Target Audience with "Country".

RockerFlower
- 727
- 2
- 10
- 28

Sandip Fichadiya
- 3,430
- 2
- 21
- 47
0
If you are using Parse, you can set a custom variable called 'country_code' like this
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.put("country_code", "IN");
installation.saveInBackground();
To get country code refer this stackoverflow question.
Now you can target users using 'country_code' key
example:
ParseQuery query = ParseInstallation.getQuery();
query.whereEqualTo("country_code", "IN");
ParsePush push = new ParsePush();
push.setQuery(query);
push.sendPushInBackground();