User Tools

Site Tools


Sidebar

Privacy Policy

News

Version 2.50 is out since Jan 1st 2022


Frequently Asked Questions


Namespaces

Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax

built_in:call

Table of Contents

Call

Description

The Call method makes phone call to a number.

 app.Call( number );

Example

function OnStart()
{
	//Create a layout with objects vertically centered.
	lay = app.CreateLayout( "Linear", "Vertical,VCenter,FillXY" );	
 
	txt = app.CreateText( "Please type phone number to call:", 0.5, 0.05 );
	txt.SetMargins( 0, 0.05, 0, 0 );
	lay.AddChild( txt );
 
	edt = app.CreateTextEdit( "", 0.5, 0.08, "Number" );
	edt.SetMargins( 0, 0, 0, 0.05 );
	edt.SetBackColor( "#333333" );
	lay.AddChild( edt );
 
	btn = app.CreateButton( "[fa-phone]  Call", 0.5, 0.1, "FontAwesome" );
	btn.SetMargins( 0, 0.05, 0, 0.05 );
	btn.SetTextSize( 20 );
	lay.AddChild( btn );
 
	//Set function to call when button pressed.
	btn.SetOnTouch( btn_OnTouch );
 
	//Add layout to app.	
	app.AddLayout( lay );     
}
 
function btn_OnTouch()
{
	app.Call( edt.GetText() );
}
built_in/call.txt · Last modified: 2018/04/15 12:55 (external edit)