2016년 12월 13일 화요일

Updating Button status on different phones with same app


I have been wondering, is it possible to update a button's status in the same app on different phones? Can we use tinyWebDB for it ? if so then how it can be used?

-- 
I believe your app would need to "poll" the tinyWebdb on a regular basis, then a routine to respond to the change, in which case you could use a variety of methods to set the value you require (spreadsheet/csv)

There are "push" features about but this is not a mainstream feature yet with AI2.

-- 
try the FirebaseDB component, which offers a DataChanged event

-- 
I would do it using firebaseDB but I read on web somewhere that FirebaseDB can't be used for long run. And as I want to customize this app

Are there any sort of tutorial which could help me with this. 
I tried with the TinywebDB but it doesn't work as I'm able to get the data stored but retrieving it is difficult. Data seems to be lost somewhere. 

-- 
the Make Quiz Take Quiz tutorial uses TinyWebDB http://www.appinventor.org/book2
If I were you, I would use the FirebaseDB...
all other databases require constantly polling

you also can take a look into PubNub, which offers at least long polling https://puravidaapps.com/pubnub.php
I'll surely look into those tutorial and give a try with the firebase too. 

I still have doubt's with the TinyWebDB, as I'm storing the data it stores the data with extra backslashes"//" so while I retrieve the data through the get value tag the data is not visible on my label. 

-- 
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

-- 
I'm sorry I tried to add the image in last post but the server was down. Below are blocks, in which I'm trying to update the label image using TinyWebDB
-- 

as I'm storing the data it stores the data with extra backslashes"//" so while I retrieve the data through the get value tag the data is not visible on my label. 
the TinyWebDB.GetValue block must be outside of the TinyWebDB.GotValue event (for example in another Button.Click event), else you create an endless loop
do again the mentioned tutorial to learn how to work with TInyWebDB

please store the valueFromWebDB additionally in a label and use Do it to display its value, then take another screenshot including Do it result, so we can see the value...
see also tip 4 here 

Top 5 Tips: How to learn App Inventor


-- 
I tried changing the my blocks by adding one more button to get the values and it worked but unfortunately I didn't understand how does the "Do It" option works when I tried it gives me error like this "The variable $valueFromWebDB is not bound in the current context" .


Also could you suggest a way to use only one button to store and retrieve the web data??

One more thing I downloaded google app engine to create my custom webDB, but its not a launcher its a cloud. I'm finidng it difficult to create it, 
If you have a new tutorial based on the google cloud engine please let me know.

-- 
See this link for how to capture values after they have evaporated ...


-- 
Thank you Abraham, I'll surely look into it.

--
I have been wondering, is it possible to update a button's status in the same app on different phones? Can we use tinyWebDB for it ? if so then how it can be used?

-- 
I believe your app would need to "poll" the tinyWebdb on a regular basis, then a routine to respond to the change, in which case you could use a variety of methods to set the value you require (spreadsheet/csv)

There are "push" features about but this is not a mainstream feature yet with AI2.

-- 
try the FirebaseDB component, which offers a DataChanged event

-- 
I would do it using firebaseDB but I read on web somewhere that FirebaseDB can't be used for long run. And as I want to customize this app

Are there any sort of tutorial which could help me with this. 
I tried with the TinywebDB but it doesn't work as I'm able to get the data stored but retrieving it is difficult. Data seems to be lost somewhere. 

-- 
the Make Quiz Take Quiz tutorial uses TinyWebDB http://www.appinventor.org/book2
If I were you, I would use the FirebaseDB...
all other databases require constantly polling

you also can take a look into PubNub, which offers at least long polling https://puravidaapps.com/pubnub.php
I'll surely look into those tutorial and give a try with the firebase too. 

I still have doubt's with the TinyWebDB, as I'm storing the data it stores the data with extra backslashes"//" so while I retrieve the data through the get value tag the data is not visible on my label. 

-- 
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

-- 

댓글 없음:

댓글 쓰기