Android Log - print link to line of code in c++ file - android

If you print in log (fileName:lineNumber) you get a nice link in Android Monitor that gets you to that code line when you click on it. This however does not seem to work for my cpp files. Is there a way to achieve this for c++ files?
Edit
I already know how to create string (fileName:lineNumber), but when it is printed in Android Monitor it is not a clickable link. The question is how to make clickable.

To appear as a clickable link in the Android studio Logcat window, (filename.cpp:filenumber) should be associated at least with one file that is part of your AS project:
You can see that some system logs are resolved to clickable links, while the others are not.
In the example above, Socket.java is part of public API, while PlaneSocketImpl.java is not, therefore AS does not show a link for the latter.

Related

android app particular java file used

How can i know which java file is used at the current time at that current interface. I know we can do this with a logcat when we know the source code , we can make everything log.i and stuff. but what happens when we don't know the source code or while assessing a black box android app
If you don't have access to the files how you supposed to know which file you are getting?
The best way to achieve what you want is to use a decompiler in your APK and do a debug.
http://www.decompileandroid.com/

Firefox for Android: can't modify anything on about:config

TLDR: firefox for android does not show expected about:config screen.
Firefox: 39.0
Phone: Nexus 5
I am trying to install and configure an extension on firefox for Android.
I've been following these instructions, which work fine until I have to alter the filepath in about:config.
At this stage, I need to modify the settings to show firefox where a certain .txt file is. I can easily find the setting I wish to modify, but cannot find a way modify it.
The expected menu (with Modify) never shows up, and instead the only options I can get are "copy name" and "copy value".
Images of the expected interface, and actual interface:
Expected interface (from walk-through):
Actual interface (screenshot):
After searching, trying to find the modify option:
Eventually, with a lot of trial and error, got it fixed. The about:config interface has changed since the guide I was following was pasted, but it ended up being a very good step by step anyway.
Solution:
The new interface has an area where there is nothing written, which you need to over-write with the desired path (in my case it ended up being /storage/sdcard0/silent_block_directory).
Two pieces of advice to avoid making the same mistakes as I did:
1. Don't point the path at the .txt file, but rather at the parent directory
2. Don't look for the modify button, it does not exist any more.

Modifying Android source code

I am absolutely new to Android. As a research curricular project, I want to make some changes in Android's activity manager's source code. I have downloaded the source code from here and built it for emulator. Now, to start with, I want to do some very simple things e.g. adding print statements to the module that I want to modify. This is just to make sure that my changes are actually showing effect. But how can I
See the changes I made. In this case, where can I see words/sentences printed by my print statements?
Even if I make such small change, do I need to build entire code base again using "make" command? Cant I just compile that particular class or file? I tried "mmm" and "mm" but they dont seem to be working. One says "nothing to build" even if I introduce syntax error and other says "no android.mk file found"
Can I add my own method to the ActivityManager class?
Thank you...

What does this Eclipse error mean about my Android app?

I am using Eclipse to write my Android app and I keep getting this error when running it. I have no idea what the error means or how to go about debugging.
I should add that this all started when I wrote a method to parse an XML file. Before I wrote that, the app worked fine. I tried adding some try/catch block that contain "log.e" statements, but I don't see anything strange in the log.
Does anyone have any idea?
The error message is in the screen shot below:
It means you don't have the source files of the Android code in you eclipse workspace. check
Android source
By default you only have the compiled class files in you android.jar. if you want to see the source(*.java files) you need to add them yourself. So, you have no source files at all by default
I have had this error come up before for a lot of reasons. Almost always it is because I tried to refer to a resource that either is not there, or is incorrectly formatted. Seeing as how this started when you worked with one of your XML files I would check there for incorrect formatting.
Although this error is referring to the fact that you do not have the full android source code, having it will not fix the error, it will only allow you to see where the source code is failing either to find or open your XML file.

Problem in Pocketsphinx demo on Android

I try to download and run the offline voice recognization demo from this link - http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/ . I m successfully install and run this demo project on device, but when i push and hold the button and when i release the button, it try to convert into text. The textfield "Your text goes here" becomes empty but it is not displaying the any result, i.e. Text of What we speak.
Please any one who run this demo successfully, help me with better suggestion.
Thanks in advance.
In my experience, the text field stays blank when there is some error in the configuration for the native pocket sphinx code. Any errors encountered by PocketSphinx should be printed to the log file. Figure out where your PocketSphinx log file is; it is set using the setLogfile(String path) function. One of the things that happens to me quite often is a mismatch between the words in the dictionary and the words in the language model/grammar. Since you probably haven't edited those, I'd say it could be a wrong path to one of them. The log file will tell you about anything that couldn't be loaded.

Categories

Resources