Turn Radio App into Clock Radio
Moderator: Martin
Turn Radio App into Clock Radio
Hi,
i want to make my own alarm clock. Therefor i want to use the app FritzTV wich is able to play radio streams.
I was able to set a time to start the App. The App starts in the favorites tab but then i dont know how to run a certain programm
like my favorite radio stream.
i want to make my own alarm clock. Therefor i want to use the app FritzTV wich is able to play radio streams.
I was able to set a time to start the App. The App starts in the favorites tab but then i dont know how to run a certain programm
like my favorite radio stream.
- Attachments
-
- Screenshot_20170505-101036.png (125.27 KiB) Viewed 21044 times
Last edited by seven__ on 19 May 2017 11:04, edited 2 times in total.
Re: Inside App Control
Hi,
You could try to use action Control UI to simulate a tap on the Energy tile.
Regards,
Martin
You could try to use action Control UI to simulate a tap on the Energy tile.
Regards,
Martin
Re: Inside App Control
I dont know how to simulate a tap. How does Automagic know where to tap?
Re: Inside App Control
Hi,
You can tell Automagic to tap on a certain x/y-coordinate on screen or to tap a button with a certain text.
You can use action Control UI and the button Show Overlay Control to determine the coordinate or the label of the button. Click the red Info button to mark all components on screen with a green overlay. Tap within a green rectangle to show a list of possible interactions.
Regards,
Martin
You can tell Automagic to tap on a certain x/y-coordinate on screen or to tap a button with a certain text.
You can use action Control UI and the button Show Overlay Control to determine the coordinate or the label of the button. Click the red Info button to mark all components on screen with a green overlay. Tap within a green rectangle to show a list of possible interactions.
Regards,
Martin
Re: Inside App Control
Thank you very much!
Ive got the coordinates now. My script looks like this: click(xxx, xxx);
But it doesnt do the click -.-
Ive got the coordinates now. My script looks like this: click(xxx, xxx);
But it doesnt do the click -.-
Re: Control UI
I assume that you use the actual coordinates and not just xxx?
On Android 7 you could also simulate a touch using the gesture feature (use the red gesture button instead of the info button in Control UI/Overlay control).
On Android 7 you could also simulate a touch using the gesture feature (use the red gesture button instead of the info button in Control UI/Overlay control).
Re: Control UI
Of course i use not xxx 
click(906, 456);
Im on Android 6
Moto G4 Play Stock Rom

click(906, 456);
Im on Android 6
Moto G4 Play Stock Rom
Re: Control UI
Maybe the Fritz app does not use regular Android components but paints the buttons by itself. Unfortunately I can not verify it since I don't have a Fritz box.
In this case you can only press the buttons using root permissions using Execute Root Command: input tap 906 456.
Regards,
Martin
In this case you can only press the buttons using root permissions using Execute Root Command: input tap 906 456.
Regards,
Martin
Re: Control UI
It works
You are brilliant.
Next problem. When the screen is off the execute Root Command: input tap 906 456 is not done.
My flow looks like this:
Time
Launch App
Execute Root Command
When i exceute it when the screen is on it works. When the screen is off nothing happens. When i log in with my pin the fritz app opens by himself.
So i guess the flow works in the background when the sceen is off until it comes to the point execute Root Command: input tap 906 456.
How can i force the execute Root Command: input tap 906 456 be done even when the screen is off?

Next problem. When the screen is off the execute Root Command: input tap 906 456 is not done.
My flow looks like this:
Time
Launch App
Execute Root Command
When i exceute it when the screen is on it works. When the screen is off nothing happens. When i log in with my pin the fritz app opens by himself.
So i guess the flow works in the background when the sceen is off until it comes to the point execute Root Command: input tap 906 456.
How can i force the execute Root Command: input tap 906 456 be done even when the screen is off?
Re: Control UI
Simulating taps on the screen usually requires the screen to be on and unlocked. You could use action Turn Screen On to activate the screen. Unlocking can be difficult depending on lock type and Android version. Set Lock PIN/Password or Set Keyguard State works on some devices. You could also try to simulate taps to enter the PIN/password.
Regards,
Martin
Regards,
Martin