First time I am trying to do something with alarm/notifications in my app.
I have dates in my SQL Database and I want to trigger notification on all those dates.
People might find this as a duplicate, Sorry for that but all the questions I came across till now had half written code along . It was difficult to understand.
After referring so many questions and tuts now am confused from where to start with.
So, please can anyone help how should I move on from here. I have all the dates in table in the string format.
Simple
Provided that you know how to query these dates (if not please say so and i'll update my answer accordingly) you can do one of the following:
Add your events to the Google Calendar programmatically and allow the predefined Google account and its notifications preferences do the work for you (example on how is here).
Schedule you own alarm events and when these are called show your own UX (example for a lead to start from here).
Goodluck.
Related
I just want to start by saying I am doing this for a friend as a general information app and I am receiving no money for doing this. He would like an app to help inform his clients of different treatments as well as adding in daily memos etc. I can create an app no problem and have only created apps for general use and for my University assignments (I will also add that this is not a university project but just more to improve my own abilities). I am hoping someone may have a suggestion for how I can allow my friend to update the apps information easily. For example, I will be creating a general app that will display information (contact information, advice, guidelines, exercises etc) most of which will need updated every so often. He has also said he would like to add a daily update (almost like a daily tip or piece of advice). What I would really like help with, is for guidance on how I can have my friend maintain the app after I have done the project. I want an easy way for him to add/remove/edit memos or information. I haven't come across anything like this so I don't know if it is possible or if it is possible but complex etc. I hope I have explained the scenario well enough. Only looking guidelines of things I can research and do on my own, I just don't know where to start looking.
I'm very new to coding and have searched everywhere but havent been able to figure this one out.
Im trying to create a Lap Time Leader Board for various tracks in a video game guide. The user needs to be able to Click on the track name and then inside of the new layout "Create" a new time...that needs to allow him to imput the Car and the time it did on this track, then it needs to either sort itself or be manually sortable so that the times are in order from fastest to slowest. While i can build the layout easily i get stumped there.
How can i make it so that when the user clicks "Create New Time" the code gives him the spaces for time and car model.
How can i make sure it saves the correct info with SharedPreferences since each time will need to be saved differently (i think this has to do with the name and then ++ but i could be wrong)
How can i make it sort itself or be sortable for the user.
Can someone show me some sample code that does this? I dont know much of anything about SQL and would prefer not to use it if i can avoid it.
Im sorry this is such a noob set of questions but this after trying the notepad tutorial on AD and numerous video and book tutorials i havent found what i need to make this a reality.
You can always use a the Dialog class to create a pop up dialog to allow the user to input the information you are looking for. Sorry that you wish to not use SQL
Shared Preferences isn't such a good idea because you will have to do a lot more work to code your desired affect. A datatbase with simple Relations(tables) will suit your needs as opposed to Shared Preferences where you'd have to get creative to have the same data structure. Such as an ArrayList of BasicNameValuePairs, that could be a head ache. Database is the way to go, you can do everything you need if it's properly set up.
Sorting is quite easy in Java as you could always use the Collections class and implement the Comparable interface to compare your lap times to each other and sort them by total time. For a display such as that you would want to look into a TableLayout in Android XML. Don't worry so much about that, the Eclipse IDE will let you easily create and populate it. This would involve loading your laptimes from your database into a List and sorting them by time. It's a bit tricky but easy once you understand the Comparable interface and Collections if you need it.
If you need more insight post a comment, just wanted to share some ideas on how I would approach it.
I wanted to create a reminder app for my android. Actually I wanted to save reminders and the dates in the database and show the reimnder when the scheduled time is reached. Can anyone please suggest the code for this. Can alarms be given specific id at the time of saving and used to retrieve the specific reminder from database. I am new to android. Please help me.
Yes.. Your question is to broad for stackoverflow. But i would suggest you picking up a copy of Android For Dummies
This has a full tutorial of exactly what you are looking for.
You probably want to use Notifications in conjunction with the AlarmManager. There are lots of tutorials on the web that explain how to do this. Here is one: http://android.arnodenhond.com/tutorials/alarm-notification
I'm looking to make a new type app that when the user open it for the first time it will open up a pop-up menu that contains multiple check boxes that the user can select from and will then save their selections for later use. After the user selects their choices I would like to have a monthly based calender on this same screen that the user can select a date from and based on their selection this will then take them to a separate screen showing the news for that day.
I am fairly new to android app development and this will be my first go at it. I have read several books and websites but cannot seem to find the help I need to produce the code for the above desired functions. Any and all help with this will be much appreciated.
Read these tutorials and you'll be able to create just what you need
Tutorials
Your question is very vague in fact, so I will only suggest a few points to start reading from, that I believe are important.
I think that you will answer any other questions you may have by reading through the developer documents for Android and studying the supplied examples. But don't hesitate to ask another, more specific question if you run into trouble.
tl;dr
Activities (must read!)
Dialogs (you will need these)
Data Storage (also important for the app you describe)
If you're still lost, just get some sample code from the repository and toy with it.
Good luck!
im working on a simple Android app, it is much like any other simple Database app. I have 4 EditText fields where the user inputs 4 different small pieces of text. I want this text to be inserted in to my Database table in the corrects rows for my columns. I am not really sure how to go about doing this. I know onClickListener needs to be used but not sure how to use it.
What you are looking for is the glue to make it work, as you have a storage ( your database ) and the user interface. But, as you pointed out just right, your onClick actions, or more widely spoken, your whole user-interaction needs to be filled with action.
I won't give you a specific advice here as I think you should read a bit about the Model-View-Controller Pattern here, as well as about how Android handles all that stuff. A good entrypoint for gaining knowledge is, as always, Wikipedia.
Don't get me wrong, I don't mean to offend you by not answering the specific question: I just think it's more valuable for you to first learn the basics required for building great apps instead of reading a step-by-step manual!
On my phone right now, but you are correct about setting up an onClick method for, let's just say, a Submit button.
I would look at the Developers Guide on the SQLiteDatabase on ways to insert values by executing a SQL statement or check into using ContentValues to insert values when the button's pressed, both could help you out.
Also, with a fair share of knowledge on databases the Developer Guide should be all you need, but if you need further help search for related questions.
NOTE
A good practice is getting used to debugging your code using LogCat. It helps when things go astray, especially when working with databases.
Tne Notepad Tutorial in the Android Developer Documentation takes you through creating an application which stores data from fields in an SQLite database.
You could work through this, or if you didn't want to do that it would be a good source of sample code.