package com.shir60bhushan.excelContacts.About_N_Help; import com.shir60bhushan.excelContacts.R; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.Typeface; import android.net.Uri; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; public class AppRater { private final static String APP_TITLE = "Battery Saver Widget"; private final static String APP_PNAME = "com.batterysaverwidget"; static Typeface tf; private final static int DAYS_UNTIL_PROMPT = 3; private final static int LAUNCHES_UNTIL_PROMPT = 7;
public static void app_launched(Context mContext) { tf = Typeface.createFromAsset(mContext.getAssets(), "Merienda-Regular.ttf"); SharedPreferences prefs = mContext.getSharedPreferences("apprater", 0); if(prefs.getBoolean("dontshowagain", false)) { return; } SharedPreferences.Editor editor = prefs.edit(); // Increment launch counter long launch_count = prefs.getLong("launch_count", 0) + 1; editor.putLong("launch_count", launch_count); // Get date of first launch Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0); if(date_firstLaunch == 0) { date_firstLaunch = System.currentTimeMillis(); editor.putLong("date_firstlaunch", date_firstLaunch); } // Wait at least n days before opening if(launch_count >= LAUNCHES_UNTIL_PROMPT) { if(System.currentTimeMillis() >= date_firstLaunch + (DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000)) { showRateDialog(mContext, editor); } editor.commit(); } public static void showRateDialog(final Context mContext, final SharedPreferences.Editor editor) { final Dialog dialog = new Dialog(mContext); TextView tvTitle = new TextView(mContext); dialog.setTitle(" Rate " + APP_TITLE + "  "); LinearLayout ll = new LinearLayout(mContext); ll.setOrientation(LinearLayout.VERTICAL); TextView tv = new TextView(mContext); tv.setText("If you enjoy using " + APP_TITLE + ", please take a moment to rate it. Thanks for your support!"); tv.setWidth(240); tv.setTextColor(Color.WHITE); tv.setPadding(4, 0, 4, 10); tv.setTypeface(tf); ll.addView(tv); Button b1 = new Button(mContext); //b1.setBackgroundResource(R.drawable.selector_buttons); b1.setText("Rate " + APP_TITLE); b1.setTypeface(tf, Typeface.BOLD); b1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME))); dialog.dismiss(); } }); ll.addView(b1); Button b2 = new Button(mContext); b2.setText("Remind me later"); // b2.setBackgroundResource(R.drawable.selector_buttons); b2.setTypeface(tf, Typeface.BOLD); b2.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dialog.dismiss(); } }); ll.addView(b2); Button b3 = new Button(mContext); b3.setText("No, thanks"); //b3.setBackgroundResource(R.drawable.selector_buttons); b3.setTypeface(tf, Typeface.BOLD); b3.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(editor != null) { editor.putBoolean("dontshowagain", true); editor.commit(); } dialog.dismiss(); } }); ll.addView(b3); dialog.setContentView(ll); dialog.show(); } }








1. Make the SQLite database file.

If you don't have a sqlite manager I recommend you to download the opensource SQLite Database Browser available for Win/Linux/Mac. Make database file.

2. Use this database in your Android application.

Now put your database file in the "assets" folder of your project and create a Database Helper class by extending the SQLiteOpenHelper class
public class Databasehelper extends SQLiteOpenHelper
{
      private SQLiteDatabase myDataBase;
      private final Context myContext;
      private static final String DATABASE_NAME = "db.sqlite";
      public final static String DATABASE_PATH ="/data/data/com.shir60bhushan/databases/";
      public static final int DATABASE_VERSION = 1;
      //public static final int DATABASE_VERSION_old = 1;

      //Constructor
      public Databasehelper(Context context)
      {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
            this.myContext = context;
      }

      //Create a empty database on the system
      public void createDatabase() throws IOException
      {
            boolean dbExist = checkDataBase();

            if(dbExist)
            {
                  Log.v("DB Exists", "db exists");
                  // By calling this method here onUpgrade will be called on a
                  // writeable database, but only if the version number has been
                  // bumped
                  //onUpgrade(myDataBase, DATABASE_VERSION_old, DATABASE_VERSION);
            }
           
            boolean dbExist1 = checkDataBase();
            if(!dbExist1)
            {
                  this.getReadableDatabase();
                  try
                  {
                        this.close();    
                        copyDataBase();
                  }
                  catch (IOException e)
                  {
                        throw new Error("Error copying database");
               }
            }
      }

      //Check database already exist or not
      private boolean checkDataBase()
      {
            boolean checkDB = false;
            try
            {
                  String myPath = DATABASE_PATH + DATABASE_NAME;
                  File dbfile = new File(myPath);
                  checkDB = dbfile.exists();
            }
            catch(SQLiteException e)
            {
            }
            return checkDB;
      }

      //Copies your database from your local assets-folder to the just created empty database in the system folder
      private void copyDataBase() throws IOException
      {
            String outFileName = DATABASE_PATH + DATABASE_NAME;
            OutputStream myOutput = new FileOutputStream(outFileName);
            InputStream myInput = myContext.getAssets().open(DATABASE_NAME);

            byte[] buffer = new byte[1024];
            int length;
            while ((length = myInput.read(buffer)) > 0)
            {
                  myOutput.write(buffer, 0, length);
            }
            myInput.close();
            myOutput.flush();
            myOutput.close();
      }

      //delete database
      public void db_delete()
      {
            File file = new File(DATABASE_PATH + DATABASE_NAME);
            if(file.exists())
            {
                  file.delete();
                  System.out.println("delete database file.");
            }
      }

      //Open database
      public void openDatabase() throws SQLException
      {
            String myPath = DATABASE_PATH + DATABASE_NAME;
            myDataBase = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE);
      }

      public synchronized void closeDataBase()throws SQLException
      {
            if(myDataBase != null)
                  myDataBase.close();
            super.close();
      }

      public void onCreate(SQLiteDatabase db)
      {
      }

      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
      {    
            if (newVersion > oldVersion)
            {
                  Log.v("Database Upgrade", "Database version higher than old.");
                  db_delete();
            }
      }

 //add your public methods for insert, get, delete and update data in database.
}


Now you can create a new instance of this DataBaseHelper class and call the createDataBase() and openDataBase() methods. Remember to change the "YOUR_PACKAGE" to your application package namespace (i.e: com.examplename.myapp) in the DB_PATH string.


DataBaseHelper myDbHelper = new DataBaseHelper();
      myDbHelper = new DataBaseHelper(this);
      try {
            myDbHelper.createDataBase();

      } catch (IOException ioe) {

            throw new Error("Unable to create database");
      }
     
      try {      
            myDbHelper.openDataBase();

      }catch(SQLException sqle){

            throw sqle;
      }

Android – parseSdkContent failed (or) SDK fails to install





Hello friends we face such type of issue when you update your ADT plugin and when you have old sdk in your system then eclipse adt doesnt understand the old file structure and gives such error


i dont want you people to waist your whole day for this issue so have a look how to resolve it


-> First close Eclipse, 
-> After press Alt+Ctrl+Delete to show all processes and End up the adb.exe process by selecting 
adb.exe and click EndProcess button..

->  After that Delete all Android files in my System,Exists in the Path:
C:\Users\pavan\.android..
Next delete  my AndroidWorkSpaces e


if above thing doesnt resolves your problem the try following

These are the some of the reasons for this error with solution


1. LogCat with phantom logs
Sometimes the logcat cannot show correctly the logs. They appears but before you can read them, they disappears.
This could be that there are too many log.
Solution: Clear the previous logs
You can use the button "Clear log" appears on the upper-right corner of Logcat windows.

2. Debug certificate expired
Error generating final archive: Debug certificate expired
There is a certificate for create applications for Android. It contains the private key held by the application's developer and it is automatically created when the programmer creates an android application. This certificate expires in 365 days. Once it is expires, to continue generate programs, the programmers should remove it and new certificate will be created.

1. Remove the old certificate
To remove it, first the place of where it is should be known:
1.1 Go to preferences.
Windows: Window -> preference
Mac os X: Eclipse -> preference
1.2. Check the certificate directory Android -> build -> Default debug keystore.
1.3. Go to the directory indicated in the previous step and remove the keystore.
2. Clear the project
2.1 Go to Project -> Clean...
2.2 Select any project and click on Ok

The eclipse will generate new certificate. (If it is not generated instantly, wait few seconds.)

For more information:

3.  XML file error parsing
If you have modified the any XML in Android by hand and your are unable to launch correctly the application, you might check the main project folder. There could be some problem with the XML file while the compiler is parsing it. You will notice it if after you refresh the directory, you see a strange FileName.out.xml file.

This could be the error message:
FATAL EXCEPTION: main
 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.jiahaoliuliu.android/com.jiahaoliuliu.android.SampleClass}: java.lang.ClassNotFoundException: com.jiahaoliuliu.android.SampleClass in loader dalvik.system.PathClassLoader[/data/app/com.jiahaoliuliu.android.SampleProject-1.apk]
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:3691)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
  at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.ClassNotFoundException: com.jiahaoliuliu.android.SampleClass in loader dalvik.system.PathClassLoader[/data/app/com.jiahaoliuliu.android.SampleProject-1.apk]
  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
  ... 11 more



This could be the solution:
1. Delete the extra file (FileName.out.xml) file generated.
2. Close all the files in the Eclipse
3. Press on Project -> Clean and clean the project
4. Open any java class file
5. Click on the file opened so the eclipse will focus to the file
6. Click on "Run" again

It worked on eclipse Indigo.


4. Error parsing the SDK content - Java.lang.NullPointerException
After updating the last version of Android SDK Tools (19), I found a strange error:

Parsing Data for android-7 failed java.lang.NullPointerException
Parsing Data for android-8 failed java.lang.NullPointerException
Parsing Data for android-10 failed java.lang.NullPointerException
Parsing Data for android-14 failed java.lang.NullPointerException



This could be due some error with the new SDK. I hope that Google know this bug and while they are trying to solve it, in order to still working on android, you can do the follow:

1. Copy the old eclipse configuration
1.1 Close eclipse
1.1 Go to the main work directory of eclipse
1.2 Rename the directory .metadata to .oldMetadata

2. Generate new eclipse configuration
2.1 Open the eclipse
2.2 Once eclipse is loaded, it will show the normal Java interface. You will see the Android AVD but you won't be able to create and run any Android project.
2.3 Close eclipse

3. Copy the old Android plugin
3.1 Go to the main work directory of eclipse
3.2 Localize the folder com.android.ide.eclipse.adt It should be in .oldMetadata/.plugins/
3.3 Copy it to the new eclipse configuration: .metadata/plugins/

4. Test the result
4.1 Open eclipse
4.2 Click on File -> New. You should be able to see the "Android project" option.
4.3 Try to create a empty project and run it.

Google Recently have released the you tube api for android so now developers can play the youtube videos
in the youtube player view recently developers were using the webview to play the you tube video which was having so many limitations like controls,autoplay,seeking,etc

now i will show you how to implement the youtube player with api
package com.shir60bhushan.youtubeapi;

import com.google.android.youtube.player.YouTubePlayer;
import com.google.android.youtube.player.YouTubePlayer.ErrorReason;
import com.google.android.youtube.player.YouTubePlayer.PlaybackEventListener;
import com.google.android.youtube.player.YouTubePlayer.PlayerStateChangeListener;
import com.google.android.youtube.player.YouTubePlayer.PlayerStyle;
import com.google.android.youtube.player.YouTubePlayer.PlaylistEventListener;
import com.google.android.youtube.player.YouTubePlayerView;

import android.content.Context;
import android.os.Bundle;
import android.view.KeyEvent ;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.TextView;

/**
 * A simple YouTube Android API demo application demonstrating the use of {@link YouTubePlayer}
 * programmatic controls.
 */
public class PlayerControlsDemoActivity extends YouTubeFailureRecoveryActivity implements
    View.OnClickListener,
    TextView.OnEditorActionListener,
    CompoundButton.OnCheckedChangeListener,
    AdapterView.OnItemSelectedListener {

  private static final ListEntry[] ENTRIES = {
      new ListEntry("Androidify App", "irH3OSOskcE", false),
      new ListEntry("Chrome Speed Tests", "nCgQDjiotG0", false),
      new ListEntry("Playlist: Google I/O 2012", "PL56D792A831D0C362", true)};

  private static final String KEY_CURRENTLY_SELECTED_ID = "currentlySelectedId";

  private YouTubePlayerView youTubePlayerView;
  private YouTubePlayer player;
  private TextView stateText;
  private ArrayAdapter<ListEntry> videoAdapter;
  private Spinner videoChooser;
  private Button playButton;
  private Button pauseButton;
  private EditText skipTo;
  private TextView eventLog;
  private StringBuilder logString;
  private RadioGroup styleRadioGroup;

  private MyPlaylistEventListener playlistEventListener;
  private MyPlayerStateChangeListener playerStateChangeListener;
  private MyPlaybackEventListener playbackEventListener;

  private int currentlySelectedPosition;
  private String currentlySelectedId;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.player_controls_demo);

    youTubePlayerView = (YouTubePlayerView) findViewById(R.id.youtube_view);
    stateText = (TextView) findViewById(R.id.state_text);
    videoChooser = (Spinner) findViewById(R.id.video_chooser);
    playButton = (Button) findViewById(R.id.play_button);
    pauseButton = (Button) findViewById(R.id.pause_button);
    skipTo = (EditText) findViewById(R.id.skip_to_text);
    eventLog = (TextView) findViewById(R.id.event_log);

    styleRadioGroup = (RadioGroup) findViewById(R.id.style_radio_group);
    ((RadioButton) findViewById(R.id.style_default)).setOnCheckedChangeListener(this);
    ((RadioButton) findViewById(R.id.style_minimal)).setOnCheckedChangeListener(this);
    ((RadioButton) findViewById(R.id.style_chromeless)).setOnCheckedChangeListener(this);
    logString = new StringBuilder();

    videoAdapter = new ArrayAdapter<ListEntry>(this, android.R.layout.simple_spinner_item, ENTRIES);
    videoAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    videoChooser.setOnItemSelectedListener(this);
    videoChooser.setAdapter(videoAdapter);

    playButton.setOnClickListener(this);
    pauseButton.setOnClickListener(this);
    skipTo.setOnEditorActionListener(this);

    youTubePlayerView.initialize(DeveloperKey.DEVELOPER_KEY, this);


/* enter your developer key from the google's developer account  *  /

    playlistEventListener = new MyPlaylistEventListener();
    playerStateChangeListener = new MyPlayerStateChangeListener();
    playbackEventListener = new MyPlaybackEventListener();

    setControlsEnabled(false);
  }

  @Override
  public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player,
      boolean wasRestored) {
    this.player = player;
    player.setPlaylistEventListener(playlistEventListener);
    player.setPlayerStateChangeListener(playerStateChangeListener);
    player.setPlaybackEventListener(playbackEventListener);

    if (!wasRestored) {
      playVideoAtSelection();
    }
    setControlsEnabled(true);
  }

  @Override
  protected YouTubePlayer.Provider getYouTubePlayerProvider() {
    return youTubePlayerView;
  }

  private void playVideoAtSelection() {
    ListEntry selectedEntry = videoAdapter.getItem(currentlySelectedPosition);
    if (selectedEntry.id != currentlySelectedId && player != null) {
      currentlySelectedId = selectedEntry.id;
      if (selectedEntry.isPlaylist) {
        player.cuePlaylist(selectedEntry.id);
      } else {
        player.cueVideo(selectedEntry.id);
      }
    }
  }

  @Override
  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
    currentlySelectedPosition = pos;
    playVideoAtSelection();
  }

  @Override
  public void onNothingSelected(AdapterView<?> parent) {
    // Do nothing.
  }

  @Override
  public void onClick(View v) {
    if (v == playButton) {
      player.play();
    } else if (v == pauseButton) {
      player.pause();
    }
  }

  @Override
  public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (v == skipTo) {
      int skipToSecs = parseInt(skipTo.getText().toString(), 0);
      player.seekToMillis(skipToSecs * 1000);
      InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
      imm.hideSoftInputFromWindow(skipTo.getWindowToken(), 0);
      return true;
    }
    return false;
  }

  @Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    if (isChecked && player != null) {
      switch (buttonView.getId()) {
        case R.id.style_default:
          player.setPlayerStyle(PlayerStyle.DEFAULT);
          break;
        case R.id.style_minimal:
          player.setPlayerStyle(PlayerStyle.MINIMAL);
          break;
        case R.id.style_chromeless:
          player.setPlayerStyle(PlayerStyle.CHROMELESS);
          break;
      }
    }
  }

  @Override
  protected void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
    state.putString(KEY_CURRENTLY_SELECTED_ID, currentlySelectedId);
  }

  @Override
  protected void onRestoreInstanceState(Bundle state) {
    super.onRestoreInstanceState(state);
    currentlySelectedId = state.getString(KEY_CURRENTLY_SELECTED_ID);
  }

  private void updateText() {
    stateText.setText(String.format("Current state: %s %s %s",
        playerStateChangeListener.playerState, playbackEventListener.playbackState,
        playbackEventListener.bufferingState));
  }

  private void log(String message) {
    logString.append(message + "\n");
    eventLog.setText(logString);
  }

  private void setControlsEnabled(boolean enabled) {
    playButton.setEnabled(enabled);
    pauseButton.setEnabled(enabled);
    skipTo.setEnabled(enabled);
    videoChooser.setEnabled(enabled);
    for (int i = 0; i < styleRadioGroup.getChildCount(); i++) {
      styleRadioGroup.getChildAt(i).setEnabled(enabled);
    }
  }

  private static final int parseInt(String intString, int defaultValue) {
    try {
      return intString != null ? Integer.valueOf(intString) : defaultValue;
    } catch (NumberFormatException e) {
      return defaultValue;
    }
  }

  private String formatTime(int millis) {
    int seconds = millis / 1000;
    int minutes = seconds / 60;
    int hours = minutes / 60;

    return (hours == 0 ? "" : hours + ":")
        + String.format("%02d:%02d", minutes % 60, seconds % 60);
  }

  private String getTimesText() {
    int currentTimeMillis = player.getCurrentTimeMillis();
    int durationMillis = player.getDurationMillis();
    return String.format("(%s/%s)", formatTime(currentTimeMillis), formatTime(durationMillis));
  }

  private final class MyPlaylistEventListener implements PlaylistEventListener {
    @Override
    public void onNext() {
      log("NEXT VIDEO");
    }

    @Override
    public void onPrevious() {
      log("PREVIOUS VIDEO");
    }

    @Override
    public void onPlaylistEnded() {
      log("PLAYLIST ENDED");
    }
  }

  private final class MyPlaybackEventListener implements PlaybackEventListener {
    String playbackState = "NOT_PLAYING";
    String bufferingState = "";
    @Override
    public void onPlaying() {
      playbackState = "PLAYING";
      updateText();
      log("\tPLAYING " + getTimesText());
    }

    @Override
    public void onBuffering(boolean isBuffering) {
      bufferingState = isBuffering ? "(BUFFERING)" : "";
      updateText();
      log("\t\t" + (isBuffering ? "BUFFERING " : "NOT BUFFERING ") + getTimesText());
    }

    @Override
    public void onStopped() {
      playbackState = "STOPPED";
      updateText();
      log("\tSTOPPED");
    }

    @Override
    public void onPaused() {
      playbackState = "PAUSED";
      updateText();
      log("\tPAUSED " + getTimesText());
    }

    @Override
    public void onSeekTo(int endPositionMillis) {
      log(String.format("\tSEEKTO: (%s/%s)",
          formatTime(endPositionMillis),
          formatTime(player.getDurationMillis())));
    }
  }

  private final class MyPlayerStateChangeListener implements PlayerStateChangeListener {
    String playerState = "UNINITIALIZED";

    @Override
    public void onLoading() {
      playerState = "LOADING";
      updateText();
      log(playerState);
    }

    @Override
    public void onLoaded(String videoId) {
      playerState = String.format("LOADED %s", videoId);
      updateText();
      log(playerState);
    }

    @Override
    public void onAdStarted() {
      playerState = "AD_STARTED";
      updateText();
      log(playerState);
    }

    @Override
    public void onVideoStarted() {
      playerState = "VIDEO_STARTED";
      updateText();
      log(playerState);
    }

    @Override
    public void onVideoEnded() {
      playerState = "VIDEO_ENDED";
      updateText();
      log(playerState);
    }

    @Override
    public void onError(ErrorReason reason) {
      playerState = "ERROR (" + reason + ")";
      if (reason == ErrorReason.UNEXPECTED_SERVICE_DISCONNECTION) {
        // When this error occurs the player is released and can no longer be used.
        player = null;
        setControlsEnabled(false);
      }
      updateText();
      log(playerState);
    }

  }

  private static final class ListEntry {

    public final String title;
    public final String id;
    public final boolean isPlaylist;

    public ListEntry(String title, String videoId, boolean isPlaylist) {
      this.title = title;
      this.id = videoId;
      this.isPlaylist = isPlaylist;
    }

    @Override
    public String toString() {
      return title;
    }

  }

}



and the

player_control_demo.xml  is as follows:



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/state_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:paddingTop="5dp"
        android:singleLine="true" />

    <com.google.android.youtube.player.YouTubePlayerView
        android:id="@+id/youtube_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="top"
        android:orientation="horizontal"
        android:padding="8dp" >

        <include
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            layout="@layout/player_controls_container" />
    </LinearLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" >

        <TextView
            android:id="@+id/event_log"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="10dp" />
    </ScrollView>
</LinearLayout>









































Various Development Tools in Android 


1] Robotium: Robotium is a test framework created to make it easy to write powerful and robust automatic black-box test cases for Android applications.
With the support of Robotium, test case developers can write function, system and acceptance test scenarios, spanning multiple Android activities.

Robotium has full support for Activities, Dialogs, Toasts, Menus and Context Menus.

Read More


2] AppXplore: With the AppXplore tool, you can go through all the apps installed on your Android device and dissect many application details – app version, package names, certificates, permissions, signatures, activities, and lots of other information that would not be normally viewable from the device.

AppXplore is especially useful for seeing how much memory an app is using, and if the file is movable to the SD card. Likewise, developers can use AppXplore for testing and quality assurance purposes, to make sure their apps are showing the proper permissions in the manifest file. Check out the AppXplore page to download and get more information.
Read More



3] XAppDbg: XAppDbg is an app development tool that can be used to change parameters in your code during runtime. This can save you a lot of time, since you don’t have to build and run your application for each small change. Go to the XAppDbg page to download and learn more about this open sourced tool.
Read More



4] Memory Analyzer (MAT): The Eclipse Memory Analyzer is a fast and feature-rich Java heap analyzer that helps you find memory leaks and reduce memory consumption.


Use the Memory Analyzer to analyze productive heap dumps with hundreds of millions of objects, quickly calculate the retained sizes of objects, see who is preventing the Garbage Collector from collecting objects, run a report to automatically extract leak suspects.


Read More

5] ChkBugReport: This tool is used to quickly examine the output of an Android bug report. It takes the large text file that is output from the Android bug report tool and parses it into a more readable file for easier analysis.
ChkBugReport is also open source project. Go to the ChkBugReport page to download and learn more.
Read More




6] APKAnalyser: This is a static, virtual analysis tool which you can use to get a thorough overview of your application architecture. Use it to examine API references, view application dependencies, and disassemble bytecodes in Android apps. 
The open-sourced APKAnalyser is a complete tool chain which supports modification of the binary application. You are then able to repack, install, run, and verify the result from logcat. Go to the APKAnalyser page to download and learn more.vn
Read More



7] ACRA: ACRA is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form. It is targetted to android applications developers to help them get data from their applications when they crash or behave erroneously.
ACRA's notification systems are clean. If a crash occurs, your application does not add user notifications over existing system's crash notifications or reporting features. If you use the Toast, Status bar notification or direct dialog modes, the "force close" dialog is not displayed anymore and devices where the system native reporting feature is enabled do not offer the user to send an additional report.
Read More




8] SQLiteManager plugin for eclipse:  This plugin helps developer to view and modify sqlite database in eclipse IDE 




Read More




9] Asset Studio: Icon generators allow you to quickly and easily generate icons from existing source images, clipart, or text. Read More



10] little eye labs: little eye labs is performance analyser tool for Android Apps,he product has been rechristened as simply “little eye” instead of “littleEye appInsight” as it was called earlier. 
Keeps our product catalog simple and consistent with our overall theme of focusing on simplicity, on every aspect of what we do! 

Features

  • Profile Any App
  • Record And Playback video
  • Foreground and Background usage
  • CPU, Memory and Data consumption
  • Manual or Automatic Heap Dumps
  • Save & Share
Read More




11] AndroidKickStartR: Start your next Android app in 10 seconds. AndroidKickstartR helps you to quickly create a well configured Android application using the most popular libraries. It creates and configures your project for you. Just focus on code! Read More








12] Android Layout Binder: Convert your Android XML layouts into a set of declarations and binds to save you all that manual typing. Enter a prefix for your fields, choose the scope paste in your XML and hit generate. Select "verbose" to find out why any fields are skipped. 
Read More













13 ] Spoon: Android's ever-expanding ecosystem of devices creates a unique challenge to testing applications. Spoon aims to simplify this task by distributing instrumentation test execution and displaying the results in a meaningful way.
Instead of attempting to be a new form of testing, Spoon makes existing instrumentation tests more useful. Using the application APK and instrumentation APK, Spoon runs the tests on multiple devices simultaneously. Once all tests have completed, a static HTML summary is generated with detailed information about each device and test. Read More





14 ] Android Holo Colors Generator: The Android Holo Colors Generator allows you to easily create Android components such as editext or spinner with your own colours for your Android application. It will generate all necessary nine patch assets plus associated XML drawables and styles which you can copy straight into your project. Read More


15] ActionBar Style Generator: The Android Action Bar Style Generator allows you to easily create a simple, attractive and seamless custom action bar style for your Android application. It will generate all necessary nine patch assets plus associated XML drawables and styles which you can copy straight into your project. Read More