I want to create an application in which
– Create a listener which listens for outgoing/incoming messages and calls
– UI is shown/hide based on listener results
I want to create an application in which – Create a listener which listens
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.
Shrini,
As dds stated, you will definitely need at least two
BroadcastReceivers. You will need oneBroadcastReceiverfor each incoming call and message that you want to respond to, and one for each outgoing one as well. ABroadcastReceivermay only capture oneBroadcastMessageat a time. You will specifically need to capture theIntents sent by the operating system and yourApplicationwill need to have the appropriatePermissions for each. That’s just setting up the listeners.Once the
BroadcastReceiverhas been called you will need to start anActivityfor you UI and possibly aServiceto do any other processing. In the cases of single-point events (like messages) anActivityis often enough. Calls, however, depend largely upon what you are doing. Since a call has two distinct events, in order to tie them together, many people prefer to use aServicejust to hold and watch the call.In order to best help you, I must inform you that your question is remarkably vague as to what you need to do. Does your custom UI display information about the calls? Does it allow the User to respond or change that information? What kind of messages is your app responding to? SMS? Email? IMs? These are important because each one has different considerations.
Given that the limitation of information provided here, I would recommend researching your topic by downloading and viewing some of the open source projects stored on Google. Here is a Here.
Fuzzical Logic