stephentuso/welcome-android

Clearing the preferences for when app is reset

iC00kScripts opened this issue · 1 comments

Hello and thanks for this awesome library.

I want to know if there's an inbuilt method to clear the welcome activity's preferences from any where in the code. I am implementing a reset button which clears the app's shared preferences and restarts the application. But on restarting, the welcome activity is still not shown which means it's own preferences were still intact.

Thanks once again.

Ok I solved this issue by going through the library source code....

Add this to the welcome activity

public static String welcomeKey() { return "WelcomeScreen"; }

and then call this when you want to clear the preference:
WelcomeSharedPreferencesHelper.removeWelcomeCompleted(Context cx,String welcomekey);