I have an if
condition in my Java code in Android and I want to enter the block it's the first time the user has run the app. But for the second time and thereafter, they ignore the conditions.
How can I restrict the if
block in my Java code?
This is my if block condition:
if(AppSharedPrefs.getInstance(SplashActivity.this)
.readPrefs(SplashActivity.this, "language").isEmpty())
{
AppSharedPrefs.getInstance(SplashActivity.this)
.writePrefs(SplashActivity.this, "language","English");
}