I made app that call automatically on given number, code below. Now I want to disconnect that call for after f.g 10 sec. It is possible if yes how to do it?
android_intent.Intent()
..setAction(android_action.Action.ACTION_CALL)
..setData(Uri(scheme: "tel", path: _controllerPhone.text))
..startActivity().catchError((e) => print(e));
Since the call application is a different application than your application, you can not intervene. Of course, you could do this very easily if you were making a call directly in your application.
Related
This is primarily for my Work place so having an app running all the time is not an issue.
The question How do i attach a hook to activate the App or background process when a call is made, and can it retrieve the phone number?
All the App has to do is send a request with the phone number to a server in-house
The reason for the question:
I am toying with the idea of creating a Support Service module which can give the Service worker a better grasp of the problem at hand.
Consider this:
Customer calls the company's support line
Service worker picks up phone
The computer looks up the Customers phone number on the Company's database and gives the Service Worker every detail they have on the customer ( Issues created, Website, Basic Info )
The biggest problem i can see is how do i Catch the number coming from the phone?
Looking up a customer via their phone number is not the issue.
Alternatively the Service worker will have to manually enter the phone number, but would be a nice feature to do it automatically.
Yes, You will need a BroadcastReceiver and have to override
#Override
protected void onIncomingCallReceived(Context ctx, String number, Date start)
{
//
}
Also insert permissions in Manifest.xml . If you want compatibility over oreo use runtime permissions for those permissions
I am currently developing an application that will use Metawear device.
I have noticed that after I connect a device, I can read the live accelerometer values of that device but I want to read/download offline accelerometer values.
For that as per I refer https://gist.github.com/mbientlab/a299fc705f8ac3b64359 , I need to set Trigger.
But when I am setting triggers and if I did not remove that trigger then next time Metawear device unable to detect/scan by my device(Suppose an android mobile).
If device totally discharges and starts again then it resets.
So is there any method to remove that trigger without connecting to the device or reset the device
Thanx in advance
Use the removeAllTriggers method to remove all logging triggers. Line 100 of the aforementioned gist demonstrates trigger removal with the removeTrigger method
I want to use asterisk server for SIP/VOIP calls from/to android app. I searched for good Sip client and found CSip simple is good.
Suppose there are 2 users A and B.
when A wants to call to B,
A sends request to internal server
Internal server will check if A can call B or not by populating some database value
If yes, Server will ask B if it wants to accept call from A
If yes, server will setup call between A and B
How i should configure these things in asterisk to achieve this and also like to know that if CSipSimple will be best for android?
If i am wrong anywhere please correct me.
Thanks
CSipSimple will be best for android.
For asterisk i try to solve your problem. Try below configuration to make call.
Suppose there are 2 users A and B.
A user server
Modified A server extension.conf
[my_outgoing]
//exten => _X.,1,Dial(SIP/${EXTEN})
exten => _X.,1,AGI(test.php)
// test.php is check for balance of A and if A having enough balance then it will call B from this file it self
Modified A server sip.conf
[2221]
username=2221
type=friend
secret=2221
host=dynamic
context=my_outgoing
Modified B server extension.conf
[my_incoming]
//exten => _X.,1,Answer()
exten => _X.,1,AGI(test2.php)
// Here test2.php is for run IVR from script and give user for press 1 or 2 to accept and reject the call etc...
// if you are using the real device or soft phone then it will handle the call option by it self
// If you have to handle this using script then code to handle call written into this
// And if GUI [from soft phone] is there to handle call then write bellow line only
exten => _X.,1,Dial(SIP/${EXTEN})
Modified B server sip.conf
[2222]
username=2222
type=friend
secret=2222
host=dynamic
context=default
Now try to register both user from different device and try to make call.
Call from A(2221) to B(2222)
I have installed an app on AVD (emulator) Android.
Is there a way to get to know the api calls(functions calls) made by the app when I
play around with it on the AVD(emulator).
Is there a way I can log/capture all the api calls (function calls) made by the app as I interact with it.
Is anybody aware of the tool that captures the flow of the application in terms of api calls(function calls).
For example if there is a messing app, then typical operations would be
[1] launch app
[2] write message
[3] send message
so I want to capture the api calls corresponding to when [1] i.e when the
app is launched.
then log/capture api calls when [2] i.e write message. finally what api calls were made
when I do [3] i.e hit send button.
You can capture all the activity launched by the app in command prompt via :
adb logcat | grep "ActivityManager"
Probably too late to answer, but I use stetho and it's working great. You can also look into preference values directly from here.
If you are referring to an App you wrote, you can use the Log class to log messages to logcat.
You can also use the Trace tool to see what's going on in your device and infere the api calls.
Is there any possibility to make phone calls without using the default phone app with intents?
It's not easy. You can start learning the source code from com.android.phone.PhoneGlobals, and read all relevant source code in com.android.internal.telephony and com.android.phone