title | language_tabs | toc_footers | search | code_clipboard | meta | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
QSL4A API Documentation |
|
true |
true |
|
The Scripting Layer for Android (abridged as SL4A, and previously named Android Scripting Environment or ASE) is a library that allows the creation and running of scripts written in various scripting languages directly on Android devices. QPython start to extend the SL4A project and integrate it.
There are many SL4A APIs, if you found any issue, please report an issue <https://github.com/qpython-android/qpython/issues>
_.
Put text in the clipboard
:param str text: text
Read text from the clipboard
:return: The text in the clipboard
Please run below script within your QPython
from androidhelper import Android
droid = Android()
#setClipboard
droid.setClipboard("Hello World")
#getClipboard
clipboard = droid.getClipboard().result
Starts an activity and returns the result
:param str action: action :param str uri(Optional): uri :param str type(Optional): MIME type/subtype of the URI :param object extras(Optional): a Map of extras to add to the Intent :param list categories(Optional): a List of categories to add to the Intent :param str packagename(Optional): name of package. If used, requires classname to be useful :param str classname(Optional): name of class. If used, requires packagename to be useful :param int flags(Optional): Intent flags
:return: An object representing an Intent
sample code to show makeIntent
Returns the intent that launched the script
sample code to show getIntent
Starts an activity and returns the result
:param str action: action :param str uri(Optional): uri :param str type(Optional): MIME type/subtype of the URI :param object extras(Optional): a Map of extras to add to the Intent :param str packagename(Optional): name of package. If used, requires classname to be useful :param str classname(Optional): name of class. If used, requires packagename to be useful
:return: A Map representation of the result Intent
sample code to show startActivityForResult
Starts an activity and returns the result
:param Intent intent: Intent in the format as returned from makeIntent
:return: A Map representation of the result Intent
sample code to show startActivityForResultIntent
Starts an activity
:param Intent intent: Intent in the format as returned from makeIntent :param bool wait(Optional): block until the user exits the started activity
sample code to show startActivityIntent
Starts an activity
:param str action: action :param str uri(Optional): uri :param str type(Optional): MIME type/subtype of the URI :param object extras(Optional): a Map of extras to add to the Intent :param bool wait(Optional): block until the user exits the started activity :param str packagename(Optional): name of package. If used, requires classname to be useful :param str classname(Optional): name of class. If used, requires packagename to be useful
sample code to show startActivityForResultIntent
Send a broadcast
:param str action: action :param str uri(Optional): uri :param str type(Optional): MIME type/subtype of the URI :param object extras(Optional): a Map of extras to add to the Intent :param str packagename(Optional): name of package. If used, requires classname to be useful :param str classname(Optional): name of class. If used, requires packagename to be useful
sample code to show sendBroadcast
Send a broadcast
:param Intent intent: Intent in the format as returned from makeIntent
sample code to show sendBroadcastIntent
Vibrates the phone or a specified duration in milliseconds
:param int duration: duration in milliseconds
sample code to show vibrate
Returns the status of network connection
sample code to show getNetworkStatus
Checks if version of QPython SL4A is greater than or equal to the specified version
:param int requiredVersion: requiredVersion
:return: true or false
Returns package version code
:param str packageName: packageName
:return: Package version code
Returns package version name
:param str packageName: packageName
:return: Package version name
sample code to show getPackageVersionCode & getPackageVersion
Get list of constants (static final fields) for a class
:param str classname: classname
:return: list
sample code to show getConstants
A map of various useful environment details
:return: environment map object includes id, display, offset, TZ, SDK, download, appcache, availblocks, blocksize, blockcount, sdcard
sample code to show environment
Writes message to logcat
:param str message: message
sample code to show log
Launches an activity that sends an e-mail message to a given recipient
:param str to: A comma separated list of recipients :param str subject: subject :param str body: mail body :param str attachmentUri(Optional): message
sample code to show sendEmail
Displays a short-duration Toast notification
:param str message: message
sample code to show makeToast
Queries the user for a text input
:param str title: title of the input box :param str message: message to display above the input box
sample code to show getInput
Queries the user for a password
:param str title: title of the input box :param str message: message to display above the input box
sample code to show getPassword
Displays a notification that will be canceled when the user clicks on it
:param str title: title :param str message: message :param str url(optional): url
Sample code of notify
import androidhelper
droid = androidhelper.Android()
droid.notify('Hello','QPython','http://qpython.org')
#You could set the 3rd parameter None also
Returns a list of all launchable application class names
:return: map object
sample code to show getLaunchableApplications
Start activity with the given class name
:param str classname: classname
sample code to show launch
Returns a list of packages running activities or services
:return: List of packages running activities
sample code to show getRunningPackages
Force stops a package
:param str packageName: packageName
sample code to show forceStopPackage
Take a picture and save it to the specified path
:return: A map of Booleans autoFocus and takePicture where True indicates success
Starts the image capture application to take a picture and saves it to the specified path
Starts the barcode scanner
:return: A Map representation of the result Intent
Display content to be picked by URI (e.g. contacts)
:return: A map of result values
Start activity with view action by URI (i.e. browser, contacts, etc.)
Opens a map search for query (e.g. pizza, 123 My Street)
Opens the list of contacts
Opens the browser to display a local HTML file
Starts a search for the given query
Displays a list of contacts to pick from
:return: A map of result values
Displays a list of phone numbers to pick from
:return: The selected phone number
Returns a List of all possible attributes for contacts
:return: a List of contacts as Maps
Returns a List of all contact IDs
Returns a List of all contacts
Returns contacts by ID
Returns the number of contacts
Content Resolver Query
:return: result of query as Maps
Content Resolver Query Attributes
:return: a list of available columns for a given content uri
Clears all events from the event buffer
Registers a listener for a new broadcast signal
Stop listening for a broadcast signal
Lists all the broadcast signals we are listening for
Returns and removes the oldest n events (i.e. location or sensor update, etc.) from the event buffer
:return: A List of Maps of event properties
Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer
:return: Map of event properties
Blocks until an event occurs. The returned event is removed from the buffer
:return: Map of event properties
Post an event to the event queue
Post an event to the event queue
Returns and removes the oldest event (i.e. location or sensor update, etc.) from the event buffer
:return: Map of event properties
Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer
:return: Map of event properties
Opens up a socket where you can read for events posted
Stops the event server, you can't read in the port anymore
Returns availables providers on the phone
Ask if provider is enabled
Starts collecting location data
Returns the current location as indicated by all available providers
:return: A map of location information by provider
Stops collecting location data
getLastKnownLocation()
Returns the last known location of the device
:return: A map of location information by provider
Droid = androidhelper.Android()
location = Droid.getLastKnownLocation().result
location = location.get('network', location.get('gps'))
Returns a list of addresses for the given latitude and longitude
:return: A list of addresses
Starts tracking phone state
Returns the current phone state and incoming number
:return: A Map of "state" and "incomingNumber"
Stops tracking phone state
Calls a contact/phone number by URI
Calls a phone number
Dials a contact/phone number by URI
Dials a phone number
Returns the current cell location
Returns the numeric name (MCC+MNC) of current registered operator
Returns the alphabetic name of current registered operator
Returns a the radio technology (network type) currently in use on the device
Returns the device phone type
Returns the ISO country code equivalent for the SIM provider's country code
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits
Returns the Service Provider Name (SPN)
Returns the serial number of the SIM, if applicable. Return null if it is unavailable
Returns the state of the device SIM card
Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return null if it is unavailable
Retrieves the alphabetic identifier associated with the voice mail number
Returns the voice mail number. Return null if it is unavailable
Returns true if the device is considered roaming on the current network, for GSM purposes
Returns the unique device ID, for example, the IMEI for GSM and the MEID for CDMA phones. Return null if device ID is not available
Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available
Returns the phone number string for line 1, for example, the MSISDN for a GSM phone. Return null if it is unavailable
Returns the neighboring cell information of the device
Records audio from the microphone and saves it to the given location
Records video from the camera and saves it to the given location. Duration specifies the maximum duration of the recording session. If duration is 0 this method will return and the recording will only be stopped when recorderStop is called or when a scripts exits. Otherwise it will block for the time period equal to the duration argument. videoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480.
Records video (and optionally audio) from the camera and saves it to the given location. Duration specifies the maximum duration of the recording session. If duration is not provided this method will return immediately and the recording will only be stopped when recorderStop is called or when a scripts exits. Otherwise it will block for the time period equal to the duration argument.
Starts the video capture application to record a video and saves it to the specified path
Stops a previously started recording
Starts recording sensor data to be available for polling
Records to the Event Queue sensor data exceeding a chosen threshold
Starts recording sensor data to be available for polling
Stops collecting sensor data
Returns the most recently recorded sensor data
Returns the most recently received accuracy value
Returns the most recently received light value
Returns the most recently received accelerometer values
:return: a List of Floats [(acceleration on the) X axis, Y axis, Z axis]
Returns the most recently received magnetic field values
:return: a List of Floats [(magnetic field value for) X axis, Y axis, Z axis]
sensorsReadOrientation()
Returns the most recently received orientation values
:return: a List of Doubles [azimuth, pitch, roll]
Droid = androidhelper.Android()
Droid.startSensingTimed(1, 250)
sensor = Droid.sensorsReadOrientation().result
Droid.stopSensing()
Sets the screen timeout to this number of seconds
:return: The original screen timeout
Gets the screen timeout
:return: the current screen timeout in seconds
Checks the airplane mode setting
:return: True if airplane mode is enabled
Toggles airplane mode on and off
:return: True if airplane mode is enabled
Checks the ringer silent mode setting
:return: True if ringer silent mode is enabled
Toggles ringer silent mode on and off
:return: True if ringer silent mode is enabled
Toggles vibrate mode on and off. If ringer=true then set Ringer setting, else set Notification setting
:return: True if vibrate mode is enabled
Checks Vibration setting. If ringer=true then query Ringer setting, else query Notification setting
:return: True if vibrate mode is enabled
Returns the maximum ringer volume
Returns the current ringer volume
Sets the ringer volume
Returns the maximum media volume
Returns the current media volume
Sets the media volume
Returns the screen backlight brightness
:return: the current screen brightness between 0 and 255
Sets the the screen backlight brightness
:return: the original screen brightness
Checks if the screen is on or off (requires API level 7)
:return: True if the screen is currently on
Sends an SMS
:param str destinationAddress: typically a phone number :param str text:
Returns the number of messages
:param bool unreadOnly: typically a phone number :param str folder(optional): default "inbox"
Returns a List of all message IDs
:param bool unreadOnly: typically a phone number :param str folder(optional): default "inbox"
Returns a List of all messages
:param bool unreadOnly: typically a phone number :param str folder: default "inbox" :param list attributes(optional): attributes
:return: a List of messages as Maps
Returns message attributes
:param int id: message ID :param list attributes(optional): attributes
:return: a List of messages as Maps
Returns a List of all possible message attributes
Deletes a message
:param int id: message ID
:return: True if the message was deleted
Marks messages as read
:param list ids: List of message IDs to mark as read :param bool read: true or false
:return: number of messages marked read
Recognizes user's speech and returns the most likely result
:param str prompt(optional): text prompt to show to the user when asking them to speak :param str language(optional): language override to inform the recognizer that it should expect speech in a language different than the one set in the java.util.Locale.getDefault() :param str languageModel(optional): informs the recognizer which speech model to prefer (see android.speech.RecognizeIntent)
:return: An empty string in case the speech cannot be recongnized
Generate DTMF tones for the given phone number
:param str phoneNumber: phone number :param int toneDuration(optional): default 100, duration of each tone in milliseconds
Acquires a full wake lock (CPU on, screen bright, keyboard bright)
Acquires a partial wake lock (CPU on)
Acquires a bright wake lock (CPU on, screen bright)
Acquires a dim wake lock (CPU on, screen dim)
Releases the wake lock
Returns the list of access points found during the most recent Wifi scan
Acquires a full Wifi lock
Acquires a scan only Wifi lock
Releases a previously acquired Wifi lock
Starts a scan for Wifi access points
:return: True if the scan was initiated successfully
Checks Wifi state
:return: True if Wifi is enabled
Toggle Wifi on and off
:param bool enabled(optional): enabled
:return: True if Wifi is enabled
Disconnects from the currently active access point
:return: True if the operation succeeded
Returns information about the currently active access point
Returns information about the currently active access point
:return: True if the operation succeeded
Reconnects to the currently active access point
:return: True if the operation succeeded
Returns the most recently recorded battery data
Starts tracking battery state
Stops tracking battery state
Returns the most recently received battery status data: 1 - unknown; 2 - charging; 3 - discharging; 4 - not charging; 5 - full
Returns the most recently received battery health data: 1 - unknown; 2 - good; 3 - overheat; 4 - dead; 5 - over voltage; 6 - unspecified failure
Returns the most recently received plug type data: -1 - unknown 0 - unplugged 1 - power source is an AC charger 2 - power source is a USB port
Returns the most recently received battery presence data
Returns the most recently received battery level (percentage)
Returns the most recently received battery voltage
Returns the most recently received battery temperature
Returns the most recently received battery technology data
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value
:param int resultCode: :param byte resultValue:
Open a media file
:param str url: url of media resource :param str tag(optional): string identifying resource (default=default) :param bool play(optional): start playing immediately
:return: true if play successful
pause playing media file
:param str tag: string identifying resource (default=default)
:return: true if successful
start playing media file
:param str tag: string identifying resource (default=default)
:return: true if successful
Close media file
:param str tag: string identifying resource (default=default)
:return: true if successful
Checks if media file is playing
:param str tag: string identifying resource (default=default)
:return: true if successful
Set Looping
:param bool enabled: default true :param str tag: string identifying resource (default=default)
:return: True if successful
Seek To Position
:param int msec: default true :param str tag: string identifying resource (default=default)
:return: New Position (in ms)
Information on current media
:param str tag: string identifying resource (default=default)
:return: Media Information
Lists currently loaded media
:return: List of Media Tags
Read a value from shared preferences
:param str key: key :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences.
Write a value to shared preferences
:param str key: key :param str value: value :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences.
Get list of Shared Preference Values
:param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences.
Execute a qpython script by absolute path
:param str script: The absolute path of the qpython script
:return: bool
Speaks the provided message via TTS
:param str message: message
Returns True if speech is currently in progress
Speaks the provided message via TTS
:param str message: message
Returns active Bluetooth connections
Send bytes over the currently open Bluetooth connection
:param str base64: A base64 encoded String of the bytes to be sent :param str connID(optional): Connection id
Read up to bufferSize bytes and return a chunked, base64 encoded string
:param int bufferSize: default 4096 :param str connID(optional): Connection id
Connect to a device over Bluetooth. Blocks until the connection is established or fails
:param str uuid: The UUID passed here must match the UUID used by the server device :param str address(optional): The user will be presented with a list of discovered devices to choose from if an address is not provided
:return: True if the connection was established successfully
Listens for and accepts a Bluetooth connection. Blocks until the connection is established or fails
:param str uuid: The UUID passed here must match the UUID used by the server device :param int timeout: How long to wait for a new connection, 0 is wait for ever (default=0)
Requests that the device be discoverable for Bluetooth connections
:param int duration: period of time, in seconds, during which the device should be discoverable (default=300)
Sends ASCII characters over the currently open Bluetooth connection
:param str ascii: text :param str connID: Connection id
Sends ASCII characters over the currently open Bluetooth connection
:param str ascii: text :param str connID: Connection id
Read up to bufferSize ASCII characters
:param int bufferSize: default=4096 :param str connID(optional): Connection id
Read the next line
:param str connID(optional): Connection id
Queries a remote device for it's name or null if it can't be resolved
:param str address: Bluetooth Address For Target Device
Gets the Bluetooth Visible device name
Sets the Bluetooth Visible device name, returns True on success
:param str name: New local name
Gets the scan mode for the local dongle. Return values: -1 when Bluetooth is disabled. 0 if non discoverable and non connectable. 1 connectable non discoverable. 3 connectable and discoverable.
Returns the name of the connected device
:param str connID: Connection id
Checks Bluetooth state
:return: True if Bluetooth is enabled
Toggle Bluetooth on and off
:param bool enabled: :param str prompt: Prompt the user to confirm changing the Bluetooth state, default=true
:return: True if Bluetooth is enabled
Stops Bluetooth connection
:param str connID: Connection id
Returns the hardware address of the local Bluetooth adapter
Start the remote device discovery process
:return: true on success, false on error
Cancel the current device discovery process
:return: true on success, false on error
Return true if the local Bluetooth adapter is currently in the device discovery process
Starts tracking signal strengths
Returns the current signal strengths
:return: A map of gsm_signal_strength
Stops tracking signal strength
Starts an MJPEG stream and returns a Tuple of address and port for the stream
:param int resolutionLevel: increasing this number provides higher resolution (default=0) :param int jpegQuality: a number from 0-10 (default=20) :param int port: If port is specified, the webcam service will bind to port, otherwise it will pick any available port (default=0)
Adjusts the quality of the webcam stream while it is running
:param int resolutionLevel: increasing this number provides higher resolution (default=0) :param int jpegQuality: a number from 0-10 (default=20)
Start Preview Mode. Throws 'preview' events
:param int resolutionLevel: increasing this number provides higher resolution (default=0) :param int jpegQuality: a number from 0-10 (default=20) :param str filepath: Path to store jpeg files
:return: True if successful
Stop the preview mode
Create a text input dialog
:param str title: title of the input box :param str message: message to display above the input box :param str defaultText(optional): text to insert into the input box :param str inputType(optional): type of input data, ie number or text
Create a password input dialog
:param str title: title of the input box :param str message: message to display above the input box
Create a password input dialog
:param str title: title of the input box :param str message: message to display above the input box :param str defaultText(optional): text to insert into the input box
Queries the user for a password
:param str title: title of the password box :param str message: message to display above the input box
Create seek bar dialog
:param int start: default=50 :param int maximum: default=100 :param int title: title
Create time picker dialog
:param int hour: default=0 :param int miute: default=0 :param bool is24hour: default=false
Create date picker dialog
:param int year: default=1970 :param int month: default=1 :param int day: default=1
Data structs QPython NFC json result ::
{
"role": <role>, # could be self/master/slave
"stat": <stat>, # could be ok / fail / cancl
"message": <message get>
}
Create a dialog where you could create a qpython beam master
:param str title: title of the input box :param str message: message to display above the input box :param str inputType(optional): type of input data, ie number or text
Create a dialog where you could create a qpython beam master
:param str content: message you want to sent :param str title: title of the input box :param str message: message to display above the input box :param str inputType(optional): type of input data, ie number or text
Create a qpython beam slave
:param str title: title of the input box :param str message: message to display above the input box
Create a spinner progress dialog
:param str message(optional): message :param int maximunProgress(optional): dfault=100
Set progress dialog current value
:param int current: current
Set progress dialog maximum value
:param int max: max
Create a horizontal progress dialog
:param str title(optional): title :param str message(optional): message :param int maximunProgress(optional): dfault=100
Create alert dialog
:param str title(optional): title :param str message(optional): message :param int maximunProgress(optional): dfault=100
Set alert dialog positive button text
:param str text: text
Set alert dialog negative button text
:param str text: text
Set alert dialog button text
:param str text: text
Set alert dialog list items
:param list items: items
Set alert dialog list items
:param list items: items :param int selected: selected item index (default=0)
Set dialog multiple choice items and selection
:param list items: items :param int selected: selected item index (default=0)
Adds a new item to context menu
:param str label: label for this menu item :param str event: event that will be generated on menu item click :param object eventData: event object
Adds a new item to context menu
:param str label: label for this menu item :param str event: event that will be generated on menu item click :param object eventData: event object :param str iconName: Android system menu icon, see http://developer.android.com/reference/android/R.drawable.html
Returns dialog response
This method provides list of items user selected
Dismiss dialog
Show dialog
Show Full Screen
:param string layout: String containing View layout
Dismiss Full Screen
Get Fullscreen Properties
Get fullscreen properties for a specific widget
:param str id: id of layout widget
Set fullscreen widget property
:param str id: id of layout widget :param str property: name of property to set :param str value: value to set property to
Attach a list to a fullscreen widget
:param str id: id of layout widget :param list list: List to set
Override default key actions
:param str keycodes: id of layout widget :param bool enable: List to set (default=true)
Display a WebView with the given URL
:param str url: url :param bool wait(optional): block until the user exits the WebView
SL4A Facade for USB Serial devices by Android USB Host API.
It control the USB-Serial like devices from Andoroid which has USB Host Controller .
The sample
demonstration is also available at youtube video <http://www.youtube.com/watch?v=EJ7qiGXaI74>
_
-
Android device which has USB Host controller (and enabled in that firmware).
-
Android 4.0 (API14) or later.
-
USB Serial devices (see Status).
-
USB Serial devices were not handled by Android kernel.
I heard some android phone handle USB Serial devices make /dev/ttyUSB0 in kernel level. In this case, Android does not be able to handle the device from OS level.
please check Android Applications be able to grab the target USB Devices, such as
USB Device Info <https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator>
_.
Status
-
probably work with USB CDC, like FTDI, Arduino or else.
-
2012/09/10: work with 78K0F0730 device (new RL78) with Tragi BIOS board.
M78K0F0730 <http://www.marutsu.co.jp/shohin_55296/>
_ -
2012/09/24: work with some pl2303 devcies.
Author
This facade developped by Kuri65536 <https://bitbucket.org/kuri65536/usbhostserialfacade>
_
you can see the commit log in it.
Returns USB devices reported by USB Host API.
:return: Returns "Map of id and string information Map<String, String>
Disconnect all USB-device
:param str connID: connection ID
Returns active USB-device connections.
:return: Returns "Active USB-device connections by Map UUID vs device-name."
Send bytes over the currently open USB Serial connection.
:param str base64: :param str connId:
Read up to bufferSize bytes and return a chunked, base64 encoded string
:param int bufferSize: :param str connId:
Connect to a device with USB-Host. request the connection and exit
:param str hash: :param str options:
:return: Returns messages the request status
Requests that the host be enable for USB Serial connections.
:return: True if the USB Device is accesible
Sends ASCII characters over the currently open USB Serial connection
:param str ascii: :param str connID:
:param str connID:
:return: True if the next read is guaranteed not to block
Read up to bufferSize ASCII characters.
:param str connID: :param int bufferSize:
Queries a remote device for it's name or null if it can't be resolved
:param str connID: