Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

import android.content.pm.PackageManager;

public class Main {
    /**
     * Checks if this device supports SMS.
     * 
     * @param context the Android context.
     * @return true if this device is SMS capable; false otherwise.
     */
    public static boolean isSmsSupported(Context context) {
        PackageManager manager = context.getPackageManager();

        if (manager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
            return true;
        }

        return false;
    }
}