Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; public class Main { public static boolean startActivityForResult(Activity activity, Intent intent, int requestCode) { if (activity == null || intent == null) { return false; } try { activity.startActivityForResult(intent, requestCode); } catch (Exception globalException) { globalException.printStackTrace(); return false; } return true; } }