中文网(自研/维护)拓展
目录:
- AliSms:阿里云短信平台接入,短信验证码
- Clipboard:实现剪贴板的复制粘贴功能
- PhoneInfo:获取手机等设备软硬件、版本等相关信息
- SQLite:超流行兼容主流SQL语法的迷你本地数据库引擎
AliSms
阿里云短信平台接入,短信验证码。详细用法及步骤请参考这里。
属性
- AccessKeyId
- AccessKey ID
- AccessKeySecret
- AccessKey Secret
事件
None
方法
- RandomNumCode(length)
- 返回一个指定位数随机数字码。
- SendSms(phoneNumber,signName,templateCode,templateParam)
- 发送短信。参数:手机号,签名名称,模板CODE,模板参数JSON
Clipboard
实现剪贴板的复制粘贴功能。详细用法及步骤请参考这里。
可跨屏幕共享剪贴板数据,可作为屏幕间数据传输的一种备选方式。
属性
- SuppressToast
- 默认操作成功后显示提示信息,SuppressToast设置为
假
后,则不显示提示信息。
事件
None
方法
- Copy(text)
- 拷贝文本到剪贴板。
- Paste()
- 从剪贴板粘贴内容并返回文本。
PhoneInfo
获取手机等设备软硬件、版本等相关信息。详细用法及步骤请参考这里。
属性
None
事件
None
方法
- GetDeviceID()
- 获取设备ID
- GetMacAddress()
- 获取网卡MAC地址信息
- GetPhoneModel()
- 获取本机手机型号
- GetPhoneNumber()
- 获取本机手机号码。无SIM卡设备将返回空文本;双SIM卡设备将返回主卡号码。
- GetReleaseVersion()
- 获取系统版本
- GetSDKVersion()
- 获取SDK版本
SQLite
超流行兼容主流SQL语法的迷你本地数据库引擎。详细用法及步骤请参考这里。
属性
- DBName
- Name of the database.
- DBVersion
- Version of the database.
- DebugDialog
- Display debugging messages as alerts.
- DebugToast
- Display debugging messages as toast messages.
- ReturnColumnNames
- Should result lists contain column names.
事件
- AfterDelete(tag,rowCount)
- This event fires after an asynchronous Delete call. The tag specified in the original call and the number of deleted rows are provided.
- AfterExecute(tag,result)
- This event fires after an ExecuteSQLAsync call. The tag specified in the original call and the result of the execution are provided.
- AfterExecuteFile(tag,execCount)
- This event fires after an ExecuteFileAsync. The tag specified in the original call and the result of the execution are provided.
- AfterInsert(tag,rowId)
- This event fires after an asynchronous Insert call. The tag specified in the original call and the row ID of the new row are provided.
- AfterInsertFile(tag,rowCount)
- This event fires after an asynchronous InsertFile call. The tag specified in the original call and the count of inserted rows are provided.
- AfterReplace(tag,rowId)
- This event fires after an asynchronous Replace call. The tag specified in the original call and the row ID of the new or updated row are provided.
- AfterSelect(tag,rowCount,rows)
- This event fires after an asynchronous Select call. The tag specified in the original call, the number of returned rows, and the result rows are provided.
- AfterUpdate(tag,rowCount)
- This event fires after an asynchronous Update call. The tag specified in the original call and the number of changed rows are provided.
- DatabaseClosed()
- This event fires when the database is closed.
- DatabaseCreated()
- This event fires when the database is created.
- DatabaseDowngrade(oldVersion,newVersion)
- This event fires when the database is downgraded. The previous and new version numbers are provided. Use this event to modify the database as required by the version change.
- DatabaseOpened()
- This event fires when the database is opened.
- DatabaseUpgrade(oldVersion,newVersion)
- This event fires when the database is upgraded. The previous and new version numbers are provided. Use this event to modify the database as required by the version change.
- SQLError(message)
- This event fires when a SQL error occurs. The error message is provided.
方法
- BeginTransaction()
- Begin a transaction.
- CloseDatabase()
- Closes the database.
- CommitTransaction()
- Commit a transaction.
- DatabaseExists()
- Returns true if the database file exists, false otherwise.
- DatabasePath()
- Returns the path to the database.
- Delete(table,whereClause,bindParams)
- Executes a SQL DELETE statement.
- DeleteAsync(tag,table,whereClause,bindParams)
- Executes a SQL DELETE statement, asynchronously.
- DeleteDatabase()
- Delete the database.
- Execute(sql,bindParams)
- Execute a single, parameterized SQL statement that is NOT a SELECT.
- ExecuteAsync(tag,sql,bindParams)
- Execute a single, parameterized SQL statement that is NOT a SELECT, asynchronously.
- ExecuteFile(fileName)
- Execute multiple SQL statements from a file.
- ExecuteFileAsync(tag,fileName)
- Execute multiple SQL statements from a file, asynchronously.
- ExportDatabase(fileName)
- Exports the database. This is probably not best done on the main thread.
- ImportDatabase(fileName)
- Import a SQLite database file. This is probably not best done on the main thread.
- Insert(table,columns,values)
- Executes a SQL INSERT statement.
- InsertAsync(tag,table,columns,values)
- Executes a SQL INSERT statement, asynchronously.
- InsertFile(table,fileName)
- Inserts rows from a file.
- InsertFileAsync(tag,table,fileName)
- Inserts rows from a file, asynchronously.
- IsDatabaseOpen()
- Indicates if the database has been opened or not.
- OpenDatabase()
- Opens the database.
- Replace(table,columns,values)
- Executes a SQL REPLACE statement.
- ReplaceAsync(tag,table,columns,values)
- Executes a SQL REPLACE statement, asynchronously.
- RollbackTransaction()
- Rollback a transaction.
- Select(table,distinct,columns,whereClause,bindParams,groupBy,having,orderBy,limit)
- Executes a SQL SELECT statement.
- SelectAsync(tag,table,distinct,columns,whereClause,bindParams,groupBy,having,orderBy,limit)
- Executes a SQL SELECT statement, asynchronously.
- SelectSQL(sql,bindParams)
- Execute a single, parameterized SQL SELECT statement and returns a list of records.
- SelectSQLAsync(tag,sql,bindParams)
- Execute a single, parameterized SQL SELECT statement, asynchronously.
- TableCount()
- Returns the number of tables in the database.
- TableExists(table)
- Returns true if the table exists in the database, false otherwise.
- TableNames()
- Returns a list of names of the tables in the the database.
- TableRowCount(table)
- Returns the number of records in a table.
- Update(table,columns,values,whereClause,bindParams)
- Executes a SQL UPDATE statement.
- UpdateAsync(tag,table,columns,values,whereClause,bindParams)
- Executes a SQL UPDATE statement, asynchronously.