Problem with the extension to record the screen

Hey everybody! I hope you're all doing great!

I was playing with the demo again and I still can't get it to record more than once. I added the "AskForPermission" block but the app behaves the same. I added an alert to let me know if it's recording or not.

For my reasoning (which I'm sure is wrong :man_facepalming:) there's nothing out of place in the When Button clicked block, but once the first video is recorded (and saved) the button stays in that state (color and label) and the recording doesn't work anymore. Can you give me a hand?

Thanks in advance!

Audio Record permission is still missing in your blocks.
Write permission is needed to save file and record permission is needed to record screen.

If I am not wrong the by default extension saves files with a predefined name so you will always get one file but with latest recording.
I forgot code actually so I can be wrong :sweat_smile:

Thanks @vknow360! I added the audio record permission to my blocks! You are right about it saving (or keeping) the last one. I'll add a way to change the name of the file automatically. :smiley:

I found my big mistake. What's wrong on my shared blocks is the placement of the following one: component_method Once I put it in the "When Button clicked" the app began behaving well.

I hope this helps someone! Thanks again for a great extension! Cheers from Argentina!

1 Like

hello everyone, I've come to this point:
the application records videos correctly, but only from the MIT AI2 Companion mobile application.
installing the apk does not give any error but does not save the video. How can I proceed? I have already requested the two authorizations

Can you share your blocks? In my case the APK saves one video in the Recordings folder. I haven't custom the path yet.

here is my .aia file
RegistratoreSchermo.aia (30.7 KB)
cheers from Italy

Your problems seems to be here:

I disabled it and it works! It only saves the last capture, as in my demo.

did you remove that block?

I disabled it, but removing works as well.

Maybe that block shouldn't be at initialize. I'll try it later but my guess would be to put it after the video is recorded.

I'll post here when I get to save more than one file.

Yes, it should be set before initialize.

Hi Vknow360
. I used your extension in my software but don't work in Android10. Same in Kodular and in AppInventor. Make app crash.
Is it possible make somethingh for.... ?

Thank's.

Hi @Angelo_Angius
Can you post the logs here?

I'm sorry but I'm not able to do that now. The tablet I tested, a small Lenovo, does not have the enable debugger access option and I have never used logcat. I think you could ask to do a test to https://community-appinventor-mit-edu.ezproxy.canberra.edu.au/u/Anke or the people in the comunityand to have the log. I'm sorry for this.
if I can do something else, ask ...
Angelo.

Hello Angelo:

By default, no device has debugger/developer mode enabled because the majority of people are not writing Apps for their device! There is a simple step-by-step process which is very similar across all devices and especially so for devices from the same manufacturer.
https://www.professorcad.co.uk/smartphonescreensizes#SetDebugMode

ok, now check.
I have a Mac. instruction for LogCat are the same?

Are you testing in emulator?
If so then which software.

Also, you can get logs easily if os is based on/uses java.
Process will be same as of Linux.

Output di Terminale salvato.pdf (657.8 KB)

This is what I have

Output di Terminale salvato2.txt (1.2 MB)

First time I used LogCat . This is better

The issue is here:

Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION

I'll fix it soon.