Users interact with certain apps every day that are essential for them. These can be related to banking, notes, media, etc. Fleksy Keyboard SDK allows developers to build and place apps within the keyboard accessible via custom views.
Placing apps within the keyboard dramatically enhances the UX and allows the users to access the set apps anywhere for specific actions without leaving the currently open app. Fleksy provides existing apps that developers can use for the most common use cases. However, developers can also implement their app if a custom functionality is required.
Fleksy currently provides the following keyboard apps:
Fleksy Apps | Dependency | Developer Portal |
---|---|---|
GiphyApp | co.thingthing.fleksyapps:giphy:1.1.6 |
GIPHY Developers |
StickersApp | co.thingthing.fleksyapps:stickers:1.1.6 |
GIPHY Developers |
Add dependency for the required Fleksy Apps you wish to integrate in your keyboard app.
|
|
The dependencies should be available in Fleksy’s maven repository.
Add a provider to share media with other applications in your AndroidManifest file.
|
|
Create or update the file paths xml file in the res/xml
folder of your app to include both a root-path, if it didn’t exist before, and a files-path to the shared content folder.
Ensure that the content folder is unused and that includes the .nomedia
path, to avoid other apps seeing the folder as a source of media files.
<?xml version="1.0" encoding="utf-8"?>
<paths>
<root-path name="root" path="." />
<files-path name="shared_media" path="SharedContent/.nomedia/" />
</paths>
Configure the keyboard SDK to register apps.
|
|
Read the SDK documentation for details of the AppsConfiguration on how to open an app.
A Fleksy app to share GIFs from the GIPHY provider.
Example:
private val giphyApp by lazy {
GiphyApp(
apiKey = "<api-key>",
icon = AppCompatResources.getDrawable(context, R.drawable.gif_icon),
rating = "g",
baseUrl = "https://api.giphy.com/",
dynamicCategories = false,
categories = listOf(
CustomCategory(R.string.my_trending, "trending"),
CustomCategory(R.string.my_fun, "fun")
)
)
}
Properties:
Property | Type | Description | Default value |
---|---|---|---|
apiKey | String | The developer api key for Giphy | none |
icon | Drawable? | A drawable to use as an icon of the app. Visible on the app carousel and on the search bar. | null |
rating | String | Set the desired content rating. See GIPHY Ratings for details. It can be any of: g, pg, pg-13, r | “g” |
baseUrl | String | The base url of the giphy api service. Use to set proxies or content filtering services. | https://api.giphy.com/ |
dynamicCategories | Boolean | Whether it should fetch dynamic categories provided by Giphy. | true |
categories | List<CustomCategory>? | When set, override the default or dynamic categories by these. | null |
A Fleksy app to share stickers from the GIPHY provider.
Example:
private val stickersApp by lazy {
StickersApp(
apiKey = "<api-key>",
icon = AppCompatResources.getDrawable(context, R.drawable.sticker_icon),
rating = "g",
baseUrl = "https://api.giphy.com/",
categories = listOf(
CustomCategory(R.string.my_trending, "trending"),
CustomCategory(R.string.my_fun, "fun")
)
)
}
Properties:
Property | Type | Description | Default value |
---|---|---|---|
apiKey | String | The developer api key for Giphy | none |
icon | Drawable? | A drawable to use as an icon of the app. Visible on the app carousel and on the search bar. | null |
rating | String | Set the desired content rating. See GIPHY Ratings for details. It can be any of: g, pg, pg-13, r | “g” |
baseUrl | String | The base url of the giphy api service. Use to set proxies or content filtering services. | https://api.giphy.com/ |
categories | List<CustomCategory>? | When set, override the default or dynamic categories by these. | null |
The base app module allows building apps following the carousel of images, categories, and search bar seen in the gifs and stickers apps.
A base app is constructed by extending the BaseKeyboardApp abstract class and implementing the required methods. To implement an App from the BaseKeyboardApp abstract class, add the base dependency to your project as an api
dependency:
|
|
KeyboardApp is the core interface that the Fleksy Keyboard SDK understands and interacts with, upon which BaseKeyboardApp builds.
To implement an App from the KeyboardApp interface, add the core dependency to your project as a compileOnly
dependency:
|
|
For more information on working with keyboard apps, consider checking out the API reference documentation for the Fleksy Apps, which documents all the available methods to build apps for the keyboard built with Fleksy Keyboard SDK.