Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 68

whaleshark
buzztouch Evangelist
Profile
Posts: 13
Reg: Apr 10, 2013
London
5,430
06/19/13 03:31 PM (12 years ago)

Holding quiz questions on a server

I would like to do an in app quiz that fetches the questions from my server, purely because i want the questions to change on a regular basis and dont want the user to have app updates every week... Does anyone know if its possible and how to do it?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/19/13 04:53 PM (12 years ago)
Totally possible! The questions are fed by JSON code, and that code can be hosted on a text file anywhere you like, so long as (1) it's reachable on the network, and (2) the JSON is correctly formatted. Tons of people do this, so it's pretty much trivial. You'll see that in the control panel for the quiz plugin, there is the option to point to a URL for quiz questions. That's what you're looking for. Mark
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
06/19/13 06:33 PM (12 years ago)
Its in the section that says "Screen Data URL". Just put the question and answers in json format, put the text file on a server some where. Then put that web address into the field for the 'screen data url'. Stobe has some good info on his blog. http://idevdepot.com/episode03/
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/19/13 09:54 PM (12 years ago)
Echoing and adding to Mark's statement, you can also get PHP/MySQL query results formatted as json and use it for your data, if that's your plan. Cheers! -- Smug
 
whaleshark
buzztouch Evangelist
Profile
Posts: 13
Reg: Apr 10, 2013
London
5,430
like
06/20/13 12:50 AM (12 years ago)
Thanks for all the replies and advice everyone!
 
Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
like
06/20/13 02:44 AM (12 years ago)
wouldnt this make your app, an 'online' app. so if they happen to be offline, they wouldnt be able to play your quiz? you can update the questions in the control panel and just turn on auto refresh when they open the app. that way the questions will update automatically, and if they were offline, they would still be able to play with the existing questions until they are back online? you wouldnt have to submit an update through the app store each time you want to add questions thanks steve
 
whaleshark
buzztouch Evangelist
Profile
Posts: 13
Reg: Apr 10, 2013
London
5,430
like
06/20/13 03:12 AM (12 years ago)
@Steve, Offline would be better. Thanks for the tip.... :)
 
Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
like
06/20/13 03:19 AM (12 years ago)
to execute what im talking about.... just add the questions to the control panel as per normal. to do the autorefresh, just search auto refresh in the forum and there are multiple posts with 1 line of code to get your app to do this. you will need to tweak this in xcode/eclipse and not the control panel. here to help if needed
 
whaleshark
buzztouch Evangelist
Profile
Posts: 13
Reg: Apr 10, 2013
London
5,430
like
06/20/13 03:25 AM (12 years ago)
@Bonzo Thanks, i have already enable the auto-refresh on a previous app of mine so im sure i can do that. I will send you a PM if i get stuck! Thanks for the advice! :)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.