start Activity For Result - Android android.app

Android examples for android.app:Activity Start

Description

start Activity For Result

Demo Code

import android.app.Activity;
import android.content.Intent;

public class Main{

    public static void startActivityForResult(Activity context,
            Class<?> cls, String data, int flag) {
        Intent intent = new Intent(context, cls);
        intent.putExtra("data", data);
        intent.setFlags(flag);//from   w  w  w  . j  a v a2s . c om
        context.startActivityForResult(intent, flag);
    }

}

Related Tutorials