Beispiel #1
0
 public static void setDownloadId(String key, long downloadId, Context context) {
   SharedPreferences preferences = PrefUtils.getSharedPreferences(context);
   SharedPreferences.Editor editor = preferences.edit();
   editor.putLong(DM + key, downloadId);
   editor.apply();
 }
Beispiel #2
0
 public static void removeDownloadId(String key, Context context) {
   SharedPreferences preferences = PrefUtils.getSharedPreferences(context);
   SharedPreferences.Editor editor = preferences.edit();
   editor.remove(DM + key);
   editor.apply();
 }
Beispiel #3
0
 public static long getDownloadId(String key, Context context) {
   SharedPreferences preferences = PrefUtils.getSharedPreferences(context);
   return preferences.getLong(DM + key, 0);
 }