Clipboard access from foreground

Hi everyone, Im new in android development. So I want to create app like Microsoft LInk to windows or samsung flow, but my and for linux, I faced problem that I cant access clipboard changes from foreground service, logs in logcat says Denying clipboard access to ***, application is not in focus nor is it a system service for user 0
My device: android 13 on Samsung s21

I looked into samsung flow app permissions and there are some com.samsung.android.scs.*** permissions but It gives me nothing and in link to windows: com.samsung.android.sdk.mdx.permission.STUB_APP_UPDATE_UI_EVENT
I tried searching for samsung sdk but didn`t find it.

So I just want to access clipboard changes from foreground service,
maybe someone can give some useful references for me
:slight_smile:

Hello mixfaa,

Welcome to Samsung Developers Forum.

Unfortunately, there are currently no public SDKs that allow background / foreground-service clipboard access to third-party applications. Your application must be in focus and visible if you want to access the clipboard according to the standard Android policy.

Best Regards,
Mobassir Ahsan
Samsung Developer Relations.