Kotlin bindings for core Apache Cordova API.
(js)
Battery |
Main object for Cordova battery. object Battery |
(js)
BatteryStatus |
Battery status. class BatteryStatus |
(js)
Browser |
InAppBrowser reference object. class Browser |
(js)
Camera |
Main object for Cordova camera. object Camera |
(js)
CameraOptions |
Camera options. data class CameraOptions |
(js)
Coordinates |
Geolocation coordinates values. class Coordinates |
(js)
CordovaEvent |
Cordova event types. enum class CordovaEvent |
(js)
Device |
Device information class. class Device |
(js)
DirectoryEntry |
interface DirectoryEntry : Entry |
(js)
DirectoryEntryCallback |
interface DirectoryEntryCallback |
(js)
DirectoryEntrySync |
interface DirectoryEntrySync : EntrySync |
(js)
DirectoryReader |
interface DirectoryReader |
(js)
DirectoryReaderSync |
interface DirectoryReaderSync |
(js)
EntriesCallback |
interface EntriesCallback |
(js)
Entry |
interface Entry |
(js)
EntryCallback |
interface EntryCallback |
(js)
EntrySync |
interface EntrySync |
(js)
ErrorCallback |
interface ErrorCallback |
(js)
File |
Main object for Cordova file. object File |
(js)
FileCallback |
interface FileCallback |
(js)
FileEntry |
interface FileEntry : Entry |
(js)
FileEntryCallback |
interface FileEntryCallback |
(js)
FileEntrySync |
interface FileEntrySync : EntrySync |
(js)
FileSaver |
interface FileSaver : EventTarget |
(js)
FileSystem |
interface FileSystem |
(js)
FileSystemCallback |
interface FileSystemCallback |
(js)
FileSystemSync |
interface FileSystemSync |
(js)
FileWriter |
interface FileWriter : FileSaver |
(js)
FileWriterCallback |
interface FileWriterCallback |
(js)
FileWriterSync |
interface FileWriterSync |
(js)
Flags |
interface Flags |
(js)
Geolocation |
Main geolocation object based on webview api. object Geolocation |
(js)
InAppBrowser |
Main object for Cordova InAppBrowser api. object InAppBrowser |
(js)
InAppBrowserEvent |
InAppBrowser event type. class InAppBrowserEvent |
(js)
LocalFileSystem |
object LocalFileSystem |
(js)
LocalFileSystemSync |
object LocalFileSystemSync |
(js)
Locationservices |
Main geolocation object based on Google location services api. object Locationservices |
(js)
Media |
Cordova media class. class Media |
(js)
MediaCapture |
Main media capture object. object MediaCapture |
(js)
MediaError |
Media error class. class MediaError |
(js)
MediaFile |
Media file information class. class MediaFile |
(js)
MediaFileData |
Media file details class. class MediaFileData |
(js)
Metadata |
interface Metadata |
(js)
MetadataCallback |
interface MetadataCallback |
(js)
Network |
Main object for Cordova network. object Network |
(js)
Notification |
Main object for Cordova notifications. object Notification |
(js)
PendingResult |
Pending result class. class PendingResult |
(js)
Position |
Geolocation position value. class Position |
(js)
PositionError |
Geolocaton error codes. enum class PositionError |
(js)
PromptResponse |
A response object for prompt function callback. class PromptResponse |
(js)
Result |
sealed class Result<out V : Any, out E : Exception> |
(js)
ResumeEvent |
Resume event class. class ResumeEvent |
(js)
Screen |
Main object for Cordova screen. object Screen |
(js)
Splashscreen |
Main object for Cordova splashscreen. object Splashscreen |
(js)
StatusBar |
Main object for Cordova status bar. object StatusBar |
(js)
SystemDirs |
System directories class. class SystemDirs |
(js)
Vibration |
Main object for Cordova vibration. object Vibration |
(js)
VoidCallback |
interface VoidCallback |
(js)
CameraException |
Exception class for camera errors. class CameraException : Exception |
(js)
CaptureException |
Exception class for media capture errors. class CaptureException : Exception |
(js)
FileException |
Exception class for file errors. class FileException : Exception |
(js)
GeolocationException |
Exception class for geolocation errors. class GeolocationException : Exception |
(js)
kotlin.String |
|
(js)
org.khronos.webgl.ArrayBuffer |
(js)
cordovaDevice |
Cordova device information object. var cordovaDevice: Device? |
(js)
addCordovaEventListener |
Add listeners for a Cordova events. fun addCordovaEventListener(event: CordovaEvent, listener: (Event) -> Unit): Unit |
(js)
addDeviceReadyListener |
Add listeners for 'deviceready' Cordova event. fun addDeviceReadyListener(listener: (Device) -> Unit): Unit |
(js)
addPauseListener |
Add listeners for 'pause' Cordova event. fun addPauseListener(listener: () -> Unit): Unit |
(js)
addResumeListener |
Add listeners for 'resume' Cordova event. fun addResumeListener(listener: (ResumeEvent) -> Unit): Unit |
(js)
any |
fun <V : Any, E : Exception> Result<V, E>.any(predicate: (V) -> Boolean): Boolean |
(js)
append |
Append file content from a Blob. suspend fun FileEntry.append(data: Blob): Result<FileEntry, FileException>
Append file content from a plain string. suspend fun FileEntry.append(data: String): Result<FileEntry, FileException> |
(js)
copyTo |
Copy given file or directory to a new location. suspend fun Entry.copyTo(parent: DirectoryEntry, newName: String? = null): Result<Entry, FileException> |
(js)
createWriter |
Create a FileWriter object for a given file entry. suspend fun FileEntry.createWriter(): Result<FileWriter, FileException> |
(js)
failure |
fun <E : Exception> Result<*, E>.failure(f: (E) -> Unit): Unit |
(js)
fanout |
fun <V : Any, U : Any> Result<V, *>.fanout(other: () -> Result<U, *>): Result<Pair<V, U>, *> |
(js)
file |
Get a File object for a given file entry. suspend fun FileEntry.file(): Result<File, FileException> |
(js)
flatMap |
fun <V : Any, U : Any, E : Exception> Result<V, E>.flatMap(transform: (V) -> Result<U, E>): Result<U, E> |
(js)
flatMapError |
fun <V : Any, E : Exception, E2 : Exception> Result<V, E>.flatMapError(transform: (E) -> Result<V, E2>): Result<V, E2> |
(js)
getAs |
fun <X> Result<*, *>.getAs(): X? |
(js)
getCurrentAmplitude |
Returns the current amplitude within an audio file. suspend fun Media.getCurrentAmplitude(): Number |
(js)
getCurrentPosition |
Returns the current position within an audio file. suspend fun Media.getCurrentPosition(): Number |
(js)
getDevice |
Suspending function to return device information object. suspend fun getDevice(): Device |
(js)
getDirectory |
Get or create a directory in a given parent directory. suspend fun DirectoryEntry.getDirectory(path: String, create: Boolean = true, exclusive: Boolean = false): Result<DirectoryEntry, FileException> |
(js)
getFile |
Get or create a file in a given parent directory. suspend fun DirectoryEntry.getFile(path: String, create: Boolean = true, exclusive: Boolean = false): Result<FileEntry, FileException> |
(js)
getFormatData |
Get details for the given file. suspend fun MediaFile.getFormatData(): MediaFileData? |
(js)
getMetadata |
Get file or directory metadata. suspend fun Entry.getMetadata(): Result<Metadata, FileException> |
(js)
getOrElse |
infix fun <V : Any, E : Exception> Result<V, E>.getOrElse(fallback: V): V |
(js)
getParent |
Get file or directory parent directory entry. suspend fun Entry.getParent(): Result<DirectoryEntry, FileException> |
(js)
invoke |
operator fun FileSystemCallback.invoke(filesystem: FileSystem): Unit operator fun EntryCallback.invoke(entry: Entry): Unit operator fun FileEntryCallback.invoke(entry: FileEntry): Unit operator fun DirectoryEntryCallback.invoke(entry: DirectoryEntry): Unit operator fun EntriesCallback.invoke(entries: Array<Entry>): Unit operator fun MetadataCallback.invoke(metadata: Metadata): Unit operator fun FileWriterCallback.invoke(fileWriter: FileWriter): Unit operator fun FileCallback.invoke(file: File): Unit operator fun VoidCallback.invoke(): Unit operator fun ErrorCallback.invoke(err: Error): Unit |
(js)
map |
fun <V : Any, U : Any, E : Exception> Result<V, E>.map(transform: (V) -> U): Result<U, E> |
(js)
mapError |
fun <V : Any, E : Exception, E2 : Exception> Result<V, E>.mapError(transform: (E) -> E2): Result<V, E2> |
(js)
moveTo |
Move given file or directory to a new location. suspend fun Entry.moveTo(parent: DirectoryEntry, newName: String? = null): Result<Entry, FileException> |
(js)
or |
infix fun <V : Any, E : Exception> Result<V, E>.or(fallback: V): Success<V> |
(js)
readAsArrayBuffer |
Read file content as an array buffer. suspend fun FileEntry.readAsArrayBuffer(): Result<ArrayBuffer, FileException> |
(js)
readAsDataURL |
Read file content as a data url. suspend fun FileEntry.readAsDataURL(): Result<String, FileException> |
(js)
readAsText |
Read file content as a plain string. suspend fun FileEntry.readAsText(): Result<String, FileException> |
(js)
readEntries |
List directory entries for a given DirectoryReader. suspend fun DirectoryReader.readEntries(): Result<List<Entry>, FileException>
List directory entries for a given parent directory entry. suspend fun DirectoryEntry.readEntries(): Result<List<Entry>, FileException> |
(js)
remove |
Remove given file or directory. suspend fun Entry.remove(): Result<Entry, FileException> |
(js)
removeRecursively |
Remove given directory recursively. suspend fun DirectoryEntry.removeRecursively(): Result<DirectoryEntry, FileException> |
(js)
success |
fun <V : Any> Result<V, *>.success(f: (V) -> Unit): Unit |
(js)
write |
Write file content from a Blob. suspend fun FileEntry.write(data: Blob): Result<FileEntry, FileException>
Write file content from a plain string. suspend fun FileEntry.write(data: String): Result<FileEntry, FileException>
Write file content from an array buffer. suspend fun FileEntry.write(data: ArrayBuffer): Result<FileEntry, FileException> |
(js)
writeDataUrL |
Write file content from a data url. suspend fun FileEntry.writeDataUrL(dataUrl: String): Result<FileEntry, FileException> |