I want modify below screen according to my option.
I don't know how to access this screen.
and i need to modify this screen also
Please help me to do this.
You cannot modify default screen but instead of this you can launch your screen for that you need to use BroadCastReceiver for incoming calls
here is the link for getting phone state in broadcast receiver
http://www.tutorialforandroid.com/2009/01/get-phone-state-when-someone-is-calling_22.html
You have to write a broad cast receiver for incoming calls the Pratiks answer have the tutorial for that.Then simply make a pop up window over the default screen. you can call the pop up class from the broadcast receiver. hope you got it:)
Related
I want my app to listen for intends broadcasted by the call application, and when a call intend is broadcasted for a specific number I want to launch a dialog. I read that "A broadcast receiver may not display dialogs, and it is strongly discouraged to start an activity from within a broadcast receiver" https://developer.xamarin.com/guides/android/application_fundamentals/broadcast-receivers/ so I am assuming I should instead make the broadcast receiver launch a service that then launches a dialog. Can anyone confirm this? Also any simplified examples would be highly appreciated
Thanks!
In the example below, the app uses a BroadcastReceiver to detect a phone call number and decide whether it should answer or not:
How to reject incoming call programatically in android?
So using a BroadcastReceiver for that isn't that bad.
If you just want to show information about the phone call, you can display an Notification, as suggested by Jon Douglas in the comments. Displaying Dialogs from BroadcastReceivers isn't allowed (also disencouraged).
I am using a broadcast receiver in my app, to display a photo on BOOT_COMPLETED. However, I noticed that if I receive a phone call on my phone, the photo is displayed in front of incoming phone call activity, so I can's see who is calling me and what is worse - can't answer the phone.
What is the best way to override this behavior?
you could add another mechanism for listening to phone calls events, and if you detect that the phone is ringing (or the call was answered), you won't show the activity...
in any case, please don't show such things. no user likes popups go out of nowhere.
instead, use notifications to tell the user something has happened.
I want to design an app that will make the LED blink whenever a message or a phone call is received. I've read about broadcast receivers but I'm not sure how to work with them or where to start.
If anyone can put me in the direction where I can perform an action whenever phone rings? Maybe a small example or tutorial link would be nice.
Regards
Saeed
This should help with the broadcast receiver stuff: http://www.vogella.com/articles/AndroidBroadcastReceiver/article.html
This should help with LED stuff (half way down):
http://mobile.tutsplus.com/tutorials/android/android-vibrator/
I'm looking to write an android app that invokes a screen/activity after some one has entered the default android unlock pattern correctly.
I'm assuming that the best way to do this is run a service in the background that waits for this activity then on detecting this invokes an activity screen displaying the information?
Does that sound like a sensible way of doing things or is there a better way?
Also if anyone can point me at examples of this that would be amazing.
Cheers
Ric
Basically you need to register a BroadcastReceiver for the action ACTION_USER_PRESENT
ACTION_USER_PRESENT is fired after ACTION_SCREEN_ON, usually when the keyguard is gone.
So create a handler and wait for ACTION_USER_PRESENT. When you got it, implement what you want for your activity.
Create a broadcast receiver to recieve boot_complete action then create a service and start it from onRecieve of broadcastReceiver .
A good tutorial here
I have a program that has a broadcast receiver that listens for Phone_State and then sends a user defined intent.
Well, my problem is that the system also sends out an intent (the one that I am trying to replace with my program) .
So I am trying to find a way to CANCEL the systems intent.
I have found that if i have a timer just wait for a little bit, then I can send mine after the systems, but that is not very good, and sometimes defeats the purpose of my program.
Also, i cannot set my program as a default because it is not a full dialer program. Just one action of it.
Someone please help me find how to listen for and cancel a system intent/activity....
Someone please help me find how to
listen for and cancel a system
intent/activity
You cannot "cancel" an activity, period.
You cannot replace the dialer.
If the system Intent was sent via sendOrderedBroadcast(), then you can call abortBroadcast() from your BroadcastReceiver, and any lower-priority receivers will not get the broadcast. However, I have no evidence that ACTION_PHONE_STATE_CHANGED is an ordered broadcast, and I sincerely hope it isn't.
Whatever you are trying to do probably should be accomplished via modifications to your own custom firmware.