analog
December 6, 2020, 11:44pm
1
Hello everyone, I want to color the day in a calendar in Screen 1 when a video was played in screen 2, so people know what day they watched the video. Do you know what to do so that so that after watching the video the day is automatically colored.
Thanks for your help
Lola
You can use open with start value
is a good choice. It transfers the value when going back to Screen1.
On Screen2,
Back to Screen1,
A test aia (tested on both companion and compiled apk on Android 10 Oneplus 5T)
test2.aia (3.2 KB)
ABG
December 7, 2020, 3:39am
3
Use the date as a TinyDB tag and store the video URL in its value.
ABG
December 7, 2020, 4:33pm
5
Your specification makes no sense.
The calendar does not say which video(s) were watched on that date, only that SOME video was watched on that date.
What is the benefit of that?
Taifun
December 7, 2020, 4:55pm
6
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
analog
December 7, 2020, 5:23pm
7
Thank you very much for your help.
It's about a learning app, where you can see on which days you watched a learning video. I first wanted to try out how it works with the colouring. If you also write down which video you watched, it is even more complicated
analog
December 7, 2020, 5:52pm
8
it did this, but now every single day is blue!
Taifun
December 7, 2020, 6:06pm
9
one solution is to have a different tag in TinyDB for each of the videos
generally use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
Sorry for that, I thought the OP was saying to transfer data when switching screens. However, it is still useful in some cases.
Taifun
December 8, 2020, 2:26am
11
sorry, no... what you showed is just wrong... and you did not show when it would be useful...
the only exception is Tribblehunter's method or a variant of that method...
Tribblehunter's Multiple Screen Method
Taifun
1 Like
What's wrong? The only thing I missed is closing the previous screen.
Sending data between screens instead of saving additional data in TinyDB. Simple as that.
Taifun
December 8, 2020, 3:26am
13
there you go...
and without that it is wrong...
you might want to adjust your answer to make it correct...
You can use open with start value is a good choice. It transfers the value when going back to Screen1.
On Screen2,
[image]
Back to Screen1,
[image]
A test aia (tested on both companion and compiled apk on Android 10 Oneplus 5T)
test2.aia (3.2 KB)
Taifun
1 Like
Anke
December 8, 2020, 7:52am
15
@analog Which VideoPlayer do you use and where does the video come from (assets, SDcard, URL)?
The VideoPlayer
component cannot play from URL.
See e.g. here:
Hi Tng, did you manage to solve the issue?
I am facing the same problem. I can only play the .mp4 video succesfully when I add it in the app resources.
However, if I try to load it from a URL on the fly, an ‘undefined’ exception is shown on screen when the ‘set VideoPlayer1.Source’ block is executed.
I tried to covert the .mp4 video into the ‘H264 baseline profile’ as suggested here , but unluckily I did not notice any difference.
Thank you.
Best regards,
David
[blocks-picture]
2 Likes