Skip to content

Instantly share code, notes, and snippets.

@kostovtd
Last active February 19, 2017 20:11
Show Gist options
  • Save kostovtd/1b11cd79609d074eaf64b3aea50db8d2 to your computer and use it in GitHub Desktop.
Save kostovtd/1b11cd79609d074eaf64b3aea50db8d2 to your computer and use it in GitHub Desktop.
// GET DEVICE PROTECTED CONTEXT
Context applicationContext = getApplicationContext();
Context safeContext = ContextCompat.createDeviceProtectedStorageContext(appicationContext);
// MOVE DATA FROM CREDENTIAL TO DEVICE STORAGE
Context.moveSharedPreferencesFrom();
Context.moveDatabaseFrom();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment