I'm planning to create an exam app for android but I have a couple of concerns before jumping to the development.
For the first part, the questions are dynamic which means the questions and the number of questions are not fixed. What I'm planning to create for this is a web server where I can fetch the JSON data for the questions and answers(is this correct?) which are dynamically added by the admin of the web server.
For the second part, I want the fetched data(questions) to be shown one per view(one per device screen) then just put a button to confirm the users answer, the concerns I'm having is, is this approach going to take a lot of memory? Specially if the data that is fetched are more than a hundred of questions.
I still have a lot on my mind but for the meantime I want this two questions answered first, Thank you and have a good day!
clonedaccnt said:
I'm planning to create an exam app for android but I have a couple of concerns before jumping to the development.
For the first part, the questions are dynamic which means the questions and the number of questions are not fixed. What I'm planning to create for this is a web server where I can fetch the JSON data for the questions and answers(is this correct?) which are dynamically added by the admin of the web server.
For the second part, I want the fetched data(questions) to be shown one per view(one per device screen) then just put a button to confirm the users answer, the concerns I'm having is, is this approach going to take a lot of memory? Specially if the data that is fetched are more than a hundred of questions.
I still have a lot on my mind but for the meantime I want this two questions answered first, Thank you and have a good day!
Click to expand...
Click to collapse
There shouldn't be any memory issues, though to conserve data usage and battery, personally I would download all questions at once and store them locally in an SQLite database, then whenever a new question is needed you don't have to send off a request to the web server. ALso this means the app could be used offline, especially if you do a similar thing with the answers and store them locally then check if the students answer matches up to the stored answer.
Sqlite is a fine thing, i agree with jonny
And as your questions are just a lot of strings they wont take a lot of memory, some few jpegs etc would take lot more
---------------------------------
Phone : Nexus 4
OS :
- KitKat 4.4.4 stock
- Xposed: 58(app_process); 54(bridge)
- SU: SuperSU
- no custom recovery
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Related
I know this is probably totally off-topic and no one may care, but I know that in my own endeavors to modify my nook color and my droid x, I have had numerous times where information was very difficult to find. When I went to reflash my droid x, I spent 30 minutes searching for sbf_flash for Ubuntu! I'm attemptiong to create a website that will be run by regular people, like me. Some people who are passionate about each device, who will keep their device's respective page updated with new links, mirrors, etc.. I, myself, am providing mirrors from my dedicated server. So... feel free to visit www.modedited.com I'm working on the DroidX page as we speak, and next to come is Nook Color. Please, test it out. I was downloading gb pre rooted earlier at 8.7 mbps from server.
If you have some time and would like to develop a page for a different device, feel free to contact me! [email protected] OR PM
I've been around, and am currently in the process of moving rdp.modedited.info over to new server.
I believe that this can be a huge success in that each device has it's own page, with mirrors hosted right on the server (100 mbps port speed), each device page will be updated by someone who owns that device and knows how to organize the information so that others can get to it. Pages will also be optimized to display excellently on a mobile device. The device's "editor" will be compensated in that on "his/her" page they will be able to use Google ads or other ad providor on their page.
Thread closed.
You are in violation of rules #5 and #7
5. Post a message only once.
As a large forum we don't need unnecessary clutter, You're free to edit your message as you like, so if you do not receive an answer revisit your message and see if you can describe your problem better. Not everyone is online at the same time, it might take a while before you receive an answer.
7. Do not spam.
If you wish to advertise a product, contact us we provide ads. But do not post it in the forums, it will be removed and you're likely to receive a ban.
You are however allowed to sell used goods like your own device, parts of your device or accessories for your device in the marketplace forum, please read the rules there before posting. (This rule includes signatures, if you use a signature it will appear in your post)
Good afternoon everyone! I have been looking for a forum to hit up that isn't stack-overflow for android developing and a friend pointed me here. Currently my experience with android is very minimal, I am working on a simple (simple is read, "Dear god what did I get myself into") project for school with no background in this sort of platform. I program in PHP and C# primarily and thought that this project would be a fun way to immerse myself in Android.
The application I am writing is a sort of life style app to gather daily eating habits from the user in an attempt to make you feel bad about your terrible eating choices and get you to eat better. If anyone is familiar with Good Eats I am basing the app around Alton Brown's 4 list diet.
Here is where the issues have started:
I constantly feel like I am coding myself into a corner and have started over a number of times, there seem to be many ways of gathering this information from the user but non of which seem very cut and dry with database interactions.
What I am looking for is a way to gather the day and list choices from a user (for the lists I was using dialog check boxes spawned from buttons but this doesn't seem to be the best way to do it as I cannot figure out how to store the checked off boxes within the dialog).
So my noob question is, are there any tutorials dealing with basic data gathering and storage?
Thanks for your time and look forward to hanging out on these forums more regularly.
ZachM86 said:
So my noob question is, are there any tutorials dealing with basic data gathering and storage?
Click to expand...
Click to collapse
Try this link -- developer.android.com/training/basics/data-storage/index.html
ZachM86 said:
Here is where the issues have started:
I constantly feel like I am coding myself into a corner and have started over a number of times, there seem to be many ways of gathering this information from the user but non of which seem very cut and dry with database interactions.
What I am looking for is a way to gather the day and list choices from a user (for the lists I was using dialog check boxes spawned from buttons but this doesn't seem to be the best way to do it as I cannot figure out how to store the checked off boxes within the dialog).
Click to expand...
Click to collapse
this may help:
create variables for each checkbox that can be checked
in your dialog interface onClick if (isChecked) { variable = 'which';}
then enter it into your database when submitted. Then when you query just correlate the variable to the corresponding string name
this may help as well (go down to the multi/single choice list)
http://developer.android.com/guide/topics/ui/dialogs.html
i'm writing a questionnaire/survey type app and i need some help with the conceptual design.
i want my app to display 10 random questions selected from about 50 questions. Now I have a class:
public class Question {
public String questionText;
public string answerOptions;
}
What I am confused about is how do I get the 10 questions from the 50 questions?
1)Should the 50 questions be in a SQL database which I "grab" data from and populate my survey as required? In this case how do I a bundle the database with the apk?
2) Initialise 50 Question Objects in the MainActivity and just use them as variables?
I would save them in a normal text file.
Add the 50 questions to an ArrayList. Create a new Array of int with the size of 10 objects.
Add 10 random numbers to it (in the range of 0 - 49, Java: 50 * Math.round()) and before adding one, check whether it is already in the Array. If it is, get another number.
Then get your 10 questions from the list.
I would go for shared preferences rathet it ll save the time
And to be more presice i would suggest using javq.util.Random and call the nextRandom(50) method but remember to check if you havent alread recieved the number
Rest you can follow the above method
Sent from my GT-S5302 using Tapatalk 2
sak-venom1997 said:
I would go for shared preferences rathet it ll save the time
And to be more presice i would suggest using javq.util.Random and call the nextRandom(50) method but remember to check if you havent alread recieved the number
Rest you can follow the above method
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
Well, if I got him right, he wants to save them and include them into the apk. He asked how to do that. So there is no need for SharedPreferences.
Maybe your method for the random number is better. To be honest, I have never used that method.
nikwen said:
Well, if I got him right, he wants to save them and include them into the apk. He asked how to do that. So there is no need for SharedPreferences.
Maybe your method for the random number is better. To be honest, I have never used that method.
Click to expand...
Click to collapse
I did mean your method.was wrong or something i was just telling an easier method to implement your method in code
Sent from my GT-S5302 using Tapatalk 2
nikwen said:
I would save them in a normal text file.
Add the 50 questions to an ArrayList. Create a new Array of int with the size of 10 objects.
Add 10 random numbers to it (in the range of 0 - 49, Java: 50 * Math.round()) and before adding one, check whether it is already in the Array. If it is, get another number.
Then get your 10 questions from the list.
Click to expand...
Click to collapse
Even though it is only 50 questions now, that would over time be increased to <1000 questions. For what number will a text file be deemed "inefficient" or difficult to work with?
prtbrown said:
Even though it is only 50 questions now, that would over time be increased to <1000 questions. For what number will a text file be deemed "inefficient" or difficult to work with?
Click to expand...
Click to collapse
It would entirely depend on file size and targeted device for instance a device like mine with.300mb ram and 832Mhz proc would crawl to process a 5 mb file while a nexus 4 will do it like a breeze
I would suggest deviding the questions in sets like quesSet1 ,quesSet2 etc
Sent from my GT-S5302 using Tapatalk 2
I'm planning to create an android application library system for the school, the school already have this kind of system that is accessible on the intranet(they will be soon implementing the online version). But before proceeding on the development on this project, I have come up with this following questions:
First, I'm planning to have my application to have the online and offline version, the online version is self explanatory, the offline version is to have the data(books etc.) searchable even without internet connection, What I think I'm going to do is to copy all the data from the web server and store it on the local database of the device(or this idea is wrong?). The problem is I don't know if the device can handle that large amount of data.
Second, if the above is possible, how can I make the application fetch the newly added data(the data that is added when the user is not connected to the internet) when the user has somewhat find an internet connection.
This problem is bothering me for many days already, hope you can help me with this one with your knowledge and ideas.
For the first part i can say if the particular device has got enough free space, it can of course handle that amount. I mean look at all those games that have to additionally download 1 or more gigs of data. Well i dont know what amounts you would be talking about but there shouldnt be a problem
---------------------------------
Phone : Nexus 4
OS :
- KitKat 4.4.4 stock
- Xposed: 58(app_process); 54(bridge)
- SU: SuperSU
- no custom recovery
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
clonedaccnt said:
I'm planning to create an android application library system for the school, the school already have this kind of system that is accessible on the intranet(they will be soon implementing the online version). But before proceeding on the development on this project, I have come up with this following questions:
First, I'm planning to have my application to have the online and offline version, the online version is self explanatory, the offline version is to have the data(books etc.) searchable even without internet connection, What I think I'm going to do is to copy all the data from the web server and store it on the local database of the device(or this idea is wrong?). The problem is I don't know if the device can handle that large amount of data.
Second, if the above is possible, how can I make the application fetch the newly added data(the data that is added when the user is not connected to the internet) when the user has somewhat find an internet connection.
This problem is bothering me for many days already, hope you can help me with this one with your knowledge and ideas.
Click to expand...
Click to collapse
Your idea is correct and entirely feasible. You should use a local SQLite database to store information retrieved from the web server using JSON. I wouldn't worry about the space too much, SQLite databases are very compact, I have one for my schools app that has I think around 600-700 entries and it comes in at around 400KB so it shouldn't be an issue.
Thank you all for the comments.
Okay, so I've been surfing the web for a few weeks/months now but I can't seem to find any decent tutorial for my query.
With high hopes, can anyone show me how to do it on a single activity with at least 10 questions each?
I'm currently developing an M-Learning application. So aside for all the reading materials and somewhat simulations,
I need to present a quiz that will ask users at least 10 - 15 items per chapter.
I'll be presenting it on a graph as well for the user's profile. (But that's another issue I'd tackle later on)
Currently, all I have now was moving from one activity to another and vice versa.
Can anyone please guide me? I'd modify this if it doesn't clarify anything.
Please take interest. Am still a student though.
iamreverie said:
Okay, so I've been surfing the web for a few weeks/months now but I can't seem to find any decent tutorial for my query.
With high hopes, can anyone show me how to do it on a single activity with at least 10 questions each?
I'm currently developing an M-Learning application. So aside for all the reading materials and somewhat simulations,
I need to present a quiz that will ask users at least 10 - 15 items per chapter.
I'll be presenting it on a graph as well for the user's profile. (But that's another issue I'd tackle later on)
Currently, all I have now was moving from one activity to another and vice versa.
Can anyone please guide me? I'd modify this if it doesn't clarify anything.
Please take interest. Am still a student though.
Click to expand...
Click to collapse
Since you have a quiz app I'd recommend a swipe view with 4 radio buttons and a spinner with the chapter in the action bar or chapter list in the navigation drawer. Use 1 fragment and dynamically change the text for each fragment and inflate the swipe views. That way lesser resources.
Sent from my Moto G using XDA Free mobile app
Hi there once again.
I was able to pull off the Swipe View. However, I wanted to ask if this scenario is possible.
I wanted to build the quiz in a single activity only. Is this possible?
Button A ---> QuizActivity(Set1)
Button B ---> QuizActivity(Set2)
I want the quiz to happen on a single activity only but with different set of questions as triggered by different buttons.
Is this possible? And how will I pull this one.
Thanks.
So you want to have a set of buttons and depending on the button (category of questions) clicked you want to start a quiz of that category?
Simple answer to your question though is yes, u can have a quiz in a single activity if you wish.
Sent from my GT-I9300 using XDA Free mobile app