Location-based Push

Enable Device Location Collection

With SDK release v6.49.1, we have introduced two new APIs to help you control device location collection.
                   PushIOManager.setUseLocation(boolean enabled)
                
                   PushIOManager.isUseLocationEnabled()
                
                    PushIOManager.getInstance(applicationContext).setUseLocation(useLocation: Boolean)
                    
                    PushIOManager.getInstance(applicationContext).isUseLocationEnabled
                    

If your app calls PushIOManager.registerApp() or PushIOManager.registerApp(true), the SDK follows the flag set in the above API to include/exclude device location from the registration request.


Sending Location Pushes

To tap into PushIOManager's location services, simply add one of these lines of code your AndroidManifest.xml file:

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"/>

or

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"/>

Responsys takes the longitude and latitude info sent by the mobile app and, using the GeoNames database, converts them into human-readable location attributes. These attributes are stored in the App Channel List in the fields DEVICE_COUNTRY_CODE_, DEVICE_CITY_, DEVICE_POSTAL_CODE_, ADMIN_AREA1_, and ADMIN_AREA2_. A marketer using Responsys creates filters using the location attributes in the App Channel List, and then uses those filters to define the audience for their campaign.

For more information about the App Channel List, see the Mobile App Channel Configuration Guide.