简体   繁体   中英

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:

  1. Is an SMS better for this? Or a push notification?

  2. 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 - ie 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: :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM