Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.accounts.Account;
import android.accounts.AccountManager;

public class Main {
    private static Account getAccount(AccountManager accountManager) {
        Account[] accounts = accountManager.getAccountsByType("com.google");
        Account account = null;
        if (accounts.length > 0) {
            account = accounts[0];
        }
        return account;
    }
}