check Bundle - Android Android OS

Android examples for Android OS:Bundle

Description

check Bundle

Demo Code


//package com.book2s;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

public class Main {
    public static void checkBundle(Context context, Bundle bundle) {
        if (bundle == null) {
            Intent i = context.getPackageManager()
                    .getLaunchIntentForPackage(context.getPackageName());
            i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            context.startActivity(i);//  w w w .jav  a  2 s  .com
        }
    }
}

Related Tutorials