Odbiór SMS-a
Odbiór sms-a jest koncepcyjnie trudny, bo nasza aplikacja nie musi wtedy byc uruchomiona.
Do tego zadania trzeba utworzyć Broadcast Receiver, który będzie filtrował przychodzące smsy, a jak trafi na odpowiedni wzorzec, to uruchomi MeetingMill (na razie, potem dodamy bajery). Powodzenia.
Broadcast receivers
A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to the device and is available for them to use. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.
A broadcast receiver is implemented as a subclass of BroadcastReceiver and each broadcast is delivered as an Intent object. For more information, see the BroadcastReceiver class.
Dobry przykład istnieje dla aplikacji demo
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/SmsMessageReceiver.html
Do tego zadania trzeba utworzyć Broadcast Receiver, który będzie filtrował przychodzące smsy, a jak trafi na odpowiedni wzorzec, to uruchomi MeetingMill (na razie, potem dodamy bajery). Powodzenia.
Broadcast receivers
A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to the device and is available for them to use. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.
A broadcast receiver is implemented as a subclass of BroadcastReceiver and each broadcast is delivered as an Intent object. For more information, see the BroadcastReceiver class.
Dobry przykład istnieje dla aplikacji demo
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/SmsMessageReceiver.html
Leave a comment