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

intents:open_apps

Open default browser app

app.SendIntent(null, null,
"android.intent.action.MAIN",
"android.intent.category.APP_BROWSER");

Open default music app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_MUSIC");

Open default calculator app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_CALCULATOR");

Open default contacts app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_CONTACTS");

Open default email app

app.SendIntent(null, null,
"android.intent.action.MAIN", 
"android.intent.category.APP_EMAIL");

Open default maps app

app.SendIntent(null, null, 
“android.intent.action.MAIN”, 
“android.intent.category.APP_MAPS”);

As an alternative, you may wish to open Google Maps specifically - the code should really be on this separate page

app.SendIntent(
  "com.google.android.apps.maps",
  null,
  "android.intent.action.VIEW",
  "android.intent.category.DEFAULT",
  "geo:0,0?q=34.5678,123.4567 (Placename)"   // uri argument
);

Replace the coordinates and Placename in the uri argument with those for the desired location. (Optionally, you can omit Placename along with the parentheses.)

Open default gallery app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_GALLERY");

Open default calendar app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_CALENDAR");

Open default market app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_MARKET");

Open default messaging app

app.SendIntent(null, null, 
"android.intent.action.MAIN", 
"android.intent.category.APP_MESSAGING");

Open bluetooth settings

app.SendIntent(null,null,
"android.settings.BLUETOOTH_SETTINGS" )

Open WiFi settings

app.SendIntent(null,null,
"android.settings.WIFI_SETTINGS" )

Other Settings

See https://developer.android.com/reference/android/provider/Settings
The Constants section contains Actions (use as 3rd parameter on SendIntent,
replacing ACTION_ by android.settings.)

intents/open_apps.txt · Last modified: 2021/10/29 14:59 by al4he6