I've an app that i need to sort out.
The problem is with the timer that needs to update the fields on daily basis.
The data needs to be pulled from Excel file and stored in and then displayed according to the date of the file.
Please find the link to the picture which gives you an idea of what i am trying to do.
If someone could help me please feel free. I have already asked the question in depth and just need this part for the timer maybe if someone can do that then i might try that and then see if it works if not then maybe need the whole app to be fixed?
[Picture of the App][1]
many thanks for your time in advance.
Related
Click here to see a screenshot of the assignment
Here is how the Navigation.csv looks like, where I take data from
https://pastebin.com/JXnaRTzi <-- Click on the link for code - this is my code so far, I am reading the file and making objects from each entry
Guys I need help with this assignment. I chose to do it in Java, but really it doesn't matter. I need advise and help for making the right approach on this kind of problem so it can work on a larger file. What kind of data structures should I use and maybe if it's no bother, give me a solution. I am a new developer and I'm trying to get into backend and frankly I'm a bit lost.
Click on links above to see the task details.
I am trying to figure out how to tie all the questions together and get a correct final score 10/10 or 11/10 for getting the bonus question correct. I am sure I am overthinking it but I am genuinely stuck and will appreciate any help that I receive.
I am a complete beginner at Java and trying to figure out how to go about this and I am sure my code can definitely be simplified and I have complicated it very much.
One simple solution will be to use a SharedPref variable. Update the SharedPref every time user answers a question.
Another method will be to have a global variable inside your application class and update that.
Recently,we built a similar thing.
The way we did was to use SqLite .
We had a list of questions and each question with 4 options stored inside the app in a database .
Later , upon answering of each question we check the correct option and update the score of the user it it's the correct option (Boolean).
Finally we calculate the total no of true values against the member I'd.
Trying to make an app in android studio that works as a fitness helper/tracker. On a daily basis and multiple times a day, the user enters data regarding their diet/exercise. Prior to doing so, the user selects which day they're currently on, making the data they input specific to the chosen date. I want to give users the ability to retrieve any available data for a specific day on demand.
I don't quite think sharedPreferences would work, so I was thinking about just saving to internal storage as a text file. The problem is that 1) with all the different files that would be created for even a single day, I feel that it would get messy and 2) I'm not sure how how to retrieve the specific file I'd need, parse it, then output the parsed data graphically if I'm only using a single constructor to make each text file.
I haven't yet delved deeply into using a SQLite DB, it seemed somewhat excessive for this, so I'm hoping someone can either help me figure out a better way to solve the problem or enlighten me as to a more efficient method.
Thanks in advance!
I have just started creating a project for my college and i need to make an android app. The idea is that the user will read a story to others and they have to find whats the right answer. Also at the same time when the user hits the story that he wants a timer shows up and counts the time passing. When the answer is correct the timer will stop and depending on it a message will pop up and will tell him whats his possition on the ladder. So i would like to know how its possible to save that time, store it in a database and compare it with the rest of them. I have to inform u that i have just started learning java but i have some previous experience with c and c++. I would like to thank all of u in advance and it will be very usefull if u can guide me to the right direction.
I currently have an Android application that displays a schedule for a ferry boat. The application can display the full schedule (just a giant list), but the selling point in the application is it will display when the next two ferries are departing and how long from the current time that departure is.
I am relatively new to Java and currently use large Switch() statements in my code. Basically it gets the current phone time and compares it to all of the times in the schedule at which point it displays the next two departure times and then calculates the difference between current time and the departure times.
I am sure that a switch statement is not the best idea for speed purposes as well as code changing purposes. For example if one time changes its a bunch of lines of code to go in and fix for that one time change. Also if the entire schedule changes everyone has to update their app for the time change to take effect. My ideal situation would be to store a file somewhere on my webserver that could be downloaded and inserted into a hashmap (I think is the correct term) that would load the new schedule if there was a time change.
Not sure how confusing this is, but it would be greatly appreciated if someone could explain how I might use a hashmap or something else you might recommend to get this task accomplished. Currently the variables are the two ferry terminals as well as the day of the week since the schedule changes per day (monday, tues-friday, saturday, sunday).
Below is a screenshot of the application so you can understand it if my post wasn't clear. Thank you in advance.
Screenshot:
Store the schedule objects in a sorted array. You can then binary search the array for the first value greater than the current time. You'll probably use some parent array consisting of the location and applicable day of the week.
You can easily write that kind of data structure to a file that is read & parsed by the application for updates instead of being compiled into the code.
Details of this? First, understand resources in Android. If no updated schedule exists, fall back to the default resource.
Second, use an HTTP head request to check if a newer file exists. If it does, parse, download & save state. Saving Android Activity state using Save Instance State.
Finally, XML is handy for data distribution, even if it's not fast. Everybody understands it and it's easy to update or hand off.
<ferry location=0 time=2045>
<day>1</day>
<day>2</day>
<day>3</day>
<day>4</day>
<day>5</day>
</ferry>
<ferry location=0 time=0800>
<day>6</day>
</ferry>
You will need something like a database to hold the schedule data. That will help you to seperate code from data. I'm not familiar with Android but i think there is a interface to sqlite database on the device.
Further, as this is an application on a small device you may connect to the schedule database on a server thru the internet connection. That way you have to maintain schedule data only in one place (on the server) and clients will use always up to date data.