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.provider.Settings.Secure;

public class Main {
    /**
     * Gets device's Android ID.
     * @since   0.1.0
     * @param   aContext The context from which the ContentResolver is retrieved to read the Android ID.
     * @return   The Android ID.
     */
    public static String getAndroidId(Context aContext) {
        return Secure.getString(aContext.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
    }
}