Code example for AccountManager

Methods: getUserData

0
        Log.d(TAG, "getServerSyncMarker(): " + markerString);
 
        if (!TextUtils.isEmpty(markerString)) {
            return Long.parseLong(markerString);
        } 
 
        return 0; 
    } 
 
     
    /** 
     * Save off the high-water-mark we receive back from the server. 
     *  
     * @param account The account we're syncing 
     * @param marker The high-water-mark we want to save. 
     */ 
    private void setServerSyncMarker(Account account, long marker) {
        Log.d(TAG, "setServerSyncMarker(): " + marker);
 
        mAccountManager.setUserData(account, SYNC_MARKER, Long.toString(marker));
    }