Android SMS alarm manager issues
I'm currently 开发者_如何转开发working on an app that will tell students when their classes start with a simple notification/SMS even when the application/phone is off.
My first question:
Is an SMS better for this? Or a push notification?
I've looked at several tutorials for the alarm manager class and how to implement with an SMS message, but none have helped. I find myself getting confused as to where the alarm manager class instance should go. I'm looking for a complete guide to alarm manager + SMS/notification tutorial.
Any help is greatly appreciated. I've had problems with this for a looooooooooong time. If you want to find my source code it's at http://code.google.com/a/eclipselabs.org/p/mtsu-andriod/source/browse/#svn%2Ftrunk%2F%20mtsu-andriod%20--username%20craigmurphy88%40gmail.com%2FMTSU%20Android
SMS is very uncomfortable as data protocol. Use some other solution - i.e consider amazon web services SNS or SQS
If you are stack with SMS you should not use AlarmManager (in my opinion it should be called "SchedulerManager" due to it's functionality) but just write BroadcastReciever
able to receive android.provider.Telephony.SMS_RECEIVED
intenet. Main problem is, that there is standard, messaging app and it will be called also on SMS arrival.
Here, you'll find example of handling incoming message.
I have no idea why do you want to use AlarmManager - I assume, that you want to write something like "alarm clock". Here you'll find my answer to similar question.
I was able to do exactly what I needed with android notifications. All thats left for me now is integrating the alarm manager with it! :)
精彩评论