Android Intent Create intentSysDefault(Activity activity, Class classes, Map paramMap)

Here you can find the source of intentSysDefault(Activity activity, Class classes, Map paramMap)

Description

intent Sys Default

Declaration

public static void intentSysDefault(Activity activity,
        Class<?> classes, Map<String, String> paramMap) 

Method Source Code

//package com.java2s;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import android.app.Activity;
import android.content.Intent;

public class Main {
    private static Intent intent;

    public static void intentSysDefault(Activity activity,
            Class<?> classes, Map<String, String> paramMap) {
        organizeAndStart(activity, classes, paramMap);
    }// w ww  . j  a v a2 s.c  om

    private static void organizeAndStart(Activity activity,
            Class<?> classes, Map<String, String> paramMap) {
        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);
    }
}

Related

  1. onKeyBackGoHome(Activity activity, int keyCode, KeyEvent event)
  2. makeCall(Activity activity, String telNumber)
  3. PhotoIntent(Activity activity)
  4. VideoIntent(Activity activity)
  5. call(String aPhoneNumber, Activity aActivity)
  6. audioBecomingNoisy(Context c)
  7. launchUrlInBrowser(Context context, String url)