Turn Off Sound and screen blink on incoming calls in Android? - android

I would like to know whether this is actually possible in Android?
When Android phone receives an incoming call from a specific number the phone's ringing should stop and also the screen should not blink. What I mean is the user should not be able to know that there was incoming call, but actually there was.
I do not want to delete any call logs, just to stop sound on incoming call from a specific number and that too at a specific time.
Can someone let me know if this is actually possible?

When Android phone receives an
incoming call from a specific number
the phone's ringing should stop and
also the screen should not blink. What
I mean is the user should not be able
to know that there was incoming call,
but actually there was.
Fortunately, this should not be possible from the SDK. You can be notified that a phone call comes in, but I do not believe you can stop the ringtone, and I am really sure you cannot stop the in-call screen from appearing.

Related

How to send dtmf tones from my application to outgoing call?

I have developed android application which call the other person on button click, but now i want to send dtmf tones from application to that outgoing call when ever i need. so how to do that?
Actually it's possible. It's not so obvious and not so elegant. But it works :)
In my project I requested permission for accessibility service. It gives me possibility to programmatically emulate clicks on the screen. Then I get the screen coordinates for the 'open keyboard' button and all number buttons which I need to press (tones which needed to be send).
Then it's super easy - catch income call with receiver, make small delay and then run sequence of emulated clicks.
Tada 🎉🎉🎉
In case someone need code - I can share it.
You can't send DTMF tones during an active call, but you can send them when you "program" them when you initiate the call. see the following post: https://stackoverflow.com/a/12986066/475472
Actually DTMF possible for key when call alive that time manual key touch and same will send to receiver.
we also check it on embedded gsm module and it will in receiving mode and DTMF enable and after calling when we press any key it will send to receiver side.

how to detect incoming Skype/Viber call

I am developing a music app and for that I need to detect incoming calls (Phone, Skype, Viber etc) in order to stop the playing song. I can detect GSM calls using PhoneState listener. Is there any way to detect data/VoIP (Skype, Viber) calls?
You shouldn't need to detect anything so specific, but rather manage audio focus correctly. Please see this guide on how to do that: https://developer.android.com/training/managing-audio/audio-focus.html

prevent screen to turn on when incoming call android

When Android phone receives an incoming call from a specific number the phone's ringing the screen should not blink. What I mean is the user should not be able to know that there was incoming call, but actually there was because i am blocking the incoming call through telephony manager but before ending call through telephony manager in broadcast receiver screen lights up that cause use in suspicion that something has happened.
Any help in this regard will be really appreciable.

android.intent.action.BOOT_COMPLETED - do not receive broadcast if boot completed by a phone call

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.

how can i play a sound when device receive an C2DM message

i have read for hours about how to start play a sound the way i want
but i cannot find an answer.
Here goes,
When device receive a C2DM push im displaying a Notification.
User can click the Notficationand my activity start.
Everything works grate.
Now I would like to create a phone-call-type of ring-sound
so it sounds like there's an incoming Voice call.
User pick up phone and notice my Notification presses it
and the sound stop playing.
Or even better, the C2DM message trigger my activity to start
with a phone-call-type of ring-sound.
When user touch the phone the sound stop playing
any help in any direction would be grate
Set the sound data member of your Notification to a Uri pointing to the ringtone you want to have played when the Notification is displayed. Ideally, you let the user pick their own ringtone (e.g., via a RingtonePreference) rather than forcing a certain ringtone on them.
Or even better, the C2DM message trigger my activity to start with a phone-call-type of ring-sound.
Popping up an activity like this, when the user might be in the middle of something else, is infrequently a good idea.

Categories

Resources