User Tools

Site Tools


built_in:call

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:call [2015/03/26 21:03]
madlyr created
built_in:call [2018/04/15 12:55]
Line 1: Line 1:
-=====Call===== 
  
-====Description==== 
- 
-The **Call** method makes phone call to a **number**.  
-<code> app.Call( number );</code> 
- 
-====Example==== 
- 
-<code javascript> 
- 
-function OnStart() 
-{ 
- //Create a layout with objects vertically centered. 
- lay = app.CreateLayout( "Linear", "Vertical,VCenter,FillXY" );  
- 
- txt = app.CreateText( "Please type phoe number to call:", 0.5, 0.05 ); 
- txt.SetMargins( 0, 0.05, 0, 0 ); 
- lay.AddChild( txt ); 
- 
- edt = app.CreateTextEdit( "", 0.5, 0.1 ); 
- edt.SetMargins( 0, 0, 0, 0.05 ); 
- 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() ); 
-} 
- 
-</code> 
built_in/call.txt ยท Last modified: 2018/04/15 12:55 (external edit)