android-lib/src/main/java/io/v/android/debug/Debug.java
/**
     * Clears all data for this app. This will force the application to close. It would be nice to
     * be able to schedule a restart as well, but clearing app data clears any scheduled intents.
     * <p>
     * When debugging Vanadium applications, this is often useful to clear the app blessings cache
     * and Syncbase data.
     *
     * @param errorReporter the error reporter used to report any errors. If null,
     *                      {@link ToastingErrorReporter#reportError(Context, int, Throwable)} is
     *                      used.
     */
Clears all data for this app. This will force the application to close. It would be nice to
be able to schedule a restart as well, but clearing app data clears any scheduled intents.

When debugging Vanadium applications, this is often useful to clear the app blessings cache
and Syncbase data.

@param errorReporter the error reporter used to report any errors. If null,
ToastingErrorReporter#reportError(Context, int, Throwable) is
used.
Clears all data for this app . This will force the application to close . It would be nice to be able to schedule a restart as well but clearing app data clears any scheduled intents . When debugging Vanadium applications this is often useful to clear the app blessings cache and Syncbase data . @param errorReporter the error reporter used to report any errors . If null ToastingErrorReporter#reportError ( Context int Throwable ) is used .
public static void clearAppData(final Context context,
                                    @Nullable final ErrorReporter errorReporter) {
        try {
            Runtime.getRuntime().exec("pm clear " + context.getPackageName());
        } catch (final IOException e) {
            if (errorReporter == null) {
                ToastingErrorReporter.reportError(context, R.string.err_app_clear, e);
            } else {
                errorReporter.onError(R.string.err_app_clear, e);
            }
        }
    }
public static void clearAppData ( final Context context , @ Nullable final ErrorReporter errorReporter ) { try { Runtime . getRuntime ( ) . exec ( "pm clear " + context . getPackageName ( ) ) ; } catch ( final IOException e ) { if ( errorReporter == null ) { ToastingErrorReporter . reportError ( context , R . string . err_app_clear , e ) ; } else { errorReporter . onError ( R . string . err_app_clear , e ) ; } } }
Clears all data for this app.
Clears all data for this app .