@@ -34,7 +34,10 @@ dependencies {
3434 implementation 'com.github.talhaoz:advanced-location:1.1.0
3535}
3636```
37-
37+ #### agconnect-services.json
38+ ``` app
39+ Add agconnect - services .json file under app directory
40+ ```
3841
3942## Use
4043
@@ -108,11 +111,15 @@ advancedLocation.getLastLocation(this) {
108111* Requests Location Updates by running a foreground service and stores them in the Room DB (including old locations)
109112*
110113* @param activity is required for permission
114+ * @param notificationTitle is title for Notification that displayed along with foreground service (if Empty app name will be displayed)
115+ * @param notificationDescription is description for Notification that displayed along with foreground service(if Empty default desc will be displayed)
111116* @param updateInterval location update refresh frequency (Default value = 5 mins)
112117* @returns BackgroundLocationResult that accesses to RoomDB (only get)
113118*/
114119advancedLocation.startBackgroundLocationUpdates(
115120 this ,
121+ " Advanced Location Demo" ,
122+ " Reaching your location in background.." ,
116123 UpdateInterval .INTERVAL_FIVE_MINUTES
117124).let {
118125 val list = it.getAllLocationUpdates()
@@ -132,7 +139,9 @@ advancedLocation.clearLocationDB()
132139- #### Activity Recognition
133140``` kotlin
134141// Requests the current activity type and stores the result in the Room DB
135- advancedLocation.getActivityType().let { activityTypeResult ->
142+ advancedLocation.getActivityType(
143+ this
144+ ).let { activityTypeResult ->
136145 val activityType = activityTypeResult.getActivityType()
137146 activityType.let {
138147 Log .d(TAG , " Activity Type: ${it?.type} " )
0 commit comments