Is there a way to make a call from my application, but keep my activity in focus? ACTION_CALL shows the call screen, but I want to show my screen instead, with my own control to end the call. Is this possible? e.g. is there a service that does the actual phone call?
I basically want to allow the user to call another user, while still interacting with my app.
You can not change or customize the call screen unless you are building your own ROM
That is not possible from an SDK application...
You can try to design your application so that it works with a backgroud service so that you achieve your goals
Related
I wonder if it is possible to build an application for Android that waits for incoming calls and only allows the ones that are in an internal white list to show and make sound.
I know this is what a normal call blocker would do and I know that it is possible..however what I really want is:
If a call arrives that is not in the white list, I don't want to reject it, I don't want the caller to know the call was rejected. I just want my app to be aware of it but make it invisible to the current phone app. I could mute the phone and the call wouldn't ring but the phone app would still popup in front of everything or at least on the status bar.
If a call arrives and it is in the white list then the app would do nothing..just allow the phone app to treat it.
I think I can do this by implementing my own dialer app, but would much prefer not having to do that and just use whatever the user already has.
Thank you
Carlos
Is it possible for a 3rd party Android application on an device that is not rooted, to somehow make an outgoing phone-call, without launching the dialer ? What I mean is that my own Activity (displaying some information, image or video) keeps running in foreground, while the phone-call progresses in the background. Clearly, my Activity needs to be aware of call-state changes (i.e. when call is terminated). My own Activity (not the dialer), would have the "Call" / "Hang-up" buttons.
If possible, kindly share some pointers and hints as to how this could be done. If this is possible via the ITelephony (or other such) reflection based API, even if it is undocumented and hack-based method -- I would like to know about it.
So far in my research, I've come to know of only the method where you place the call directly to a number, without having to open up the Dialer first. However during the phone call, the Dialer application's Activity is open. I cannot show any other information on the foreground. Any alternative workaround, s.a. using Dialog overlay etc., might work as worst-case fallback, though I am not sure if there is anyway to show any "active" content (s.a. images that change, or video) in a Dialog.
Finally, can Fragments be a solution ? Can I show the DialerApplication activity in a Fragment ? I don't think so, but wonder if there's any hack possible for it ?
1) Is it possible for a 3rd party Android application on an device that
is not rooted, to somehow make an outgoing phone-call, without
launching the dialer ? What I mean is that my own Activity
(displaying some information, image or video) keeps running in
foreground, while the phone-call progresses in the background?
Ans.
It is not possible to keep our application foreground during phone call because the phone call is a system app and has highest priority.
2) Clearly, my Activity needs to be aware of call-state changes (i.e.
when call is terminated). My own Activity (not the dialer), would
have the "Call" / "Hang-up" buttons.
Ans.
Yes this is possible to get notify on call-state changes.
Look at here
I want to initiate and manage a call from android, without any interaction with the default dialer. The call should automatically be initiated from the application, and the application should be able to send DTMF tones programatically, and also terminate the call programatically. The dialer should never come to foreground during this process.
I have seen many examples of initiating the call with an intent. Unfortunately, the call will be passed on to the dialer and the dialer will take control from then on.
Here is one such example.
Android: calling number without user init?
Is this possible? If not, it would help if you can point me to the documentation.
i just want to know how can i detect if the user opens an app so an activity of mine launches as well.
For example, the user opens the sms app and right after a kind of lockscreen appears.
You can create a service which will run int the background and you can use this API to determine which activity is visible. That's how many app lock works.
As far as I understand the Android system, it is not possible unless you are making a custom firmware.
Is there a way to use default incoming call screen with its functionality (answer and reject) from inside my application.
I want to make fake call from inside my application and i don't want to create custom incoming screen but use default incoming call screen on device because different devices have different incoming screens.
No, this can't be done using the standard SDK. First, the call screen activity can only be launched by the system. Second, vendor-specific skins of Android often replace the default phone app with a custom one, so it's unlikely you'd be able to do this on all devices with just a single piece of code even if it were possible.
Your best bet would be to try to recreate the incoming call screen for the most popular devices and detect which device the user is running, which I know isn't what you wanted to hear. Sorry.