Hi, sorry… i tried to create app to counting accesses with 2 buttons and script on google sheets, but doesn’t work on mobile devices.
So i hope it is possible with app inventor.
I need 2 buttons:
Button Green = when clicked increase by 1 the total
Button Red = when clicked decrease by one the total
I need a label where will be displayed in real-time the result of the clicks. And i need this label/result is sharing with 4 smartphones that are playing with the same application.
If you need i can give you thenscript i used on giogle
Can i ask you another thing?
At the same for result, can i share the switch element?
I don’t know how to share the change of position of the switch… I can only share the change of the label associate at the switch position
You probably want to know who changed the switch as well?
Add a textbox to enter a name for the user
Add a variable: Which Button
For each button click event in the valuetoStore
Create a list: Label1.Text, Textbox1.Text, Which Button (text value)
Create labels for user and switch position
In the data changed event, set the three labels with the contents of the list
I can’t share the switching of the switch (the switch doesn’t change its color between green-grey on every device in which is the application.
I only obtain the sharing on every device of the switch’ label
You will need blocks in the dataChanged event to change the position of the switch ? (Assuming you have sent information about the which state you want the switch to be in)
yes, i need to store and share to the others devices the state of the switch. I don't know how to send to cloudDB the Change information "When Switch.change" ...so the position of the switch doesn't change on the others devices as instead the label does
It is not that much more thatn the original app i wrote for you, just allows for the switch setting and text as well, and by using a list to store the data means we only have one tag to worry about on each data change.
OK, perhaps you haven’t explained how the switch is used in your app. All I did was programmatically change the switch based upon a user pressing the +/- buttons. If the user has to “turn the app” on, I am not sure why this is needed or how you intend this to work?
Here is the aia project that i prepared with the switch (as shown in the blocks) perhaps this will help, you seem to have got very confused…
the switch is used only to show the associated phrase.
when switch1 is turned on, red text is shown. When switch1 is turned off, black text is shown. I can share the right text and color, but I cannot share the on / off status. Yes,sorry i used App inventor a few times so i'm very very very confused
i don’t know how to use this in my code…where and how to store this value in CloudDb to obtain the sharing between users… can you help me?thank you so much