Follow the steps in this link.you will be able to use the GSON library in android
http://www.javacodegeeks.com/2011/01/android-json-parsing-gson-tutorial.html
http://www.javacodegeeks.com/2011/01/android-json-parsing-gson-tutorial.html
This blog is for the persons who want to learn android and also having any problems in development.
package com.TestSurefaceView;import android.app.Activity;import android.content.Context;import android.graphics.Canvas;import android.os.Bundle;import android.view.SurfaceHolder;import android.view.SurfaceView;public class TestSurefaceView extends Activity {MySurfaceView mySurfaceView; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mySurfaceView = new MySurfaceView(this); setContentView(mySurfaceView); } @Overrideprotected void onResume() { // TODO Auto-generated method stub super.onResume(); mySurfaceView.onResumeMySurfaceView();}@Overrideprotected void onPause() { // TODO Auto-generated method stub super.onPause(); mySurfaceView.onPauseMySurfaceView();}class MySurfaceView extends SurfaceView implements Runnable{ Thread thread = null; SurfaceHolder surfaceHolder; volatile boolean running = false; public MySurfaceView(Context context) { super(context); // TODO Auto-generated constructor stub surfaceHolder = getHolder(); } public void onResumeMySurfaceView(){ running = true; thread = new Thread(this); thread.start(); } public void onPauseMySurfaceView(){ boolean retry = true; running = false; while(retry){ try { thread.join(); retry = false; } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } @Override public void run() { // TODO Auto-generated method stub while(running){ if(surfaceHolder.getSurface().isValid()){ Canvas canvas = surfaceHolder.lockCanvas(); //... actual drawing on canvas surfaceHolder.unlockCanvasAndPost(canvas); } } } }}View screen = (View)findViewById(R.id.screen);screen.setDrawingCacheEnabled(true);Bitmap bmScreen = screen.getDrawingCache();