-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding new Questions #53
Comments
The challenges.bpc is loaded to the database only once when the app is loaded. What you could do is store the challenges version somewhere in the App and then import only the new ones in app start. You could then use the FileImport class in de.fhdw.ergoholics.brainphaser.logic.fileimport to load your incremental changes. You'd also need to patch ProxyActivity to do this. What you can also do is allow your users to download the new challenges as bpc file. (For example on your website). bpc files are automatically associated with the app so users could import new challenges by downloading and opening the file. A PR to allow for updating automatically would be very welcome! This was something we didn't consider when coding the app. |
I am a new developer and my abilities are limited in terms of doing a PR. In any case, when allowing users to download a new challenges as a bpc file, I get duplicates of each category. I'm trying to look for the simplest way in which I could add new questions via an update. Any ideas on how I could achieve this based upon my limited skill set? Perhaps their is a way to clear the loaded database upon new version launch |
You'd have to give them only the added questions in the bpc. I agree it's not a very good solution. I believe what I posted above would be the most simple way (but it does require a bit of implementation). You could clear the database but that would also mean clearing all of their progress on updates. If you want to give it a shot and get stuck anywhere i'm always here to help as well 😄 |
Thanks Kamshak for the help. If you would like to see the project that I made by forking your application, it's on my GitHub profile. I wouldn't have been able to do anything without your help. In terms of implementing this, I will try and do more research regarding this matter.( Perhaps on Stack Overflow.) In the mean time, I tell the users to clear the app data via a push notification until I can figure out how to implement what was stated above lol Thank you for your constant help and advice |
Would this work? (Referring to the accepted answer) I am assuming that I would put it in the DataBaseModule.Java. Any ideas? |
You could do this but it will remove all user progress. For that you'd just need to change the number in https://github.com/Kamshak/BrainPhaser/blob/master/brainphaserdaogenerator/src/main/java/de/fhdw/ergoholics/brainphasergenerator/BrainphaserDaoGenerator.java#L14 |
In other words, if I were to pursue this route, I would periodically change this number with each subsequent addition of questions and app version? It will remove all user progress however it would show all questions. Correct? |
Yep that's correct. Just thought of another way: You could use the DB migration to run your question migrations as well and change the DB version whenever you add questions. There is some information here: http://stackoverflow.com/questions/13373170/greendao-schema-update-and-data-migration basically you'd need to subclass DaoMaster.OpenHelper and provide a custom onUpgrade method. In that method you could use FileImport to import the new questions via BPC. (You'd have a BPC for app install, and then each time you add questions a new BPC with only the added questions) |
hi, i am new in Android. I would like to know where I can modify the path where the database is stored on my device. |
@kamshak How to disable the no challenges due after users has completed all the quiz? I would like to let users to repeat doing the quiz. |
@zfc0812 the way it works at the moment is by spaced repetition, they'll get asked the questions again after a specified period of time (you can set it in the app settings) |
How can I use images in the multiple choice question rather than text. display images in the options. |
@farhannaseer88 please see #56 |
When adding new questions to the challenges.bpc and submitting an update to the play store, it does not show the new questions for the user. I had to go into my app settings and clear the data. Only then did it show the new questions. Is there someway to show the new questions without having to do this? Also for some reason Import doesn't show in the production version of the app in the play store but when I run it in the emulator it does
The text was updated successfully, but these errors were encountered: