API - ReleaseStandard/ScriptManagerFree GitHub Wiki

API reference

This is the reference of Scriptmanager API.

For each property you may find :

  • Android API compatibility level.
  • Underlying properties.
  • Usage and expected output if any.
usage
expected output

Bluetooth

bluetoothLEScanCallback try it

Implementation here

function bluetoothLEScanCallback() {
     #rssi,ts,asid,dataStatus,remote,period,phy,phy2,txP,isConnectable,isLegacy
     echo "$@";
}

activate try it

Android API level : 5+
Implementation here
Implementation here

bluetooth activate false;
sleep 1;
bluetooth activate true;
sleep 5;

setName try it

Implementation here

bluetooth setName "myadaptater"

scan try it

LowEnergyScan start the scan the first time then call it to get some results
Android API level : 18+
Implementation here
Implementation here

bluetooth scan;

stopScan try it

Stop the scanner
Implementation here

bluetooth stopScan

getAddress try it

API 23 will return 02:00:00:00:00:00
Android API level : 5-22
Implementation here

bluetooth getAddress;
02:00:00:00:00:00

getBondedDevices try it

Android API level : 5+
Implementation here

bluetooth getBondedDevices;
02:00:00:00:00:00
11:22:33:44:55:66

getLeMaximumAdvertisingDataLength try it

Android API level : 26+
Implementation here

bluetooth getLeMaximumAdvertisingDataLength
0 => LE unsupported
5

getName try it

Android API level : 5+
Implementation here

bluetooth getName

getProfileConnectionState try it

Android API level : 14+
Implementation here

bluetooth getProfileConnectionState HEADSET;
bluetooth getProfileConnectionState A2DP;
STATE_DISCONNECTED
STATE_DISCONNECTING
STATE_CONNECTED
STATE_CONNECTING

getScanMode try it

Android API level : 5+
Implementation here

bluetooth getScanMode
SCAN_MODE_NONE
SCAN_MODE_CONNECTABLE
SCAN_MODE_CONNECTABLE_DISCOVERABLE

getState try it

Android API level : 5+
Implementation here

bluetooth getState;
STATE_OFF
STATE_TURNING_ON
STATE_ON
STATE_TURNING_OFF

isDiscovering try it

Android API level : 5+
Implementation here

bluetooth isDiscovering;
true
false

isEnabled try it

Android API level : 5+
Implementation here

bluetooth isEnabled
true
false

isLe2MPhySupported try it

Android API level : 26+
Implementation here

bluetooth isLe2MPhySupported
true
false

isLeCodedPhySupported try it

Android API level : 26+
Implementation here

bluetooth isLeCodedPhySupported;
true
false

isLeExtendedAdvertisingSupported try it

Android API level : 26+
Implementation here

bluetooth isLeExtendedAdvertisingSupported;

isLePeriodicAdvertisingSupported try it

Android API level : 26+
Implementation here

bluetooth isLePeriodicAdvertisingSupported;

isMultipleAdvertisementSupported try it

Android API level : 21+
Implementation here

bluetooth isMultipleAdvertisementSupported
true
false

isOffloadedFilteringSupported try it

Android API level : 21+
Implementation here

bluetooth isOffloadedFilteringSupported
true
false

isOffloadedScanBatchingSupported try it

Android API level : 21+
Implementation here

bluetooth isOffloadedScanBatchingSupported
true
false

checkAddress try it

Android API level : 5+
Implementation here

bluetooth checkAddress "11:22:33:44:55:66";
bluetooth checkAddress "azeknaze";
true
false

LEAstartAdvertising try it

Android API level : 21+
Implementation here

bluetooth LEAstartAdvertising ADVERTISE_MODE_LOW_POWER true 10000 ADVERTISE_TX_POWER_HIGH 0 "" "00001101-0000-1000-8000-00805F9B34FB" "" true true;
10000 ADVERTISE_TX_POWER_HIGH true

Camera

Http

httpResponse try it

handle http response
Android API level : 1+
Implementation here

function httpResponse() {
   method="$1";
   response_body="$2";
   response_headers="$3";
   echo "httpResponse ${method}";
   echo "${response_headers}";
   echo "Your ip is ${response_body}";
}
echo "get";
http get "https://gorest.co.in/public-api/users" "Accept: application/json" ;
http get "https://gorest.co.in/public-api/users" "Accept: application/html" ;

echo "delete";
#http delete "https://gorest.co.in/public-api/users/123" "Accept: application/json" "Content-Type: applicanntion/jsobb. n" "Authorization: Beajhhhrer ACCESS-TOKEN"
http delete "https://gorest.co.in/public-api/users/123" "Accept: application/json" "Content-Type: application/json" "Authorization: Bearer ACCESS-TOKEN"

echo "post";
jd='{"name":"Tenali Ramakrishna", "gender":"Male", "email":"[email protected]", "status":"Active"}';
http post "${jd}" "https://gorest.co.in/public-api/users" "Accept:application/json" "Content-Type:application/json" "Authorization: Bearer ACCESS-TOKEN"

sleep 10;
echo "settings";
http settings;
http settings list;
http settings get cookies;
http settings put cookies=false;
sleep 2;
http settings put cookies=true;
sleep 2;
http settings;
TODO

http try it

Android API level : 1+
Implementation here

echo "get";
http get "https://gorest.co.in/public-api/users" "Accept: application/json" ;
http get "https://gorest.co.in/public-api/users" "Accept: application/html" ;

echo "delete";
#http delete "https://gorest.co.in/public-api/users/123" "Accept: application/json" "Content-Type: applicanntion/jsobb. n" "Authorization: Beajhhhrer ACCESS-TOKEN"
http delete "https://gorest.co.in/public-api/users/123" "Accept: application/json" "Content-Type: application/json" "Authorization: Bearer ACCESS-TOKEN"

echo "post";
jd='{"name":"Tenali Ramakrishna", "gender":"Male", "email":"[email protected]", "status":"Active"}';
http post "${jd}" "https://gorest.co.in/public-api/users" "Accept:application/json" "Content-Type:application/json" "Authorization: Bearer ACCESS-TOKEN"

sleep 10;
echo "settings";
http settings;
http settings list;
http settings get cookies;
http settings put cookies=false;
sleep 2;
http settings put cookies=true;
sleep 2;
http settings;

Mod

Notification

show try it

Icon could be "alert", "play", "pause", "delete", "power", "lock"
Android API level : 14+
Implementation here

notification show "Test" "something play" "play";
notification show "Test" "pause notification" "pause";
notification show "Test" "delete notification" "delete";
notification show "Test" "power notification" "power";
notification show "Test" "lock notification" "lock";
notification show "Test" "alert notification" "alert";
notification show "Simple notification";

Test

TTS

speak try it

Android API level : 4+
Implementation here
Implementation here

tts speak "This is a test"
tts speak "This is a test" en_GB

isLanguageAvailable try it

Android API level : 4+
Implementation here

tts isLanguageAvailable en_GB
true
false

isSpeaking try it

Android API level : 4+
Implementation here

tts isSpeaking
true
false

setPitch try it

Android API level : 4+
Implementation here

tts setPitch 1.0
tts setPitch 2.0
error
success

setSpeechRate try it

Android API level : 4+
Implementation here

tts setSpeechRate 1.0
error
success

shutdown try it

Android API level : 4+
Implementation here

tts shutdown

Wifi

wifiGetConfiguredNetworksReceived try it

function wifiGetConfiguredNetworksReceived() {
     ssid="$1";
     bssid="$2";
     hidden="$3";
     echo "Hotspot: ${ssid}(${bssid})/hidden=${hidden}";
}
wifi getConfiguredNetworks;
Hotspot: .*

wifiGetScanResultsRecv try it

To use this function, you have to manually activate wifi, otherwise it will raise an error notification

function wifiGetScanResultsRecv() {
     ssid="$1";bssid="$2";capabilities="$3";
     frequency="$4";level="$5";
     timestamp="$6"; # empty if API < 17
     ## empty if API < 23
       centerFreq0="$7";centerFreq1="$8";channelWidth="$9";
     ##
     echo "Wifi AP found : ssid=$ssid,bssid=$bssid,capabilities=$capabilities,frequency=$frequency,level=$level,timestamp=$timestamp,centerFreq0=$centerFreq0,centerFreq1=$centerFreq1,channelWidth=$channelWidth";
}
wifi getScanResults;
Wifi AP found : ssid=testnet,bssid=00:00:00:00:00:00,capabilities=[WPA2-PSK-CCMP],frequency=2412,level=-80,timestamp=1615469755,centerFreq0=0,centerFreq1=0,channelWidth=0

LocalOnlyHotspotCallback try it

Implementation here

function LocalOnlyHotspotCallback() {
    type="$1";
    optionnal="$2";
    echo "$type $optionnal";
}
wifi startLocalOnlyHotspot;
stopped
started
failed ERROR_TETHERING_DISALLOWED
failed ERROR_GENERIC
failed ERROR_INCOMPATIBLE_MODE
failed ERROR_NO_CHANNEL

getSoftApConfiguration try it

Android API level : 26+
Implementation here
Implementation here

wifi startLocalOnlyHotspot
wifi getSoftApConfiguration;
AndroidShare_1000 false mymdp SECURITY_TYPE_WPA3_SAE_TRANSITION 02:00:00:00:00:00
AndroidShare_1000 true  mymdp SECURITY_TYPE_WPA3_SAE_TRANSITION 02:00:00:00:00:00
AndroidShare_1000 false mymdp

stopLocalOnlyHotspot try it

Android API level : 26+
Implementation here

wifi stopLocalOnlyHotspot;
true
false

startLocalOnlyHotspot try it

Android API level : 26+
Implementation here

wifi startLocalOnlyHotspot

startScan try it

On SDK 28 and later the scan is trigger by indirect way rather than startScan
Android API level : 1+
Implementation here

wifi startScan

getConfiguredNetworks try it

Android API level : 1-28
Implementation here

wifi getConfiguredNetworks;

addNetwork try it

Android API level : 1+
Implementation here

wifi addNetwork "testnet" "password";
wifi addNetwork "testnet2";

activate try it

Android API level : 1-28
Implementation here

wifi activate true ;
sleep 5;
wifi activate false ;

getScanResults try it

Android API level : 1+
Implementation here

wifi getScanResults ;

isEnabled try it

Android API level : 1+
Implementation here

wifi isEnabled;
true
false

getState try it

Android API level : 1+
Implementation here

wifi getState;
enabled
disabled
enabling
disabling
unknow

getMaxSignalLevel try it

Android API level : 30+
Implementation here

wifi getMaxSignalLevel;

calculateSignalLevel try it

Android API level : 30+
Implementation here
Implementation here

wifi calculateSignalLevel -60;

compareSignalLevel try it

Android API level : 1+
Implementation here

wifi compareSignalLevel -60 -65;
Returns <0 if the first signal is weaker than the second signal, 0 if the two signals have the same strength, and >0 if the first signal is stronger than the second signal.

is5GHzBandSupported try it

Android API level : 21+
Implementation here

wifi is5GHzBandSupported;
true
false

is6GHzBandSupported try it

Android API level : 30+
Implementation here

wifi is6GHzBandSupported;
true
false

isAutoWakeupEnabled try it

Android API level : 30+
Implementation here

wifi isAutoWakeupEnabled;
true
false

isDeviceToApRttSupported try it

Android API level : 21+
Implementation here

wifi isDeviceToApRttSupported
true
false

isEasyConnectSupported try it

Android API level : 29+
Implementation here

wifi isEasyConnectSupported
true
false

isEnhancedOpenSupported try it

Android API level : 29+
Implementation here

wifi isEnhancedOpenSupported
true
false

isEnhancedPowerReportingSupported try it

Android API level : 21+
Implementation here

wifi isEnhancedPowerReportingSupported
true
false

isP2pSupported try it

Android API level : 21+
Implementation here

wifi isP2pSupported
true
false

isPreferredNetworkOffloadSupported try it

Android API level : 21+
Implementation here

wifi isPreferredNetworkOffloadSupported
true
false

isScanAlwaysAvailable try it

Android API level : 18-28
Implementation here

wifi isScanAlwaysAvailable
true
false

isStaApConcurrencySupported try it

Android API level : 30+
Implementation here

wifi isStaApConcurrencySupported
true
false

isScanThrottleEnabled try it

Android API level : 30+
Implementation here

wifi isScanThrottleEnabled
true
false

isTdlsSupported try it

Android API level : 21+
Implementation here

wifi isTdlsSupported
true
false

isWapiSupported try it

Android API level : 30+
Implementation here

wifi isWapiSupported
true
false

isStandardSupported try it

Android API level : 30+
Implementation here

wifi isStandardSupported unknow
wifi isStandardSupported legacy
wifi isStandardSupported 11n
wifi isStandardSupported 11ac
wifi isStandardSupported 11ax
true
false

isWpa3SaeSupported try it

Android API level : 29+
Implementation here

wifi isWpa3SaeSupported
true
false

isWpa3SuiteBSupported try it

Android API level : 29+
Implementation here

wifi isWpa3SuiteBSupported
true
false

wakeLockAcquire try it

Android API level : 1+
Implementation here

wifi wakeLockAcquire

wakeLockRelease try it

Android API level : 1+
Implementation here

wifi wakeLockRelease

wakeLockIsHeld try it

Android API level : 1+
Implementation here

wifi wakeLockIsHeld
true
false

setTdlsEnabled try it

Android API level : 19+
Implementation here
Implementation here

wifi setTdlsEnabled "02:00:00:00:00:00" true;
wifi setTdlsEnabled "02:00:00:00:00:00" false;
wifi setTdlsEnabled "127.0.0.1" false;
wifi setTdlsEnabled "127.0.0.1" true;

getConnectionInfo try it

Android API level : 1-30
Implementation here

wifi getConnectionInfo;
#ssid bssid hidden mac rssi frequency passpfn getRxLinkSpeedMbps getTxLinkSpeedMbps getWifiStandard
testnet 02:00:00:00:00:00 false 02:00:00:00:00:00 5 2412 test 2.1 0.5 11n
⚠️ **GitHub.com Fallback** ⚠️