Is there any way to send SMS programmatically on scheduled time ? Without checking current time in every second.
Is there any way to send SMS programmatically on scheduled time ? Without checking
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the Android Timer class’ schedule method to schedule the sms to be sent using something like the following in the run() method of the scheduled TimerTask:
For a formatted date string, to get the
whenargument of theschedule()function, use theSimpleDateFormatclass’parse() method. If your date string is “12/31/2013-12:12”, then you can get the date object using:Other options for the SimpleDateFormat are here.