What is the use of current inspection profile in android studio? - android

I was working on a project in android studio and suddenly I found a man type logo
I hover my mouse on in for a second then it shows me
Current Inspection profile: Project default.
Click to configure highlightening for the file.
When i clicked on this button it shows me
Now I want to know what is the use of this option or is this is important or not?
It may can be stupid question but I asked this question just to increase my own knowledge becuse this option seems bit important
Thanks In advance!
Happy Coding!

This has little to do with code inspection, but one can only define what is being highlighted. One could call it the visual representation of the inspection results, as it clearly read "highlighting level". This option only is of use, when you have to work with an old crappy computer, but rather irrelevant on current hardware.

As the name suggest, it inspects your code for issues, errors, incompatibility etc. and may recommends better options. If your system is low on resources (RAM, Battery, CPU) you can select None and also you can choose the PowerSave mode.

Related

How to use DDMS within Android Studio?

I'm trying to see the contents of a database I'm using through the execution of my program via DDMS. I've looked at lot of questions on here that explain how it's done. My understanding relies on the fact that on clicking Tools--> Android--> Android Device Monitor, there is a change in perspective however nothing of the sort happens when I do the above. In fact, there seems to be no indication at all, that I selected the Android Device Monitor. Could someone please point me in the right direction of finding out what could be wrong?
Going off what #will421 said in the comments, I ran monitor.bat and the typed out monitor in the console (Both needed to be done.) and then I was prompted to enter my sdk path. What tripped me up was the fact that I had two folders labelled sdk and sdk1 so choosing the right one is important. To view the contents of the dtatabase, I just followed along with the great answer at View contents of database file in Android Studio

Show "All Instances" missing in eclipse debug view

few days ago, when I was debugging an Android project under eclipse I've found some great functionality: "All instances..." and "Instance count". I wanted to share my findings with rest of my colleagues, but none of them had this functionality in their eclipse install (we all use eclipse 3.7).
What's even more weird now I'm also missing this functionality.
As far as I can tell this functionality is build within eclipse from version 3.3 and available to projects using Java 1.6 and above as mentioned here and here (we're using 1.6).
See bottom of this link to see what functionality I'm talking about. It even has it's own shortcut in options (ctrl+shift+n) so I think there must be a way to use it again.
I was looking for it while debugging and while the debugger was in "stopped" state.
Anyone can help me put eclipse in right view/perspective/state to see this functionality again?
EDIT
Here is the documentation entry from eclipse help page: link
Thanks for any suggestions,
kajman
After some more digging I came to following conclusion:
DalvikVM does not support "instance retrieval".
On eclipse help page mentioned in EDIT section it written:
This command is only available if the Java virtual machine you are currently using supports instance retrieval.
Maybe there is an option to enable this option in DalvikVM, but I doubt it unfortunately.
Also when debugging on phone "Drop to frame" functionality is missing.

Performace Analysis for Android App.

I'm a Computer Science student and I'm working on an Android app. for my final year project.
This is a rule in my college to perform some sort of performance analysis in every project that we do.
And this is the point where I got stuck.
Can anyone tell me what sort of performance-analysis I can do in my Project?
[Please do explain on how that should be performed.]
If you have your project in Eclipse, you can open the DDMS perspective. There, you will be able to profile the app, and get a feel for how long each method is taking / what takes the longest.
It's pretty easy. Once in the DDMS perspective, make sure the app is running, click the device it is running on, and then find the icon above the devices for 'start profiling'. When you are done, click the stop profiling icon, and eclipse will present you with some nifty graphs that you can zoom into.
This is far too broad of a question for SO (and in my opinion to be given out as an assignment) If that is seriously all the direction you were given "preformance analysis" then I would go ask your professor to elaborate some more.
in the mean time here are a few links that may be relavent:
http://www.flurry.com/
http://code.google.com/apis/analytics/docs/mobile/android.html
If your app is to be published on the market, the Developer console provides quite a few different statistics related to installs over time and versions and such.
see here for more info: http://android-developers.blogspot.com/2012/02/new-app-stats-for-publishers-on-android.html

Android non-Eclipse command line projects viable?

Let's say that I'm doing an Android project at the office, and that it is not just a hobby project, and that it is actually intended to be released and mass distributed. Would there be anything crippling about using the Android command line tools to manage the project, and just ignoring Eclipse? They describe here how to manage projects on the command line:
http://developer.android.com/guide/developing/projects/projects-cmdline.html
However, I can't get a feel for if those tools are production quality or not. Basically, I'm afraid that if I use the command line tools then somewhere down the line I'll have to do task "X", only to find out that task "X" is basically impossible or insanely difficult without Eclipse. Are there any such task X's? Or are the Android command line project tools actually viable for commercial projects?
I already know that you won't have a GUI designer, but I'm not that crazy about the GUI designer in Eclipse anyway. I constantly find myself pressing "Run Project" to debug my GUIs on the actual device anyway (layout preview be damned).
As for debugging, for the limited amount of debugging I do command line jdb is adequate, even if not always completely pleasant. And I bet I could set up a GUI debugger if I really had to.
The question is, are there any problems that would be considered effectively insurmountable without Eclipse? Or are there just minor annoyances that can be easily worked around (like the two I just mentioned above).
I realize that stack overflow isn't meant for discussion questions, and this question might seem like just that, but I think it doesn't have to be. If there really is something gigantically terrible about not using Eclipse, someone will mention it, and I'll give them the green check mark. If there isn't, then perhaps someone can point me to examples of existing large projects that use the command line tools instead of Eclipse, and I'll give that the green check mark instead.
Many people use Ant to build Android projects from the command line. Actually, in my opinion this is the preferred way, since it allows you to check everything that you need into a source control system and get predictable and repeatable builds every time.
So, the answer is "Yes"! Take a look at Using Ant to Automate Building Android article for more in-depth explanation how you manage this. Of course, using Eclipse is very convenient, but you don't really need it to build Android applications.
I use Maven for all of mine. See android-maven-plugin.

How to get debugging statements for Android in Eclipse

I've read the lame documentation, and checked other answers. I'd like my Android app to print some debug statements in the logcat window of Eclispe. If I use the isLoggable method on the various types of debug levels on the Log class, I find that WARN and INFO are returning true.
Log.w, and Log.i do not produce any output. Does anyone know which gotchas I've missed?
And just to vent, why should this be hard? I've published apps for iphone and bberry and while appreciate the use of java, the platform is reeking of too many "genuiuses" being involved. I suppose Activities and Intents are very flexible, but why? I just want to put up some screens, take some input and show some results. The bberry pushscreen and popscreen is a lot less pretentious.
Thanks,
Gerry
The problem with debugging with Android in Eclipse is that from Eclipse's point of view, you're debugging the emulator and not your specific app. The emulator isn't crashing, so there aren't any logs to show. What you need to use is LogCat, Android's debugging plug-in. See this answer for details on how to bring that up.
It is not clear to me what the problem is. I use "Log.d(TAG, "special message");" all the time in Eclipse in Android code running in the emulator. Since you say "Log.w" gives no output, I assume you already know about the need to import android.util.Log. Otherwise you would not have got even that far.
The only other thing I can think of is for you to check your Eclipse Preferences under Window>Preferences>Android>DDMS (DDMS is needed for Logcat). Make sure the timeout is reasonable (mine defaulted to 5000mS). Make sure the base local debugger port is open, too.

Categories

Resources