Is it possible to read text from another app?

Post your questions and help other users.

Moderator: Martin

Post Reply
rendertrue
Posts: 1
Joined: 06 May 2019 16:02

Is it possible to read text from another app?

Post by rendertrue » 06 May 2019 22:04

I have created a flow to start and stop ride recording w/ Strava. When I finish a ride, the Strava app displays distance, time, and average speed. Can I read these fields and have automagic convert to speech?

I see a way to control a UI, but not to read from a UI.

Thanks.

Rick
Posts: 5
Joined: 08 May 2019 14:23

Re: Is it possible to read text from another app?

Post by Rick » 08 May 2019 17:11

Hi Rendertrue,

Not sure if one of my older flows could be useful to take a look at or maybe adapt to suit your requirements.

It was set so when I put my phone down on the NFC tag on my desk, it opened the playbooks app, selected the specific book from the app, then started reading it aloud.

It is a bit of a basic flow and there are probably better ways to achieve the same, but it worked so worth a look over.

Hope it helps in some way.

Rick
Posts: 5
Joined: 08 May 2019 14:23

Re: Is it possible to read text from another app?

Post by Rick » 08 May 2019 17:13


User avatar
Desmanto
Posts: 1981
Joined: 21 Jul 2017 17:50

Re: Is it possible to read text from another app?

Post by Desmanto » 08 May 2019 18:38

Control UI also include ways to get the text. You can use getText() and its variant or getTextInActiveWindow(), which will retrieve all available text. But using the later, might require some parsing using regex. So it is better to use getText() variant. You can use Show Overlay Control and press the INFO at the Strave when it display the distance. Tap the text and find the one with getText() variant function. Refer to my Control UI tutorial for further info.

After you get the text, use Speech output on the text, as shown in Rick's flow.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

Post Reply