Hi All,
How to send the location based notifications through curl and java client when user changing his location.
Hi All,
How to send the location based notifications through curl and java client when user changing his location.
Didn't find what you were looking for?
New postHi Srinivas,
Apologies, but I'm not sure what you're asking here. Can you describe your issue in more detail?
Are you asking about our Historical Location product or are you using Beacons to identify location?
Thank you,
Sean Conlin
Urban Airship Technical Support
Portland, Oregon
Hi,
I am tried following steps to send location based notification
Step1: Create a Location-Based Segment:
Ex:
curl https://go.urbanairship.com/api/segments -X POST -u "XXXX:XXXX" -H "Accept: application/vnd.urbanairship+json; version=3" -H "Content-Type: application/json" -d '{"display_name": "hyderbad_ghmc","criteria": {"and": [{"location": {"id": "7bubsN5eUva6BvKvE5orc9","date": {"recent": {"months": 3}}}},{"tag": "tag4"}]}}'
curl https://go.urbanairship.com/api/segments -X POST -u "XXXX:XXXX" -H "Accept: application/vnd.urbanairship+json; version=3" -H "Content-Type: application/json" -d '{"display_name": "hyderbad_water_board","criteria": {"and": [{"location": {"id": "1OLhIBCIPgEO1BGqGTkJJd","date": {"recent": {"months": 3}}}},{"tag": "tag4"}]}}'
Step2: Push to segment:
Ex:
curl https://go.urbanairship.com/api/push -X POST -u "XXXX:XXXX" -H "Accept: application/vnd.urbanairship+json; version=3" -H "Content-Type: application/json" -d '{"audience": { "segment": "8e5d7e10-7be4-42d5-b74a-69556181513c" },"notification": { "alert": "What up segment" },"device_types": ["android"]}'
Result;
{"ok":true,"operation_id":"3cbc1426-1328-4c04-9aa8-c42adfdcf425","push_ids":["945adc0f-5a52-486c-a201-d5794b66c5b4"],"message_ids":[],"content_urls":[]}
Can you provide examples based on Historical Location product and Beacons to send notification.
Please sign in to leave a comment.
Comments
3 comments