SHARE
TWEET

Untitled

a guest Jul 16th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //starting it in the HomeViewModel's instantiation, handled with a sharedpreferences flag so it can't be refired
  2. val constraints = Constraints.Builder()
  3.         .setRequiredNetworkType(NetworkType.CONNECTED)
  4.         .build()
  5.     val compressionWork = OneTimeWorkRequestBuilder<DataSyncWorker>()
  6.         .setConstraints(constraints)
  7.         .build()
  8.  
  9.     WorkManager.getInstance().enqueue(compressionWork)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top