Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Location-based Push

To tap into PushIOManager's location services, simply add one of these lines of code your ApplicationManifest.xml file under the user permissions section:

Coarse Location: Allows an app to access approximate location derived from network location sources such as cell towers and Wi-Fi.

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>


Fine Location: Allows an app to access precise location from location sources such as GPS, cell towers, and Wi-Fi.

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Sending Location Pushes

Example cURL Command for Location Push:

curl "<APP_ID>/<SENDER_SECRET>" -d 'payload={"message":"Test"}&location_query={"reg":{"lat":<LATITUDE>,"lon":<LONGITUDE>,"dist":<RANGE_OF_SEARCH_IN_KILOMETERS>}}&audience=broadcast'

Replace the Application ID, Sender Secret, Latitude and Longitude and Distance-From-A-Point (Km) data.

For example, this cURL Command is configured to send a notification to anyone within 0.5 kilometers of the Oracle office in Broomfield, CO (39.921544,-105.125026):

curl "" -d 'payload={"message":"You are near Oracle!"}&location_query={"reg":{"lat":39.921544,"lon":-105.125026,"dist":0.5}}&audience=broadcast'