Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import java.util.List;

public class Main {
    public static final String ACTION = "com.adamrocker.android.simeji.ACTION_INTERCEPT";
    public static final String CATEGORY = "com.adamrocker.android.simeji.REPLACE";

    /**
     * @return the List of applications which support Mushroom protocol.
     */
    public static List<ResolveInfo> getMushroomApplicationList(PackageManager packageManager) {
        Intent intent = new Intent();
        intent.setAction(ACTION);
        intent.addCategory(CATEGORY);
        return packageManager.queryIntentActivities(intent, 0);
    }
}