Back to project page tasktracker-android.
The source code is released under:
Copyright (c) 2012 Remo Mueller https://github.com/remomueller This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this lice...
If you think the Android project tasktracker-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.remomueller.tasktracker.android; // w w w .j a v a2s . c om // import com.actionbarsherlock.app.SherlockActivity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class DashboardActivity extends Activity { User current_user; Button btnLogout; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Check login status in database current_user = new User(getApplicationContext()); if(current_user.isUserLoggedIn()){ Intent intent = new Intent(getApplicationContext(), StickiesIndex.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); finish(); }else{ // user is not logged in show login screen Intent login = new Intent(getApplicationContext(), LoginActivity.class); login.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(login); // Closing dashboard screen finish(); } } }