Skip to content

LeoAndo/ReceiveContentSample

Repository files navigation

ReceiveContentSample

sample for unified-content-api(Android 12 +)

日本語版README

about unified-content-api

With the existing API, the API to call for each action such as "clipboard, keyboard, drag and drop" to insert content into the app was different.
Since Android 12 added the OnReceiveContentListener interface,
This interface allows you to hook events with content inserted in various actions.
link1

use libraries

androidx.core:core-ktx:1.5.0-beta03
androidx.appcompat:appcompat:1.3.0-beta01

Currently, there are the following restrictions to use the backward compatible API of androidx.

  • Valid only for AppCompatEditText. We are considering enabling the content insertion function in other views in the future.
    ref

capture

The following external application was used to check the operation.

  • Google Chrome
  • File Exploler

Pixcel 4 OS 12 preview

Insert using Paste
from long-press menu
Insert using drag and drop (image) Insert using drag and drop (video) insert a keyboard image

About

sample for unified-content-api(Android 12 +)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages