开发者

Store a set of dates and some content in android database and send sms on that date

开发者 https://www.devze.com 2023-04-13 02:08 出处:网络
everyone.I wanted to make an app for birthday reminder. I wanted to make the app such that we can store the person\'s details and set an advaned greeting time. Can anyone please mention 开发者_JS百科h

everyone.I wanted to make an app for birthday reminder. I wanted to make the app such that we can store the person's details and set an advaned greeting time. Can anyone please mention 开发者_JS百科how to store a set of dates and some content in android database and send sms automatically on that date? Thanks in advance


Since this question is pretty broad, I'll provide some references for what you're trying to do. If you get stuck on the specifics ask additional, more detailed questions.

For storing information Android uses Sqlite. Here is a great starting place: http://developer.android.com/guide/topics/data/data-storage.html

For triggering an event at a future date on Android, use the AlarmManager. Here is the documentation: http://developer.android.com/reference/android/app/AlarmManager.html

Here is a good tutorial on sending SMS messages from Android: http://mobiforge.com/developing/story/sms-messaging-android

Good luck.


You need to consider three things here: User interface to capture birthdate/greeting/custom date from the user.

Store the captured information.

Write a daemon process that runs at a given time and compares dates in the database with current date; once u get a resultset, send across text messages.

now that you know what exactly needs to do, you can start developing these components, one at a time.

Google search will fetch tons of articles on each of the three concepts mentioned above. Hope this helps!


You need to go through this steps

  1. Create a database and store your values to the table

  2. Append an Intent with each of your reminder to get you reminded for a specific task.In your case,it will work for sending your sms on a particular day. You need to use AlarmManager here.

  3. Create OneShotAlarm BroadcastReceiver to catch up the alarms you have set with reminders and code for sending sms there only,depending on the _id you have specified for setting intent of a record/reminder.

0

精彩评论

暂无评论...
验证码 换一张
取 消