title: how to test application on Android device
body: <p>I have made application for playing set of Youtube videos in internal youtube player in Android. This application gets array of links and plays it in infinity loop:1,2,3,4,5, then again 1,2,3,4,5, etc. It works on my device, but my friend told me that it is video didn't play on his device. Can you check it?</p>
  
  <p>Link for downloading - <a href="http://depositfiles.com/files/vtw1as70u" rel="nofollow">http://depositfiles.com/files/vtw1as70u</a></p>
  
  <p>Code for this: </p>
  
  <pre><code>package com.nda.ut;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.AdapterView.OnItemClickListener;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.Toast;
  
  public class UTPlayerActivity extends Activity {
      /** Called when the activity is first created. */
  
      private String[] mLinks;
      private int mPosition=0;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.main);
  
          NetworkUtilities utility=new NetworkUtilities();
  
          if (utility.getUTLinks("")) {
  
              mLinks=utility.getLinks();
  
              if (mLinks!=null) {
  
                  loadPlayer();
              }
              else {
  
                  Toast.makeText(this, "List is empty", Toast.LENGTH_LONG).show();
              }
          }
          else {
  
              Toast.makeText(this, "Exception with getting of lists", Toast.LENGTH_LONG).show();
          }
      }
  
      @Override
      public void onActivityResult(int a, int b, Intent data) {
  
          super.onActivityResult(a, b, data);
  
          if (mPosition==mLinks.length-1) {
  
              mPosition=0;
              loadPlayer();
          }
          else {
  
              ++mPosition;
              loadPlayer();
          }
      }
  
      private void loadPlayer() {
          Intent youtube=new Intent(Intent.ACTION_VIEW, Uri.parse(mLinks[mPosition]));
  
          startActivityForResult(youtube, 100);
      }
  }
  </code></pre>