get Last Sync
Check when an app was last synced.
Example usage (kotlin):
val lastSync = LiveUpdateManager.getLastSync(context, "appId")
Content copied to clipboard
Example usage (Java):
Long lastSync = LiveUpdateManager.getLastSync(context, "appId");
Content copied to clipboard
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
app Id
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)
Content copied to clipboard
Example usage (Java):
Long lastSync = LiveUpdateManager.getLastSync(context);
Content copied to clipboard
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