Android Open Source - taxitwin-app Launcher Activity






From Project

Back to project page taxitwin-app.

License

The source code is released under:

GNU General Public License

If you think the Android project taxitwin-app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package kimle.michal.android.taxitwin.activity;
//  ww w .j  a  v  a 2  s. c  om
import android.app.Activity;
import android.content.Intent;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import android.os.Bundle;
import kimle.michal.android.taxitwin.application.TaxiTwinApplication;
import static kimle.michal.android.taxitwin.enumerate.UserState.OWNER;
import static kimle.michal.android.taxitwin.enumerate.UserState.PARTICIPANT;

public class LauncherActivity extends Activity {

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        Intent intent;
        TaxiTwinApplication app = (TaxiTwinApplication) getApplication();
        app.register();
        switch (TaxiTwinApplication.getUserState()) {
            case NOT_SUBSCRIBED:
            case SUBSCRIBED:
                intent = new Intent(this, MainActivity.class);
                intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK);
                break;
            case PARTICIPANT:
                intent = new Intent(this, MyTaxiTwinActivity.class);
                intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK);
                break;
            case OWNER:
                intent = new Intent(this, MyTaxiTwinActivity.class);
                intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK);
                break;
            default:
                intent = new Intent(this, MainActivity.class);
                intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK);
        }
        startActivity(intent);
        finish();
    }
}




Java Source Code List

kimle.michal.android.taxitwin.activity.LauncherActivity.java
kimle.michal.android.taxitwin.activity.MainActivity.java
kimle.michal.android.taxitwin.activity.MyTaxiTwinActivity.java
kimle.michal.android.taxitwin.activity.OfferDetailActivity.java
kimle.michal.android.taxitwin.activity.ResponseDetailActivity.java
kimle.michal.android.taxitwin.activity.ResponsesActivity.java
kimle.michal.android.taxitwin.adapter.TaxiTwinPlacesAutoCompleteAdapter.java
kimle.michal.android.taxitwin.application.TaxiTwinApplication.java
kimle.michal.android.taxitwin.contentprovider.TaxiTwinContentProvider.java
kimle.michal.android.taxitwin.db.DbContract.java
kimle.michal.android.taxitwin.db.DbHelper.java
kimle.michal.android.taxitwin.dialog.alert.AddressAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.GPSAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.GooglePlayServicesAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.InternetAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.LeaveTaxiTwinAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.ServicesAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.TaxiTwinAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.alert.TaxiTwinNoLongerAlertDialogFragment.java
kimle.michal.android.taxitwin.dialog.error.GooglePlayServicesErrorDialogFragment.java
kimle.michal.android.taxitwin.dialog.error.OfferErrorDialogFragment.java
kimle.michal.android.taxitwin.dialog.error.PlaceErrorDialogFragment.java
kimle.michal.android.taxitwin.dialog.error.ResponseErrorDialogFragment.java
kimle.michal.android.taxitwin.entity.Place.java
kimle.michal.android.taxitwin.enumerate.UserState.java
kimle.michal.android.taxitwin.fragment.TaxiTwinListFragment.java
kimle.michal.android.taxitwin.fragment.TaxiTwinMapFragment.java
kimle.michal.android.taxitwin.gcm.GcmBroadcastReceiver.java
kimle.michal.android.taxitwin.gcm.GcmConnector.java
kimle.michal.android.taxitwin.gcm.GcmHandler.java
kimle.michal.android.taxitwin.gcm.GcmIntentService.java
kimle.michal.android.taxitwin.popup.SettingsPopup.java
kimle.michal.android.taxitwin.services.ServicesManagement.java
kimle.michal.android.taxitwin.view.TaxiTwinAutoCompleteTextView.java