In addition, App side setting have one
self access prohibition function. *Operations of expanded function may
differ depending on the model. |
EX_CAMERA |
[Features] To take the picture with the built-in camera.
[Format] EX_CAMERA n, ["filename"]
[Explanation]
For horizontal screen mode.
n=
0Stop preview.
n=1 Start preview.
n= 2Take a picture. And save to "filename". (.png
.jpg)
n= 3 ex_camera 3, on
Autofocus-ON
ex_camera 3, off Autofocus-OFF
The
preview mode can close by stop key or back key.
(Android6.0 more) Please set in advance.
Android Setting > Application > Basic >
Permission :Camera/ON state
[e.g.] [smp_camera.bas]
10 ex_camera 1
20 while touch(2)= 0: pause10: wend
30 ex_camera 2,"test.png"
40 ex_camera 0
GPS |
[Features] ON/OFF switch for
receiving the GPS.
[Format] GPS
ON/OFF
[Explanation]
Data reception has to turn on GPS reception beforehand,
this command'GPS' is also possible to switch
on/off.(Before Android2.2)
In Android2.3 later models,
because it can not be automatic switching,
setting
screen of GPS is called.
After switching manually,
please return by back button.
(It do not advance to the
next command until return)
It's also necessary to turn
on network manually
depending on the model and
the location.
[e.g.]
gps on
print ex_gps(0)
EX_GPS |
[Features] The position information on GPS is acquired.
[Format] EX_GPS(n)
[Explanation]
n=0 Latitude is acquired.
n=1
Longitude is acquired.
n=2 Altitude is acquired.
n=3 Accuracy is
acquired.
n=4 Time
is acquired.
n=5
Speed is acquired.
n=6 Bearing is acquired.
It is necessary to turn ON a
GPS check or network by setup beforehand.
The
acquisition may take time depending on a place.
(Android6.0 more) Please set in advance.
Android Setting > Application > Basic >
Permission :GPS/ON state
[e.g.]
print
ex_gps(0)
SENSOR |
[Features] ON/OFF switch for receiving the sensor.
[Format] SENSOR [ on | off
]
[Explanation]
It turns ON before acquisition.
After use is turned OFF.
[e.g.]
EX_SENSOR |
[Features] The information on sensor is acquired.
[Format] EX_SENSOR(n)
[Explanation]
To get the value of each sensor will need its
functionality has been built.
Orientation.
n=0 Azimuth(Z axis)
is acquired.(0-360)
n=1 Pitch(X axis) is acquired.
n=2 Roll(Y axis) is acquired.
Accelerometer.
n=3 (x axis) is
acquired.
n=4 (y axis) is acquired.
n=5 (z axis) is acquired.
Several kinds sensor.
n=6
Proximity is acquired.(0~1)
n=7 Temperature is
acquired.
n=8 Illuminance is acquired.
Gyroscope.
n=9 (x axis) is
acquired.
n=10 (y axis) is acquired.
n=11 (z axis) is acquired.
Magnetic_Field.
n=12 (x axis) is
acquired.
n=13 (y axis) is acquired.
n=14 (z axis) is acquired.
Pressure.
n=15 Pressure is
acquired.
[e.g.]
[smp_sensor.bas]
10 sensor on
20 for i=1 to 1000
30 locate 0,0
40 print ex_sensor(0)
50 print ex_sensor(1)
60 print ex_sensor(2)
70 next
80 sensor off
EX_EXECUTOR |
[Features] The shortcut of a specific program is made on a home screen,
and it is able to run.
[Format] EX_EXECUTOR "filename", ["displayname"]
[Explanation]
If it isn't an existing file, it will become error.
On Android 8.0 or later, a dialog will appear asking
whether to allow shortcut creation.
*Even if Basic is
in the evacuation state, will be initialized by shortcut execution.
[e.g.]
ex_executor "test.bas","TEST"
EX_REC |
[Features] To record the sound from the
microphone.
[Format] EX_REC "filename.3gp" , [ 'seconds' | stop
]
[Explanation]
To record
the length of the specified number of seconds. (Default: 5 minutes)
Specification of 'stop' will stop a recording state.
The file format can be used for recording are ".wav"
".mp3" ".3gp".
(Android6.0 more) Please set in
advance.
Android Setting > Application > Basic
> Permission :MIC/ON state
[e.g.]
ex_rec
"sound.3gp"
pause 10000
ex_rec ,stop
EX_MOVIE |
[Features] To play back the movie.
[Format] EX_MOVIE "filename" [, start | pass | ctrl | stop
] [, StartPos(sec.)]
[Explanation]
The specified movie
is played back.
Supported formats .3gp .mp4
The starting position of the movie can be specified
by units of second.
The second parameter.
start -To begin playback. It doesn't
shift to the next command until movie finishes. Notation can be
omitted.
pass -To begin playback. shortly, it
will shift to the next command.
ctrl -It is the same as 'start', Movie control
bar is displayed.
stop -To stop
playing the movie.
After movie ended, it closes
automatically.
The Movie mode can close by
stop key or back key.
[e.g.]
ex_movie "sky.mp4" , , 15
EX_RECOGN$ |
[Features] To return string that
have been entered in the speech recognition.
[Format] EX_RECOGN$(n)
[Explanation]
First, by description of
's$=ex_recogn$(0)',
the
dialogue of speech recognition is indicated,
please speak the word input
to the smart phone.
When
the input is finished, input string assignment to string variable.
When there are no voice input
for a few seconds,
dialog
is closed and return null-string("").
Since the candidates of
recognized words is more than one,
by changing the value of n to
1,2... and,
be able to get
the string for the next candidate.
When there are no candidates
any more, to return null-string.
The kind of language inputted will be the one chosen
by (Android setting)
'Language and Input'>'Language'.
This function can be used
between the following points.
-While this Google recognition
services is available state.
-While the utilization are
within regulations.
[e.g.]
10 s$=ex_recogn$(0)
20 print s$
30 i=1
40 while ex_recogn$(i)<>""
50 print ex_recogn$(i):i=i+1
60 wend
EX_WEB |
[Features] It jumps to the WEB
page of specified address.
[Format] EX_WEB "web-address"
[Explanation]
To press 'Back' button to return to
the previous Basic screen.
[e.g.]
ex_web
"http://androidbasic.ninja-web.net/"
EX_MAP |
[Features] To display the map of
specified position by Google Map.
[Format] EX_MAP Latitude,Longitude [,Scale]
[,"Search-Location"] [,OptionSwitch]
[Explanation]
It's necessary to be in net
connection state.
'Longitude'&'Longitude'
are same type number as 'ex_gps'.
'Scale'; [Enlargement] 22 - 0
[Extensive]
It's possible to
designate a place by "Search-Location".
When designating it,
designation 'Longitude'&'Longitude' become invalid.
'OptionSwitch'
p To display by aerial
photograph.
On the map,
[Scaling-button],[Current position button] are indicated.
During map activity, Basic
commands doesn't go to next step.
By back-button, to return to
'Basic' screen.
'EX_MAP' is the command which
can be used temporarily.
It
can be used in the following conditions.
While 'Google Map' service is
provided.
The period which
has not took restriction that
the calling number of the
whole is within the regulation.
About the number of indication
times of map.
Because there
are restriction at the number of calls Google Map API whole each keys,
so even in App(Basic) on each
terminal,
there are
limit at the number of indication times, up to 5 times a day.
[e.g.]
ex_map 27.9878,86.925,8
ex_map ,,,"Sydney",p
EX_MAP$ |
[Features] To acquire coordinate
information of Google Map.
[Format] EX_MAP$(d1[,d2])
[Explanation]
Form1: EX_MAP$(d1)
d1=0 to return
Latitude.
d1=1 to
return Longitude.
d1=2 to return Scale.
Return value is string, to be
necessary to digitize with val() function.
Form2: EX_MAP$(d1,d2)
Set d1 as latitude, d2 as
longitude,
and to
acquire location information of the coordinate.
It's necessary to be in net
connection state.
[e.g.]
10 latitude=27.9878
20 longitude=86.925,8
30 print
ex_map$(latitude,longitude)
40
ex_map ,,,"Sydney":print "Sydney"
50 print
"Latitude=";ex_map$(0)
60 print
"Longitude=";ex_map$(1)
EX_QR$ |
[Features] To read and create
QR-code, Bar-code.
[Format] EX_QR$(["data or command"])
[Explanation]
It can read string data from
QR-code.
It can read number data
from Bar-code.
When execute
'a$=ex_qr$()' [data unspecify],
it become scanning screen by camera.
Please set one's sights on the code
and do the scanning.
When the
aiming is fixed and the scan is successful,
it return to the original
screen.
The read data is
substituted for string variable of left side.
In the case of Barcode-numerical
also, data is returned by a string.
It do not advance to the next
command until reading is completed.
QR-code Bar-code making.
a$=ex_qr$("string data")
It's possible to make a code by
giving "string".
The created
code is displayed on the upper left of graphic screen.
It is also possible to save by
'gsave' command.
In the case of
Bar-code, if characters other than numbers are contain in "string",
it will become an error.
Various
settings.
By giving the form of
command, changes and setting are possible.
a$=ex_qr$("[SET:BAR]") Make the target a Bar-code.
(The format is 'CODE_128', and when
converting to 'CODABAR', write 'BAR' as 'CODABAR')
a$=ex_qr$("[SET:QR]") Make the target a
QR-code.(Default)
a$=ex_qr$("[SET:number]") Specify the size of created code in
pixel.
e.g.
a$=ex_qr$("[SET:400]") (Default 256)
Commands must be written in
uppercase letter.
[e.g.]
'Read QR-code
10 a$=ex_qr$()
20 print a$
run
http://www.test.com/
OK
'Make QR-code
10 cls 3
20 a$=ex_qr$("[SET:400]")
30
d$="QRdataTest0123456789abcdefg"
40 a$=ex_qr$(d$)
EX_VIBRATE |
[Features] It make terminal
vibration.
[Format] EX_VIBRATE
[[Repeat-count],[ON-mili_sec],[OFF-mili_sec],[Pause-mili_sec],[number-of-loops]]
[Explanation]
ex_vibrate -Only once the
vibration of 0.8 seconds at unspecified.
ex_vibrate
0 -To make it stop when it be vibrating.
By
giving the parameters, it can make the operation by pattern.
By the pattern, it repeat on and off alternately.
The length can be specified with [ON-mili_sec] and
[OFF-mili_sec] in milliseconds.
To decide 'by how many
times loop and go putting a pause',
it can be
specified in [number-of-loops].
The length of the pause
can be specified with [Pause-mili_sec] in milliseconds.
How many times repeat this one set(on/off repeat-and
pause)
it can be specified in [Repeat-count].
When the whole length exceeds 1 minute, it will be reduced
to 1 minute.
When each value is omitted, the default
value is used.
This command progresses to the next
command even at during vibration.
[e.g.]
'Vibrating0.7sec, Rest0.4sec, 3repeat this, and Pause-1sec, and Whole repeat
twice.
'._._._[_]._._._[_]
ex_vibrate 2,700,400,1000,3
EX_BRIGHT |
[Features] Backlight control.
[Format] EX_BRIGHT n
[Explanation]
n= 0~100
It does not become total
darkness by 0.
[e.g.]
ex_bright 50
EX_INFO$ |
[Features] The variety of
information of a terminal is acquired and returned.
[Format] EX_INFO$(n)
[Explanation]
n=0
The value of battery residual quantity is
acquired.(0~100)
Since this function returns a
character string,
it is necessary to digitize it
with the val() function.
n=1
To return to the two characters(uppercase) country
code of the terminal.
n=2
To return Android version in 3-digit
number.(Android10 above is 4-digit)
220 Froyo
234 Gingerbread
440
KitKat
510 Lollipop etc...
1000 AndroidQ
n=3
To return Network connection state.
0 No connection
1
connection OK
The return value is string.
n=4
To return Model
number(name).
[e.g.]
bt=val(ex_info$(0))
print ex_info$(1)
JP 98
OK
if val(ex_info$(2))<400
then lowmode=1
EX_TIME EX_TIME$ |
[Features] To operation and
change of number(milliseconds unit) that express time.
[Format] EX_TIME[$]
("data1","data2"[,data3])
[Explanation]
There are 3 forms type.
Type1:
ex_time("yyyy/MM/dd","HH:mm:ss")
The numerical value(millsec 13-digit) is returned
that is changed from Date and
Time.
e.g.
10
t=ex_time("2016/10/25","12:15:00")
20 ptint t
1477365300593
Type2:
ex_time(milliseconds,"acquired-item")
To return each specified item from
milliseconds.
It specify one of
the following about item.
"date"(form"yyyy/MM/dd") "time"(form"HH:mm:ss")
"year" "month" "day" "hour"
"min" "sec"
"date" & "time"
is, because the return value is a string, described by 'ex_time$()' attaching
$.
e.g.
10 t=1477365300593
20 ptint
ex_time$(t,"date")
30
ptint ex_time(t,"year")
40
ptint ex_time(t,"hour")
2016/10/25
2016
12
Type3:
ex_time(milliseconds,"changed-item", change-numerical)
To change designated-item in
milliseconds to change-numerical,
and return by
milliseconds.
Designated item
"year" "month" "day" "hour"
"min" "sec"
e.g.
10 t=1477365300593: :'initial
date & time
20 ptint
ex_time$(t,"date"),ex_time$(t,"time")
30 t2=ex_time(t,"yrar",2018)
:'Change year to 2018
40
ptint ex_time$(t2,"date")
50 t3=ex_time(t,"min",45) :'Change minute to 45
60 ptint
ex_time$(t3,"time")
2016/10/25 12:15:00
2018/10/25
12:45:00