Start screen recording?

peejay

New member
My Samsung Galaxy S52 has built in screen recording function. Is there a way to turn this on with Macrodroid when an app starts? Many thanks.
 

LinerSeven

Active member
Hi, peejay.

There may be a way to use an intent, but there is no information on this from what I have been able to find, so I am suggesting a simple method.

If you are using a Galaxy A52 5G, the operating system is Android 11.

In standard Android 11, Screen Recording should be configurable as a button in Quick Settings your mobilephone.

For example, as shown in the attached image, you can place the Screen Record button in the Quick Setting of the device and use the UI controls to control it.

You should note that if you want to record taps and audio when recording, MD cannot automatically get the interface IDs of those buttons, so you need to specify the XY coordinates directly in the UI controls.

Best regards.
 

Attachments

  • [Android11+]_Screen_Recording_Automation_Sample.png
    [Android11+]_Screen_Recording_Automation_Sample.png
    52.3 KB · Views: 19

peejay

New member
Thank you for that speedy reply. I am a complete novice using Macrodroid but I have followed your suggestions until I got to the UI Interaction part. Here I clicked on "Click" and another screen popped up with a number of options ie Current focus etc. At this point I got a bit lost as to where to go next as you had "Screen"
Also, if I manage to progress any further, how would I get the XY coordinates of the buttons?
Thanks so much for your help so far.
Regards.
 

peejay

New member
I have progressed :) I have followed your setup and now have this as per first attachment.
Then when I start the app that is the trigger, the Quick Settings screen now starts up as shown. Then I need to somehow click on the Screen Recorder button and then the Start Recording button. Do you think you could explain how to go about these two steps?
Many thanks,
PatScreenshot_20220516-161905_Litchi.jpgScreenshot_20220516-161321_Litchi.jpgScreenshot_20220516-161246_MacroDroid.jpg
 

LinerSeven

Active member
Hi, peejay.

Thank you for your response.

Unfortunately, it seems that the XY coordinates can only be determined by checking the screen size yourself. :-<

Let's see if we can use variables to get the content of the screen?

1. local Variables > + > Variable Type : "Dictionary" (the name can be arbitrary).
2. as shown in the attached image, use the Read Screen Contents action and have it specify the Dictionary Variable created in 1. and Fire the trigger.

If you do this, the Dictionary Variable will contain an ID indicating the "selectable" screen item retrieved from the screen and the name of the item, so if there is content such as Screen*** in the Dictionary Variable, you can use the UI Interaction > Click > View ID, specify the ID that indicates the content of Screen***, and MD will automatically click towards it.

-----

In the case of your environment, it is
No Sound/Media Sounds/Media sounds and mic, and these are Galaxy-specific menus, so you will be asked to specify the XY coordinates so that you tap these radio button parts, and "Start recording ", which would be in the form of tapping "Start recording".

In my expectation, "Start recording" can probably pick up UI-ID, and I think that it is good if it specifies it in UI Interation, but No Sound/Media Sounds/Media sounds and mic I think the radio buttons for the three parameters and the "Show Taps..." I think the only way is to try XY with Try and Error for the "Show Taps...".

If you don't want to do anything difficult, you can use
Simply specify the ID of the result of the Dictionary Variable that contains the Start Recording text as the View ID of the UI Interaction and you should be good for now.

Best Regards.
 

Attachments

  • SnapShot20220516T133546.jpg
    SnapShot20220516T133546.jpg
    144.8 KB · Views: 8
  • SnapShot20220516T132614.jpg
    SnapShot20220516T132614.jpg
    150.1 KB · Views: 9
  • SnapShot20220516T132602.jpg
    SnapShot20220516T132602.jpg
    140.2 KB · Views: 9

LinerSeven

Active member
Hi, peejay!

If you have more trouble, try importing this and run.

(Sorry, if it does not work.......)

Best Regards.
 

Attachments

  • [Android11+]_Screen_Recording_Automation_Sample.macro
    2.6 KB · Views: 12

LinerSeven

Active member
(Follow-up) How to obtain XY coordinates:
UI Interaction > Click > Identify in app > (Tap Notification of MacroDroid in Statusbar) > Tap Object you want to manipulate

Sorry, I have just realised this X-<

FYI.
 

peejay

New member
Thank you for the attachment but it is not working. There is something strange happening. If I manually open Quick Settings screen and select Screen Recorder I go to a screen that has "Start Recording" and tapping one this starts the screen recording.
However, when I run the macro, it selects Screen Recorder but then a screen opens that says "Done". Selecting "Done" then just returns to the Quick Settings screen.
Any idea what is going on?
Many thanks again.Screenshot_20220516-185934_Litchi.jpg
 

LinerSeven

Active member
Hi, Peejay.

If Done appears on your mobile phone screen, does that mean it is actually being recorded?

What would be the result if you tried tapping Done? Will the video be saved?

You are right, it is a strange phenomenon.....
 

LinerSeven

Active member
Hi, peejay.

I borrowed a few Galaxy S21s from the shop and tried them, but could not reproduce.
Mmmm.

I can't think of a solution at the moment. Sorry...
 
If I remember it right, you can find a better application for Android in google play, especially for the 11 version of Android. They are way better than the default application, so if you are looking for a good screen recorder application on your mobile phone, I hardly suggest you look at google play, especially if you are looking for a movavi screen recording application. The movavi screen recording application was originally designed for PC. Still, they just made their application for Android and IOS, full instructions about the installation process you can find at this link https://www.movavi.com/screen-recorder-mac/.
 
Last edited:
Top