Sunday, December 30, 2012

Useful Tips For Using Google Nexus 7 Tablet - Reported Common problems with Nexus 7

Some of the features of Google Nexus 7 tablet are not very intuitive at least when you first time start using it. Following are some tips to get started using the brand new Google Nexus 7 table.

How To Start the Camera in Google Nexus 7 Tablet

The nexus 7 tablet does not provide an icon or a shortcut to launch its front camera. The camera starts when you actually use Google Hangouts etc. So in order to launch the Camera, you require an android developed exclusively to launch the nexus 7 front Camera. In Google Play, just search for the app "Nexus 7 Camera Starter" and install the same and there you go with Nexus 7 camera. Though its low resolution one, the picture and video qualities look just fine on Nexus 7.

How to turn on the Auto-Rotate of Nexus 7 Screen for playing widescreen videos.

When you buy brand new Nexus 7, by default the screen rotation feature is turned off, so the tablet does not play your videos in full screen, to turn on this, from left top corner, scroll the screen down and you will see an option called 'Rotation Locked', just click on that to turn on auto rotation of the screen and there you go playing full screen videos!

How to get rid of Nexus7 screen flicker problem

It is noticed commonly that the Nexus7 Screen flickers at low ambient conditions. Hopefully Google fixes this problem in their next version of Android OS versions. However there are workarounds to get rid of this problem. The work around is to change the brightness of your display and disable the auto brightness under your display settings.

Nexus 7 Gets Locked when you forget your password

Some users have reported that you password protect their Nexus 7 and by chance if they forget the password, then the tablet is locked. To recover this issue, you may need to provide your Google Account Details and if this also does not help in any way and the final solution is to go for restoring the tablet to Factory Settings which you will erase all your stored data. Use this fix with your own risk and responsibility.

Some more tips adding up...

Saturday, December 29, 2012

How To Detect DeadLocks In Java Programs/Applications usin JConsole Java Utility (A Quicker Way)

DeadLock is a situation where two or more threads are blocked forever waiting for each other. So your Java program or Java Application freezes and you need to force close or kill the application by yourself. Since not all the times the dead Lock causes your application to freeze, we need to first identify if the application has crashed is really due to deadLock or some other reason. To find out if your application is caused due to deadlock situation, its fairly simple. The JDK (Java Development Kit) already provides a Utility called jConsole which is a Monitoring Tool and a management console which has ability to connect to remote VMs and analyze the thread dumps of your running java application. jConsole also gives the summary of the usages of heap memory, Eden Space, Survivor, Tenured Gen, etc usage in graphical format.  It also gives information about number of classes loaded, threads loaded and other important data of your application including the deadlock situations amongst threads if any.

I'll show you how we can use jConsole application and connect to a sample java program that has encountered deadlock and thus has blocked.

1. Open the jConsole application which is present in your %JAVA_HOME%\bin directory (Your Java installation directory) using command prompt or just double clicking on jConsole.exe program
2. When you open jConsole, it displays the name and process IDs of the running applications, choose your java application name that is suffering from deadlock situation as shown in the following screenshot (DeadLockTest is my Java Application which is blocked forever due to deadlock in below image)

  

3. Once selected your application, click Connect.
4. Click on the 'Threads' tab and then on 'Detect DeadLock' button at the bottom of the screen as shown in the following screen shot.

 
5. Once you click on Detect Deadlock button in red color in above screenshot, the threads that are 'dead locked' will be displayed with complete stack trace as shown in the following screen shot.
6. By selecting a particular thread, the stack trace is displayed in the right side of the screen which can be used to analyze the deadlock situation and resolve the issue.
 In above example, I have two threads Thread-1, Thread-0 that are waiting for each other.

If there are no deadlocks, then under 'DeadLock' No threads will be listed.

jConsole really comes handy while debugging java prorams, it could be debugging deadlocks, or doing memory optimizations, etc.
Related Posts Plugin for WordPress, Blogger...