ProGlove Documentation

Activity feature - Update Goals

Use our SDK or Intent to update Goals in the Activity feature:

Example 45. SDK
    val activityGoals = PgActivityGoals(
            activityGoalsStepsGoalEdit.text.toString().toIntOrNull() ?: 650,
            activityGoalsScansGoalEdit.text.toString().toIntOrNull() ?: 10000,
            activityGoalsAverageScansGoalEdit.text.toString().toDoubleOrNull() ?: 1.5
    )
    pgManager.setActivityGoals(activityGoals.toCommand(), callback = object : IPgSetActivityGoalsCallback {
        override fun onSuccess() {
            logger.log(Level.INFO, "Goals set successfully.")
        }

        override fun onError(error: PgError) {
            logger.log(Level.SEVERE, "Error during setActivityGoals: $error")
        }
    })


Example 46. Intent
val intent = Intent().apply {
    action = "com.proglove.api.CONFIGURE_WORKER_GOALS"
    putExtra("ApiConcom.proglove.api.extra.WORKER_GOAL_TOTAL_STEPS", 650)
    putExtra("ApiCcom.proglove.api.extra.WORKER_GOAL_TOTAL_SCANS", 10000)
    putExtra("Apcom.proglove.api.extra.WORKER_GOAL_AVERAGE_SCAN_SPEED", 1.5)
}
sendBroadcast(intent)


You must set all goals to be > 0. Invalid or missing goals will be replaced by the following default values:

  • Total Steps: 650

  • Total Scans: 10000

  • Average Scan Time: 1.5