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.
Related
My ionic angularjs corodova app works great when receiving calls from the demo web page on chrome. When I try to initiate a call to the demo site or another device, whether using demo API key or real api key, i get
call_crossing_detected
What does this mean, and how do you fix it?
More details on symptoms. When this occurs, no video comes up and the initiating device shows the error and the call button remains. But the receiving device switches to the hangup button, which then works. And if you speak into either device the receiving device receives the audio, but nothing on the initiating device
"call_crossing_detected" reason appears on hangup event when a call is already established between the two users and you are trying to establish a new one.
So I think you may have an issue on the first call hangup.
I have resolved this issue. It was caused by apiRTC.init executing more than once.
I'm building a voip app and will be using Android's incoming call UI. I've successfully registered a phoneAccount using the TelecomManager and managed to get addNewIncomingCall working.
The problem is that when the phone is locked I get the incoming call UI but NO actions to answer or dismiss the call.
In the other hand, if the phone is not locked I still get the incoming call UI but it DOES contain actions to answer or dismiss the call.
Any ideas as to what might be happening?
I can attach code if needed.
But basically I'm following this android's documentation:
https://developer.android.com/reference/android/telecom/TelecomManager.html
https://developer.android.com/reference/android/telecom/ConnectionService.html
There is a test implementation of these APIs in the AOSP repository. Take a look at how the TestConnectionService does things.
Be forewarned, the CTS test coverage for these APIs was not complete in M (or even N for that matter), so its possible that OEMs do not fully support them in their intended manner. Starting in O the CTS test coverage has been improved so OEM compatibility should improve.
I had posted a similar question
How to access sms's or call logs on devices with cordova apps
and based on that we have no permission to access call logs.
How does Truecaller access call logs or call events - on Android it shows who is calling and on iphone the number is detected by the app after call and then it shows who called.
Can we do the same for Cordova apps?
I did find a cordova-calllog-plugin to access device call history. Hope this should help, not tried personally though.
Also looking at the following link, i guess its definitely possible to acheive this in corodva apps
On Android I am using the android.util.Log to log within my application and during development I am using the adb logcat or Eclipse to see the logs - I use it even more then debugging...
On device I can save the logfile from my code or use some application form Android Market to save the logs - e.g. aLogCat.
Now can I do the same on the iPhone? I can use the NSLog(#"message");, but can I easily save the log file from my application and access it? Are there any ways for that?
Regards,
STeN
This is from NSFoundation reference
NSLog:
Simply calls NSLogv, passing it a variable number of arguments.
NSLogv:
Logs an error message to the Apple System Log facility (see man 3 asl). If the STDERR_FILENO file descriptor has been redirected away from the default or is going to a tty, it will also be written there. If you want to direct output elsewhere, you need to use a custom logging facility.
Thus, it is only a matter of redirecting the file-descriptor "stderr" (2) to a custom file, and you will get everything that you print using NSLog in that file.
This seems to be exactly what you want.
Note that if you want to get logs on console when you are connected to the debugger, you can wrap your code around this to avoid redirection in this case:
if (!isatty(STDERR_FILENO)) { // Not connected to any terminal
// your redirection code
}
You can access the console log from Organizer->Device->Your device->console.
If that is not powerful enough, consider using utilities like NSLogger.
The previous answers are good; also see this if you're inclined to making system calls.
I want to use C2DM in my android application. I am using code schemas shown in official tutorials. Everything seems to work fine, but I have problem with handling registration properly.
There are 2 methods in C2DMMessaging class which I have to use: firstly register() and next getRegistrationID(). If I use them sequentially, I get null form the getRegistrationID(). The problem is registration is asynchronous. In my application in the beginning I need to know the regidtrationId, I can start the rest of the app only after I get it.
I tried to do some synchronization using monitors (i.e. wait() in register method and notify() in C2DMReceiver.onRegistered()), but it didn't work (the code of onRegistered() hasn't been reached, after calling wait() in register()).
In other words what I need is making registration synchronous, so I could continue, only after I get registrationId. What is the right way to do it?
Make sure you are following below guidelines:
To develop and test on the Android Emulator, you need to download the Android 2.2 version of the Google APIs Add-On into your SDK.
Make sure you set android:minSdkVersion="8" in the manifest.
Make sure you have at least one Google account synced on your emulator or device.