Android Intent Check isActionEquals(Intent intent, String expected)

Here you can find the source of isActionEquals(Intent intent, String expected)

Description

is Action Equals

Declaration

public static boolean isActionEquals(Intent intent, String expected) 

Method Source Code

//package com.java2s;

import android.content.Intent;

public class Main {
    public static boolean isActionEquals(Intent intent, String expected) {
        if (expected == null) {
            return false;
        } else {//from   ww  w.j a v  a  2 s .  c  o  m
            String action = getAction(intent);
            return action != null && action.equals(expected);
        }
    }

    public static String getAction(Intent intent) {
        if (intent != null) {
            return intent.getAction();
        }
        return null;
    }
}

Related

  1. getAction(Intent intent)
  2. isActionEquals(Intent intent, String expected)
  3. isBroadcastSafe(Context context, Intent intent)
  4. isIntentAvailable(Context context, String action)
  5. isIntentSafe(Context context, Intent intent)
  6. genPendingBroadcast(Context context, int requestCode, Intent broadcastIntent)