I am working on a project to listen to MP3 songs online. Therefore, I put the songs information in two tables on the airtable website. Through the spreadsheet, information and links to songs are called to be played in the EXOplayer player. Music Notification Extension was used, in order to work in the background if the screen was locked. But when switching between songs using the control buttons, whether on the screen or on the extension notification controls, there is no synchronization. When navigating with the screen buttons, the song information is gotten and shown correctly on text boxes on the screen, but on the notification extension window it is incorrect, so it seems that there is a difference in the index !!!
Ok i got it now let me go through your blocks
Because you are not setting it to notification after getting data.
@ 0 sec Button click - Notification “music name set”
@ T sec Got cell data came now
So new data came later but you set it early
Simple fix Make a procedure to setup notificattion
call it once you get the Cell Data
First: Thanks for your interest.
Second: did you look at the picture?
1- Get the value of the cell.
2- Give this value to a variable.
3- Give this variable to the notification.
Finally, I mentioned that the value appears correctly inside the text box, while it does not appear correctly when I give it to notification.
@Titan_geek is right.
Getting Cell value is asynchronous event. App doesn’t wait for cells to be downloaded because it would freeze your app. In other words, your app change the notificiation text faster (with old value) than your cell got downloaded.
thank you.
But if :“your app change the notification text faster (with old value) than your cell got downloaded.” , How it give the label text the downloaded value !!! ,even if there are a delay,it must give that value to the notification too !!!
anyway , I am trying to write a procedure and put all the values, which related to their indexes, to give it to the notification without waiting the downloaded cell( I don’t like this solution , because I can’t change it after compiling to apk file- therefore I am looking for a best solution !!!.
Beucase you set your label text and notifier text in different places.
- You label text is set after column is downloaded.
- Your notifier text is set after you click a button.
And u don’t understand basics of programming and event processing in app inventor.
- You click the button and GetCell fires and your columns are downloading in background.
- SetupMusicNotification is processed before the downloading in background finishes with old value because CPU is so fast (your data is not downloaded at the moment so variable is not changed).
- Download is finished. GotCell block fires and set your label text to value of downloaded data.
That is why.
therefore I wrote the procedure and put all the values in it according to the index change, and now the notification is synchronized with the appearance of the value of the downloaded
cell.
“And u don’t understand basics of programming and event processing in app inventor”.
I don’t know, not I don’t understand!!! Correct your words if you are a programmer.
Nice This time also by your own solution
It is simple everything happens stepwise if something doesn’t match it is in the wrong step.
This post was flagged by the community and is temporarily hidden.
“And u don’t understand basics of programming and event processing in app inventor”.
I don’t know, not I don’t understand!!! Correct your words if you are a programmer.
if you don’t want to polite in your answer then, I don’t need your help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.