get Phone Id - Android android.provider

Android examples for android.provider:Settings

Description

get Phone Id

Demo Code


//package com.java2s;

import android.content.Context;

import android.provider.Settings.Secure;

public class Main {
    public static String getPhoneId(Context context) {
        return Secure.getString(context.getContentResolver(),
                Secure.ANDROID_ID);//w ww  . j  a v a 2s .c o m
    }
}

Related Tutorials