Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;

public class Main {
    public static boolean isIntentResolvable(final Context pContext, final Intent pIntent) {
        final List<ResolveInfo> resolveInfo = pContext.getPackageManager().queryIntentActivities(pIntent, 0);
        return (resolveInfo != null) && !resolveInfo.isEmpty();
    }
}