getLastSync

fun getLastSync(context: Context, appId: String): Long

Check when an app was last synced.

Example usage (kotlin):

val lastSync = LiveUpdateManager.getLastSync(context, "appId")

Example usage (Java):

Long lastSync = LiveUpdateManager.getLastSync(context, "appId");

Return

the timestamp of the last sync in milliseconds, or -1 if no prior sync

Parameters

context

an Android Context used to get data from shared preferences

appId

the ID of the app registered with Live Updates


Check the latest time any of the registered apps was synced.

Example usage (kotlin):

val lastSync = LiveUpdateManager.getLastSync(context)

Example usage (Java):

Long lastSync = LiveUpdateManager.getLastSync(context);

Return

the timestamp of the oldest synced registered app, or -1 if any app has never been synced

Parameters

context

an Android Context used to get data from shared preferences