-
public interface ILocationManagerThe entry point to the location SDK for OneSignal.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanrequestPermission()Use this method to manually prompt the user for location permissions. abstract BooleangetIsShared()Whether location is currently shared with OneSignal. abstract UnitsetIsShared(Boolean isShared)Whether location is currently shared with OneSignal. -
-
Method Detail
-
requestPermission
abstract Boolean requestPermission()
Use this method to manually prompt the user for location permissions. This allows for geotagging so you send notifications to users based on location.
Make sure you have one of the following permission in your
AndroidManifest.xmlas well.<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>Be aware of best practices regarding asking permissions on Android: Requesting Permissions | Android Developers (https://developer.android.com/guide/topics/permissions/requesting.html)
-
getIsShared
abstract Boolean getIsShared()
Whether location is currently shared with OneSignal.
-
setIsShared
abstract Unit setIsShared(Boolean isShared)
Whether location is currently shared with OneSignal.
-
-
-
-