Taifun Clipboard extension no longer running in background

Good morning all,
I am using Taifun Clipboard Extension within an app of mine, to automatically save and collect in a text file multiple chunks of text copied in a row (this tool turns out to be useful to me when I have to copy a lot of text from several different points, in order to avoid to drive me crazy jumping back and forth to copy the text and paste it elsewhere). A fundamental requirement for my app is to be capable to detect clipboard content change, especially when the app is running in background.
Unfortunately, after my smartphone update to Android 10, I noticed Clipboard extension does not work anymore with the app set in background. In the previous Android versions (up to 9), the extension was working like a charm. I posted two pictures of a proof of concept app, monitoring clipboard content and showing the problem: in older Android versions, the clipboard can be read even in background, but it is no longer so with Android 10.
Could anybody suggest me how to solve the inconvenience? It is possible to fix the extension to let it run again in background on Android 10 as well? Without such feature of the extension, my app is actually useless and I should commit writing down a background service, taking advantage of other tools, because App Inventor Services server has been unfortunately shut down (a disappointing and arguable choice, since it was at least the only friendly way to build up a background service without bothering with professional and more powerful tools, that require also much more effort in their use).
Thanks all in advance.


what exactly means "running in the background" for you?
actually App Inventor apps not really are able to run in the background..

in older Android versions, the clipboard can be read even in background, but it is no longer so with Android 10.

could you please elaborate what exactly you were able to do while your app was running in the background?

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Hi Taifun,

First of all, thank you for your kind reply and for your interest to this issue.
Actually, App Inventor apps are somehow capable to run in background (although in a limited way): think about the property TimerAlwaysFires of Clock component, that I just take advantage of in my app.
In order to better explain and elaborate from my side the topic here treated, I think better to post some screenshots of the demo app I built up, so to point the issue out.

The first 6 screenshots are taken from the app running on an old Android version, where the component works properly both in foreground and in background.
If I copy some text within the app, that is, with the app running visible and in foreground (pic1.png), the clipboard is properly read and the component works like expected (pic2.png): so far, nothing special. If I send the running app in background (that is, I press circle softbutton, marked in yellow in pic3.png), without dismissing it from memory (pic4.png is the list of the apps still in memory), the app keeps running fine (pic3.png). And the same happens if I open another app and I copy there some text in clipboard (pic5.png and pic6.png), with the app still running in background. Therefore on old Android versions everything is fine.

I repeated on Android 10 the same steps above described, but it seems like the component is here unable to read the clipboard with the app running in background. The app works like a charm in foreground (pic7.png), but in background it does not (text of Notifier is empty, as marked in yellow in pic8.png), besides if I resume to foreground the app, it gets back working properly (pic7.png).

I hope I have been more clear in explaining my issue.
Thanks again and regards.








yes, therefore I said, "not really"... only somehow or a little bit... :wink:
for example a countdown in the background ends without alarm, see also App Inventor Tutorials and Examples: Countdown | Pura Vida Apps

I think, you were lucky, that it worked like this in older Android versions...
As already said, App Inventor apps not really are able to run in the background... there is not much I can do...

but feel free to adjust the extension to your needs... the sources of the clipboard extension are available on my webpage App Inventor Extensions: Clipboard Manager | Pura Vida Apps

more information about how to create an extension see the App Inventor Extensions document
however that will be more advanced and will require some Java skills...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

2 Likes