Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Intent;
import android.net.Uri;

public class Main {
    /**
     * @brief      Get the intent to make a call.
     *
     * @par        Sync (or) Async:
     * This is a Synchronous function.
     *
     * @param [IN] telNumber    Telephone number.\n
     * 
     * @return     
     *
     * @author     daiping.zhao
     * @since      1.0.0.0
     * @version    1.0.0.0
     * @par        Prospective Clients:
     * External Classes
     */
    public static Intent doCall(String telNumber) {
        Uri uri = Uri.parse("tel:" + telNumber);
        Intent intent = new Intent(Intent.ACTION_CALL);
        intent.setData(uri);
        return intent;
    }
}