exist Sms App - Android App

Android examples for App:APK Information

Description

exist Sms App

Demo Code


//package com.java2s;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;

public class Main {
    public static boolean existSmsApp(Context context) {
        Intent it = new Intent(Intent.ACTION_SENDTO);
        return verifyIntentReceiveApp(context, it);
    }/*  ww w  .  jav  a2 s .  c om*/

    public static boolean verifyIntentReceiveApp(Context context,
            Intent intent) {
        PackageManager pm = context.getPackageManager();
        ComponentName componentName = intent.resolveActivity(pm);
        return componentName != null;
    }
}

Related Tutorials