I am new to android programming and i have found one issue. I want to determin first run of app and with my method the app never starts :/ tha app proces is killed right away.
I want to chech that in my splashscreen activity and here is my code:
What am I doing wrong here ?
I want to chech that in my splashscreen activity and here is my code:
Code:
public class SplashScreen extends Activity {
final Intent mainMenuIntent = new Intent(this, MainMenu.class);
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
SharedPreferences app_preferences = PreferenceManager.getDefaultSharedPreferences(this);
if (app_preferences.getBoolean("firstTime", false)) {
Log.v("SplashScreenActivity","Pirszy raz!!!!");
}
mainMenuIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(mainMenuIntent);
}
}