Initiating "Clear data" for an app from settings in app code (Android) -



Initiating "Clear data" for an app from settings in app code (Android) -

i know may seem silly question, possible?

in cause wondering why asking this... made update app of mine that, if installed on previous versions, create crash in vital point, , work if go settings , "clear data". wondering if utilize code snippet create automatically version.

a improve prepare problem figure out why crashing @ point , address that. can create utilize of sqlitehelper#onupgrade method accomplish this.

that beingness said. assume prepare problem:

file dir = context.getfilesdir(); fileutils.cleandirectory(dir);

that gets private file directory application , clears it, clear info function do.

android

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -