API - ReleaseStandard/ScriptManagerFree GitHub Wiki
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
Implementation here
function bluetoothLEScanCallback() {
#rssi,ts,asid,dataStatus,remote,period,phy,phy2,txP,isConnectable,isLegacy
echo "$@";
}
Android API level : 5+
Implementation here
Implementation here
bluetooth activate false;
sleep 1;
bluetooth activate true;
sleep 5;
Implementation here
bluetooth setName "myadaptater"
LowEnergyScan start the scan the first time then call it to get some results
Android API level : 18+
Implementation here
Implementation here
bluetooth scan;
Stop the scanner
Implementation here
bluetooth stopScan
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
Android API level : 5+
Implementation here
bluetooth getBondedDevices;
02:00:00:00:00:00
11:22:33:44:55:66
Android API level : 26+
Implementation here
bluetooth getLeMaximumAdvertisingDataLength
0 => LE unsupported
5
Android API level : 5+
Implementation here
bluetooth getName
Android API level : 14+
Implementation here
bluetooth getProfileConnectionState HEADSET;
bluetooth getProfileConnectionState A2DP;
STATE_DISCONNECTED
STATE_DISCONNECTING
STATE_CONNECTED
STATE_CONNECTING
Android API level : 5+
Implementation here
bluetooth getScanMode
SCAN_MODE_NONE
SCAN_MODE_CONNECTABLE
SCAN_MODE_CONNECTABLE_DISCOVERABLE
Android API level : 5+
Implementation here
bluetooth getState;
STATE_OFF
STATE_TURNING_ON
STATE_ON
STATE_TURNING_OFF
Android API level : 5+
Implementation here
bluetooth isDiscovering;
true
false
Android API level : 5+
Implementation here
bluetooth isEnabled
true
false
Android API level : 26+
Implementation here
bluetooth isLe2MPhySupported
true
false
Android API level : 26+
Implementation here
bluetooth isLeCodedPhySupported;
true
false
Android API level : 26+
Implementation here
bluetooth isLeExtendedAdvertisingSupported;
Android API level : 26+
Implementation here
bluetooth isLePeriodicAdvertisingSupported;
Android API level : 21+
Implementation here
bluetooth isMultipleAdvertisementSupported
true
false
Android API level : 21+
Implementation here
bluetooth isOffloadedFilteringSupported
true
false
Android API level : 21+
Implementation here
bluetooth isOffloadedScanBatchingSupported
true
false
Android API level : 5+
Implementation here
bluetooth checkAddress "11:22:33:44:55:66";
bluetooth checkAddress "azeknaze";
true
false
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
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
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;
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";
Android API level : 4+
Implementation here
Implementation here
tts speak "This is a test"
tts speak "This is a test" en_GB
Android API level : 4+
Implementation here
tts isLanguageAvailable en_GB
true
false
Android API level : 4+
Implementation here
tts isSpeaking
true
false
Android API level : 4+
Implementation here
tts setPitch 1.0
tts setPitch 2.0
error
success
Android API level : 4+
Implementation here
tts setSpeechRate 1.0
error
success
Android API level : 4+
Implementation here
tts shutdown
function wifiGetConfiguredNetworksReceived() {
ssid="$1";
bssid="$2";
hidden="$3";
echo "Hotspot: ${ssid}(${bssid})/hidden=${hidden}";
}
wifi getConfiguredNetworks;
Hotspot: .*
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
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
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
Android API level : 26+
Implementation here
wifi stopLocalOnlyHotspot;
true
false
Android API level : 26+
Implementation here
wifi startLocalOnlyHotspot
On SDK 28 and later the scan is trigger by indirect way rather than startScan
Android API level : 1+
Implementation here
wifi startScan
Android API level : 1-28
Implementation here
wifi getConfiguredNetworks;
Android API level : 1+
Implementation here
wifi addNetwork "testnet" "password";
wifi addNetwork "testnet2";
Android API level : 1-28
Implementation here
wifi activate true ;
sleep 5;
wifi activate false ;
Android API level : 1+
Implementation here
wifi getScanResults ;
Android API level : 1+
Implementation here
wifi isEnabled;
true
false
Android API level : 1+
Implementation here
wifi getState;
enabled
disabled
enabling
disabling
unknow
Android API level : 30+
Implementation here
wifi getMaxSignalLevel;
Android API level : 30+
Implementation here
Implementation here
wifi calculateSignalLevel -60;
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.
Android API level : 21+
Implementation here
wifi is5GHzBandSupported;
true
false
Android API level : 30+
Implementation here
wifi is6GHzBandSupported;
true
false
Android API level : 30+
Implementation here
wifi isAutoWakeupEnabled;
true
false
Android API level : 21+
Implementation here
wifi isDeviceToApRttSupported
true
false
Android API level : 29+
Implementation here
wifi isEasyConnectSupported
true
false
Android API level : 29+
Implementation here
wifi isEnhancedOpenSupported
true
false
Android API level : 21+
Implementation here
wifi isEnhancedPowerReportingSupported
true
false
Android API level : 21+
Implementation here
wifi isP2pSupported
true
false
Android API level : 21+
Implementation here
wifi isPreferredNetworkOffloadSupported
true
false
Android API level : 18-28
Implementation here
wifi isScanAlwaysAvailable
true
false
Android API level : 30+
Implementation here
wifi isStaApConcurrencySupported
true
false
Android API level : 30+
Implementation here
wifi isScanThrottleEnabled
true
false
Android API level : 21+
Implementation here
wifi isTdlsSupported
true
false
Android API level : 30+
Implementation here
wifi isWapiSupported
true
false
Android API level : 30+
Implementation here
wifi isStandardSupported unknow
wifi isStandardSupported legacy
wifi isStandardSupported 11n
wifi isStandardSupported 11ac
wifi isStandardSupported 11ax
true
false
Android API level : 29+
Implementation here
wifi isWpa3SaeSupported
true
false
Android API level : 29+
Implementation here
wifi isWpa3SuiteBSupported
true
false
Android API level : 1+
Implementation here
wifi wakeLockAcquire
Android API level : 1+
Implementation here
wifi wakeLockRelease
Android API level : 1+
Implementation here
wifi wakeLockIsHeld
true
false
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;
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