BaseKeyboardApp

abstract class BaseKeyboardApp

A base app is constructed by extending the BaseKeyboardApp abstract class and implementing the required methods.

Summary

Properties
String appId
A unique identifier for the app. It will be used to open apps on demand by id.
List<String>? keywords
A list of keywords that will match against predictions to offer open apps as a suggestion.
BaseConfiguration configuration
A BaseConfiguration instance used during setup of the app.
String appName
The name of the app that will be used in the hint of the search input prompt.
String defaultCategory
The category that will be selected when no category has the isTrending flag enabled.
Functions
Single<List<BaseCategory>> categories()
A single observable that returns a list of categories.
Single<List<BaseResult>> default(pagination: Pagination)
A single observable that returns a list of BaseResult for the default category: when the app is opened for the first time without a query or category selected.
Single<List<BaseResult>> category(category: BaseCategory, pagination: Pagination)
A single observable that returns a list of BaseResult for the provided category.
Single<List<BaseResult>> query(query: String, pagination: Pagination)
A single observable that returns a list of BaseResult for the provided query.

Properties

appId

abstract val appId: String

A unique identifier for the app. It will be used to open apps on demand by id.

keywords

abstract val keywords: List<String>?

A list of keywords that will match against predictions to offer open apps as a suggestion.

configuration

abstract val configuration: BaseConfiguration

A BaseConfiguration instance used during setup of the app.

appName

abstract val appName: String

The name of the app that will be used in the hint of the search input prompt.

defaultCategory

abstract val defaultCategory: String

The category that will be selected when no category has the isTrending flag enabled.

Functions

categories

abstract fun categories(): Single<List<BaseCategory>>

A single observable that returns a list of categories.

Returns
Single<List<BaseCategory>> A Single observable containing a list of BaseCategory

default

abstract fun default(pagination: Pagination): Single<List<BaseResult>>

A single observable that returns a list of BaseResult for the default category: when the app is opened for the first time without a query or category selected.

Parameters
pagination: Pagination An instance of pagination
Returns
Single<List<BaseResult>> A Single observable containing a list of BaseResult

category

abstract fun category(category: BaseCategory, pagination: Pagination): Single<List<BaseResult>>

A single observable that returns a list of BaseResult for the provided category.

Parameters
category: BaseCategory Type of category
pagination: Pagination An instance of pagination
Returns
Single<List<BaseResult>> A Single observable containing a list of BaseResult

query

abstract fun query(query: String, pagination: Pagination): Single<List<BaseResult>>

A single observable that returns a list of BaseResult for the provided query.

Parameters
query: String Query to search
pagination: Pagination An instance of pagination
Returns
Single<List<BaseResult>> A Single observable containing a list of BaseResult

If something needs to be added or if you find an error in our documentation, please let us know either on our GitHub or Discord.

Last updated on June 16, 2023