User Tools

Site Tools


built_in:start_app

Differences

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

Link to this comparison view

built_in:start_app [2016/09/14 19:08]
titus [Example]
built_in:start_app [2016/09/15 03:08]
Line 1: Line 1:
-=====StartApp===== 
  
-//(Information and examples taken from the DroidScript documentation)// 
- 
-====Description==== 
- 
-Starts DroidScript application from script in **file**. File is the fullpath to the app. Parameter **options** is optional. 
-\\ Intent contains information to be transferred to the other app. e.g \\ action \\ type \\ data \\ extras 
-. \\ Compile your intent as an object then convert to JSON 
- 
-<code> 
-app.StartApp(file,options,intent) 
-</code> 
- 
----- 
- 
-====Example==== 
- 
-<code javascript> 
-var data ={ 
-action:"android.intent.action.VIEW", 
-type : "message/rfc822", 
-data:"/sdcard/yourfile.jpg", 
-extras:{name:"android.intent.extra.EMAIL",type:"list",value:"yourname@gmail.com"} 
-} 
-var intent= JSON.stringify(data) 
-app.StartApp("/sdcard/DroidScript/PhotoViewer/PhotoViewer.js,"",intent ); 
-//Option can be **debug** 
-</code> 
built_in/start_app.txt ยท Last modified: 2016/09/15 03:08 (external edit)