Users often want to communicate with emojis, stickers, and other kinds of rich content. In previous versions of Android, soft keyboards (also known as input method editors or IMEs) could send only unicode emoji to apps. For rich content, apps had to either build app-specific APIs that couldn't be used in other apps or use workaround like sending images through Easy Share Action or the clipboard.
With Android 7.1 (API level 25), the Android SDK includes the Commit Content API, which provides a universal way for IMEs to send images and other rich content directly to a text editor in an app. The API is also available in v13 Support Library as of revision 25.0.0. We recommend using the Support Library because it runs on devices as early as Android 3.2 (API Level 13), and it contains helper methods that simplify implementation.
With this API, you can build messaging apps that accept rich content from any keyboard, as well as, keyboards that can send rich content to any app. The Google Keyboard and apps like Google Messenger support the Commit Content API in Android 7.1
feature request: https://developer.android.com/guide/topics/text/image-keyboard.html