List of utility methods to do Intent Create
void | pickNcapture(Activity activity, Uri outputFileUri) pick Ncapture Intent pickIntent = new Intent(); pickIntent.setType("image/*"); pickIntent.setAction(Intent.ACTION_GET_CONTENT); Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); takePhotoIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri); String pickTitle = "Select or take a new Picture"; Intent chooserIntent = Intent.createChooser(pickIntent, pickTitle); chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, ... |
void | organizeAndStart(Activity activity, Class> classes, Map organize And Start intent = new Intent(activity, classes); if (null != paramMap) { Set<String> set = paramMap.keySet(); for (Iterator<String> iterator = set.iterator(); iterator .hasNext();) { String key = iterator.next(); intent.putExtra(key, paramMap.get(key)); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); activity.startActivity(intent); |
boolean | onKeyBackGoHome(Activity activity, int keyCode, KeyEvent event) on Key Back Go Home if (!(keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0)) { return false; activity.startActivity(new Intent().setAction(Intent.ACTION_MAIN) .addCategory(Intent.CATEGORY_HOME)); return true; |
void | makeCall(Activity activity, String telNumber) make Call activity.startActivity(new Intent(Intent.ACTION_CALL, Uri .parse("tel:" + telNumber))); |
void | PhotoIntent(Activity activity) Photo Intent Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Uri fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
activity.startActivityForResult(intent,
CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
|
void | VideoIntent(Activity activity) Video Intent Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
Uri fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
activity.startActivityForResult(intent,
CAPTURE_VIDEO_ACTIVITY_REQUEST_CODE);
|
void | call(String aPhoneNumber, Activity aActivity) Calls a phone number Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:" + aPhoneNumber)); aActivity.startActivity(callIntent); |
void | intentSysDefault(Activity activity, Class> classes, Map intent Sys Default organizeAndStart(activity, classes, paramMap); |
void | audioBecomingNoisy(Context c) Send a AudioManager.ACTION_AUDIO_BECOMING_NOISY event. Intent i = new Intent();
i.setAction(android.media.AudioManager.ACTION_AUDIO_BECOMING_NOISY);
c.sendBroadcast(i);
|
void | launchUrlInBrowser(Context context, String url) launch Url In Browser Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
context.startActivity(i);
|