Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/**
 * @copyright Urucas
 * @license   Copyright (C) 2013. All rights reserved
 * @version   Release: 1.0.0
 * @link       http://urucas.com
 * @developers Bruno Alassia, Pamela Prosperi
 */

import android.content.Context;

import android.telephony.TelephonyManager;

public class Main {
    public static String getRegionCodeFromSIM(Context context) {
        TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        return telephonyManager.getSimCountryIso();
    }
}