# [need help] Accelerometer Controlled robot.



## dl_evans (Dec 13, 2011)

I have this robot from a company called DeskPets that is controlled from an IR Led that is plugged into the headphone jack of the cell phone. Pushing a button sends the IR commands to the robot and it moves. I'm trying to use the accelerometer to send the same signals.

The signal is a small MP3 that is stored within the app. When you play the sound it makes the IR LED blink.

It works but the app hangs and crashes. I'm guessing it's because the MP3 keeps getting sent without stopping.

I've tried other Android sites for help and Rootz Wiki seems to be the best. I'm hoping you guys won't fail me again!

Here is the code from the accelerometer.java:


```
<br />
package robot.test;<br />
import android.content.Intent;<br />
import android.content.pm.ActivityInfo;<br />
import android.content.res.AssetFileDescriptor;<br />
import android.hardware.Sensor;<br />
import android.hardware.SensorEvent;<br />
import android.hardware.SensorEventListener;<br />
import android.hardware.SensorManager;<br />
import android.media.MediaPlayer;<br />
import android.media.MediaPlayer.OnCompletionListener;<br />
import android.os.Bundle;<br />
import android.util.Log;<br />
import android.widget.TextView;<br />
import com.actionbarsherlock.app.ActionBar;<br />
import com.actionbarsherlock.app.SherlockActivity;<br />
import com.actionbarsherlock.view.Menu;<br />
import com.actionbarsherlock.view.MenuItem;<br />
public class UseAccel extends SherlockActivity implements SensorEventListener {<br />
private SensorManager sensorManager;<br />
TextView xCoor; // declare X axis object<br />
TextView yCoor; // declare Y axis object<br />
TextView zCoor; // declare Z axis object<br />
TextView direction;<br />
boolean top;<br />
int savedicon;<br />
int product;<br />
int codeType;<br />
int command;<br />
int delay = 250;<br />
<br />
public MediaPlayer mp;<br />
@Override<br />
public void onCreate(Bundle savedInstanceState){<br />
  this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);<br />
  super.onCreate(savedInstanceState);<br />
  setContentView(R.layout.useaccel);<br />
  savedicon = getIntent().getIntExtra("Saved Icon", savedicon);<br />
  product = getIntent().getIntExtra("saved_robot",product);<br />
  codeType = getIntent().getIntExtra("command",codeType);<br />
  command = getIntent().getIntExtra("command_",command);<br />
  ActionBar actionBar = getSupportActionBar();<br />
	    actionBar.setDisplayHomeAsUpEnabled(true);<br />
  getSupportActionBar().setTitle("Motion"); //sets custom text next to home icon<br />
  //Media Player to play the sounds<br />
  mp = new MediaPlayer();<br />
  xCoor=(TextView)findViewById(R.id.xcoor); // create X axis object<br />
  yCoor=(TextView)findViewById(R.id.ycoor); // create Y axis object<br />
  zCoor=(TextView)findViewById(R.id.zcoor); // create Z axis object<br />
  direction=(TextView)findViewById(R.id.direction);<br />
  sensorManager=(SensorManager)getSystemService(SENSOR_SERVICE);<br />
  // add listener. The listener will be HelloAndroid (this) class<br />
  sensorManager.registerListener(this,<br />
    sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),<br />
    SensorManager.SENSOR_DELAY_GAME);<br />
  //Update Action Bar Icon<br />
  if (savedicon == 1){<br />
	  getSupportActionBar().setIcon(R.drawable.redskitter);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 2){<br />
	  getSupportActionBar().setIcon(R.drawable.blueskitter);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 3){<br />
	  getSupportActionBar().setIcon(R.drawable.whiteskitter);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 4){<br />
	  getSupportActionBar().setIcon(R.drawable.greenskitter);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 5){<br />
	  getSupportActionBar().setIcon(R.drawable.bluetrek);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 6){<br />
	  getSupportActionBar().setIcon(R.drawable.blacktrek);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 8){<br />
	  getSupportActionBar().setIcon(R.drawable.cleartrek);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 9){<br />
	  getSupportActionBar().setIcon(R.drawable.redtrek);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 11){<br />
	  getSupportActionBar().setIcon(R.drawable.orangetank);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 12){<br />
	  getSupportActionBar().setIcon(R.drawable.greentank);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 13){<br />
	  getSupportActionBar().setIcon(R.drawable.bluetank);  //sets custom home icon<br />
  }<br />
  else if (savedicon == 14){<br />
	  getSupportActionBar().setIcon(R.drawable.greytank);  //sets custom home icon<br />
  }<br />
  else {<br />
	  getSupportActionBar().setIcon(R.drawable.icon);  //sets custom home icon<br />
  }<br />
  /* More sensor speeds (taken from api docs)<br />
	  SENSOR_DELAY_FASTEST get sensor data as fast as possible<br />
	  SENSOR_DELAY_GAME rate suitable for games<br />
    SENSOR_DELAY_NORMAL rate (default) suitable for screen orientation changes<br />
  */<br />
}<br />
<br />
public void onAccuracyChanged(Sensor sensor,int accuracy){<br />
}<br />
<br />
@Override<br />
public boolean onCreateOptionsMenu(Menu menu) {<br />
	 com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();<br />
	 inflater.inflate(R.menu.accelmenu, menu);<br />
	 return true;<br />
}<br />
<br />
@Override<br />
public boolean onOptionsItemSelected(MenuItem item) {<br />
  switch (item.getItemId()) {<br />
  case R.id.item1:<br />
   top = true;<br />
   break;<br />
  case R.id.item2:<br />
   top = false;<br />
   break;<br />
  case android.R.id.home:<br />
	  Intent intent = new Intent(this, RobottestActivity.class);<br />
		 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);<br />
		 startActivity(intent);<br />
		 break;<br />
  }<br />
	 return true;<br />
}<br />
/* PLAY SOUND FUNCTION */<br />
//Plays the sound of the Product and its Command<br />
private void playSound(int product, int command){<br />
mp.reset();<br />
int resid = 0;<br />
AssetFileDescriptor afd;<br />
   /*<br />
    1 = forward<br />
   2 = reverse<br />
   3 = right<br />
   4 = left<br />
   5 = stop<br />
		  */<br />
  try{<br />
   //App only works on either code type 1 or 2<br />
   //This is the section for code type 2<br />
   if(codeType == 2){<br />
  <br />
   if(product == 11 && command == 1){<br />
    resid = R.raw.fwdredskitterflip;<br />
   }<br />
   else if(product == 11 && command == 2){<br />
    //resid = R.raw.frustrated;<br />
    resid = R.raw.bwdredskitterflip;<br />
   }<br />
   else if(product == 11 && command == 3){<br />
    resid = R.raw.leftredskitterflip;<br />
   }<br />
   else if(product == 11 && command == 4){<br />
    resid = R.raw.rightredskitterflip;<br />
   }<br />
   else if(product == 11 && command == 5){<br />
    resid = R.raw.stopredskitterflip;<br />
   } <br />
    }<br />
  afd = this.getResources().openRawResourceFd(resid); <br />
    if(afd != null){<br />
   //if media player is empty get the resource<br />
   //and prepare the media player<br />
	  mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); <br />
	  afd.close(); <br />
	  mp.prepare(); <br />
    }else {<br />
	 System.out.println("Error");<br />
    }<br />
	 mp.setLooping(false);<br />
	 //We don't want the sound to keep playing<br />
	<br />
	 //Start playing the sound to control the DeskPet<br />
   mp.start();<br />
}catch (Exception e) {<br />
  //If something bad happens catch the exception<br />
  System.out.println("EXCEPTION CAUGHT");<br />
  e.printStackTrace();<br />
    }<br />
//When the media player is done playing stop the media player<br />
mp.setOnCompletionListener(new OnCompletionListener() {<br />
			 public void onCompletion(MediaPlayer mp) {<br />
			  mp.stop();<br />
			 }<br />
		 });<br />
}<br />
public void onSensorChanged(SensorEvent event){<br />
  if((event.sensor.getType()==Sensor.TYPE_ACCELEROMETER) && (top == true)){<br />
   // assign directions<br />
   float x=event.values[0];<br />
   float y=event.values[1];<br />
   float z=event.values[2];<br />
   /*<br />
	 1 = forward<br />
    2 = reverse<br />
    3 = right<br />
    4 = left<br />
    5 = stop<br />
    */<br />
   xCoor.setText("X: "+x);<br />
   yCoor.setText("Y: "+y);<br />
   zCoor.setText("Z: "+z);<br />
   if(x > 4.0000){<br />
			 Log.d("sensor", "=====LEFT====");<br />
			 direction.setText("LEFT");<br />
			 command = 4;<br />
			 playSound(product, command);<br />
			<br />
		 }<br />
		 else if(x < -4.0000){<br />
			 Log.d("sensor", "=====RIGHT====");<br />
			 direction.setText("RIGHT");<br />
			 command = 3;<br />
			 playSound(product, command);<br />
		 }<br />
		 else if (y < -1.0000){<br />
			 Log.d("sensor", "=====DOWN====");<br />
			 direction.setText("DOWN");<br />
			 command = 1;<br />
			 playSound(product, command);<br />
		 }<br />
		 else if (y > 1.0000){<br />
			  Log.d("sensor", "=====UP====");<br />
			  direction.setText("UP");<br />
			  command = 1;<br />
			  playSound(product, command);<br />
		 }<br />
		 else {<br />
		  direction.setText("");<br />
			 command = 1;<br />
			 playSound(product, command);<br />
		 }<br />
  <br />
  }<br />
  // check sensor type<br />
  if((event.sensor.getType()==Sensor.TYPE_ACCELEROMETER) && (top == false)){<br />
   // assign directions<br />
   float x=event.values[0];<br />
   float y=event.values[1];<br />
   float z=event.values[2];<br />
   xCoor.setText("X: "+x);<br />
   yCoor.setText("Y: "+y);<br />
   zCoor.setText("Z: "+z);<br />
   if(x > 4.0000){<br />
			 Log.d("sensor", "=====LEFT====");<br />
			 try {<br />
	 Thread.sleep(delay);<br />
    } catch (InterruptedException e) {<br />
	 // TODO Auto-generated catch block<br />
	 e.printStackTrace();<br />
    }<br />
			 direction.setText("LEFT");<br />
			 command = 4;<br />
			 playSound(product, command);<br />
			<br />
		 }<br />
		 else if(x < -4.0000){<br />
			 Log.d("sensor", "=====RIGHT====");<br />
			 try {<br />
	 Thread.sleep(delay);<br />
    } catch (InterruptedException e) {<br />
	 // TODO Auto-generated catch block<br />
	 e.printStackTrace();<br />
    }<br />
			 direction.setText("RIGHT");<br />
			 command = 3;<br />
			 playSound(product, command);<br />
		 }<br />
		 else if (y < -1.0000){<br />
			 Log.d("sensor", "=====DOWN====");<br />
			 try {<br />
	 Thread.sleep(delay);<br />
    } catch (InterruptedException e) {<br />
	 // TODO Auto-generated catch block<br />
	 e.printStackTrace();<br />
    }<br />
			 direction.setText("DOWN");<br />
			 command = 1;<br />
			 playSound(product, command);<br />
		 }<br />
		 else if (y > 1.0000){<br />
			  Log.d("sensor", "=====UP====");<br />
			  try {<br />
	  Thread.sleep(delay);<br />
	 } catch (InterruptedException e) {<br />
	  // TODO Auto-generated catch block<br />
	  e.printStackTrace();<br />
	 }<br />
			  direction.setText("UP");<br />
			  command = 1;<br />
			  playSound(product, command);<br />
		 }<br />
		 else {<br />
		  direction.setText("");<br />
			 releaseMediaPlayer();<br />
		 }<br />
  }<br />
}<br />
@Override<br />
    protected void onPause() {<br />
	    super.onPause();<br />
    }<br />
   <br />
//onDestroy is if the app is destroyed to free up resources<br />
@Override<br />
    protected void onDestroy() {<br />
	    super.onDestroy();<br />
	    //Release the Media Player so other apps can use it<br />
	    //VERY IMPORTANT<br />
	    releaseMediaPlayer();<br />
    }<br />
  <br />
public void releaseMediaPlayer() {<br />
	    if (mp != null) {<br />
		    mp.release();<br />
	    }<br />
    }<br />
}<br />
```


----------



## JBirdVegas (Jun 11, 2011)

how does it crash can you give a logcat?


----------



## dl_evans (Dec 13, 2011)

Of course. I always forget that part. Here ya go:

06-05 18:35:40.660: I/ActivityManager(183): No longer want com.android.keychain (pid 6448): hidden #16
06-05 18:35:44.238: I/ActivityManager(183): START {cmp=robot.test/.UseAccel (has extras)} from pid 6566
06-05 18:35:44.410: D/sensor(6566): =====UP====
06-05 18:35:44.660: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:44.770: D/sensor(6566): =====UP====
06-05 18:35:45.027: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:45.027: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:45.027: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:45.051: D/sensor(6566): =====UP====
06-05 18:35:45.301: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:45.309: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:45.309: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:45.340: D/sensor(6566): =====UP====
06-05 18:35:45.590: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:45.590: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:45.590: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:45.629: D/sensor(6566): =====UP====
06-05 18:35:45.879: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:45.879: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:45.879: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:45.918: D/sensor(6566): =====UP====
06-05 18:35:46.168: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:46.168: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:46.168: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:46.199: D/sensor(6566): =====UP====
06-05 18:35:46.449: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:46.457: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:46.457: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:46.481: D/sensor(6566): =====UP====
06-05 18:35:46.731: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:46.731: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:46.731: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:46.762: D/sensor(6566): =====UP====
06-05 18:35:47.012: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:47.012: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:47.012: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:47.051: D/sensor(6566): =====UP====
06-05 18:35:47.301: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:47.301: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:47.301: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:47.332: D/sensor(6566): =====UP====
06-05 18:35:47.582: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:47.582: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:47.582: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:47.613: D/sensor(6566): =====UP====
06-05 18:35:47.863: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:47.863: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:47.863: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:47.887: D/sensor(6566): =====UP====
06-05 18:35:48.145: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:48.145: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:48.145: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:48.168: D/sensor(6566): =====UP====
06-05 18:35:48.426: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:48.426: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:48.426: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:48.457: D/sensor(6566): =====UP====
06-05 18:35:48.707: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:48.707: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:48.707: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:48.731: D/sensor(6566): =====UP====
06-05 18:35:48.988: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:48.988: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:48.988: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:49.012: D/sensor(6566): =====UP====
06-05 18:35:49.074: D/dalvikvm(6173): GC_CONCURRENT freed 228K, 5% free 13567K/14215K, paused 3ms+3ms
06-05 18:35:49.270: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:49.270: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:49.270: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:49.324: D/sensor(6566): =====UP====
06-05 18:35:49.527: D/dalvikvm(6173): GC_CONCURRENT freed 182K, 3% free 13791K/14215K, paused 8ms+9ms
06-05 18:35:49.551: D/Finsky(6173): [1] 5.onFinished: Installation state replication succeeded.
06-05 18:35:49.574: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:49.574: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:49.574: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:49.645: D/sensor(6566): =====UP====
06-05 18:35:49.895: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:49.895: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:49.902: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:49.926: D/sensor(6566): =====UP====
06-05 18:35:50.176: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:50.184: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:50.184: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:50.223: D/sensor(6566): =====UP====
06-05 18:35:50.481: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:50.481: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:50.481: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:50.512: D/sensor(6566): =====UP====
06-05 18:35:50.762: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:50.762: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:50.770: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:50.801: D/sensor(6566): =====UP====
06-05 18:35:51.051: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:51.051: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:51.051: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:51.098: D/sensor(6566): =====UP====
06-05 18:35:51.348: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:51.348: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:51.348: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:51.371: D/sensor(6566): =====UP====
06-05 18:35:51.629: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:51.629: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:51.629: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:51.652: D/sensor(6566): =====UP====
06-05 18:35:51.902: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:51.902: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:51.902: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:51.934: D/sensor(6566): =====UP====
06-05 18:35:52.191: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:52.191: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:52.191: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:52.223: D/sensor(6566): =====UP====
06-05 18:35:52.473: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:52.473: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:52.473: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:52.504: D/sensor(6566): =====UP====
06-05 18:35:52.754: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:52.754: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:52.762: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:52.793: D/sensor(6566): =====UP====
06-05 18:35:53.043: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:53.043: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:53.043: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:53.082: D/sensor(6566): =====UP====
06-05 18:35:53.332: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:53.332: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:53.332: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:53.363: D/sensor(6566): =====UP====
06-05 18:35:53.613: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:53.621: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:53.621: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:53.645: D/sensor(6566): =====UP====
06-05 18:35:53.895: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:53.895: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:53.895: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:53.926: D/sensor(6566): =====UP====
06-05 18:35:54.176: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:54.176: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:54.176: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:54.207: D/sensor(6566): =====UP====
06-05 18:35:54.293: W/ActivityManager(183): Launch timeout has expired, giving up wake lock!
06-05 18:35:54.309: W/ActivityManager(183): Activity idle timeout for ActivityRecord{416c6518 robot.test/.UseAccel}
06-05 18:35:54.457: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:54.457: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:54.457: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:54.496: D/sensor(6566): =====UP====
06-05 18:35:54.746: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:54.746: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:54.746: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:54.770: D/sensor(6566): =====UP====
06-05 18:35:55.027: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:55.027: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:55.027: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:55.059: D/sensor(6566): =====UP====
06-05 18:35:55.309: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:55.309: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:55.309: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:55.340: D/sensor(6566): =====UP====
06-05 18:35:55.590: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:55.590: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:55.598: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:55.621: D/sensor(6566): =====UP====
06-05 18:35:55.871: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:55.871: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:55.871: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:55.910: D/sensor(6566): =====UP====
06-05 18:35:56.160: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:56.160: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:56.160: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:56.191: D/sensor(6566): =====UP====
06-05 18:35:56.441: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:56.441: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:56.441: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:56.473: D/sensor(6566): =====UP====
06-05 18:35:56.723: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:56.723: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:56.723: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:56.762: D/sensor(6566): =====UP====
06-05 18:35:56.793: I/InputDispatcher(183): Application is not responding: Window{41cb8038 robot.test/robot.test.UseAccel paused=false}. 5002.0ms since event, 5001.4ms since wait started
06-05 18:35:56.793: I/WindowManager(183): Input event dispatching timed out sending to robot.test/robot.test.UseAccel
06-05 18:35:56.832: I/Process(183): Sending signal. PID: 6566 SIG: 3
06-05 18:35:56.832: I/dalvikvm(6566): threadid=3: reacting to signal 3
06-05 18:35:56.848: I/dalvikvm(6566): Wrote stack traces to '/data/anr/traces.txt'
06-05 18:35:56.848: I/Process(183): Sending signal. PID: 183 SIG: 3
06-05 18:35:56.848: I/dalvikvm(183): threadid=3: reacting to signal 3
06-05 18:35:56.902: I/dalvikvm(183): Wrote stack traces to '/data/anr/traces.txt'
06-05 18:35:56.902: I/Process(183): Sending signal. PID: 382 SIG: 3
06-05 18:35:56.902: I/dalvikvm(382): threadid=3: reacting to signal 3
06-05 18:35:56.918: I/dalvikvm(382): Wrote stack traces to '/data/anr/traces.txt'
06-05 18:35:56.918: I/Process(183): Sending signal. PID: 264 SIG: 3
06-05 18:35:56.918: I/dalvikvm(264): threadid=3: reacting to signal 3
06-05 18:35:56.926: I/dalvikvm(264): Wrote stack traces to '/data/anr/traces.txt'
06-05 18:35:56.926: I/Process(183): Sending signal. PID: 392 SIG: 3
06-05 18:35:56.926: I/dalvikvm(392): threadid=3: reacting to signal 3
06-05 18:35:56.934: I/dalvikvm(392): Wrote stack traces to '/data/anr/traces.txt'
06-05 18:35:56.934: I/Process(183): Sending signal. PID: 401 SIG: 3
06-05 18:35:56.934: I/dalvikvm(401): threadid=3: reacting to signal 3
06-05 18:35:56.941: I/dalvikvm(401): Wrote stack traces to '/data/anr/traces.txt'
06-05 18:35:57.012: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:57.012: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:57.012: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:57.027: D/sensor(6566): =====UP====
06-05 18:35:57.238: D/dalvikvm(183): GC_CONCURRENT freed 1427K, 20% free 19472K/24327K, paused 2ms+5ms
06-05 18:35:57.277: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:57.277: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:57.277: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:57.285: D/sensor(6566): =====UP====
06-05 18:35:57.340: D/dalvikvm(183): GC_EXPLICIT freed 114K, 21% free 19438K/24327K, paused 3ms+6ms
06-05 18:35:57.543: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:57.543: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:57.543: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:57.574: D/sensor(6566): =====UP====
06-05 18:35:57.824: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:57.824: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:57.824: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:57.856: D/sensor(6566): =====UP====
06-05 18:35:57.918: E/ActivityManager(183): ANR in robot.test (robot.test/.UseAccel)
06-05 18:35:57.918: E/ActivityManager(183): Reason: keyDispatchingTimedOut
06-05 18:35:57.918: E/ActivityManager(183): Load: 1.22 / 0.85 / 2.01
06-05 18:35:57.918: E/ActivityManager(183): CPU usage from 7497ms to -1ms ago:
06-05 18:35:57.918: E/ActivityManager(183): 14% 118/mediaserver: 5.8% user + 8.1% kernel / faults: 108 minor
06-05 18:35:57.918: E/ActivityManager(183): 6.8% 183/system_server: 3.2% user + 3.6% kernel / faults: 25 minor
06-05 18:35:57.918: E/ActivityManager(183): 3.8% 6566/robot.test: 3% user + 0.7% kernel / faults: 102 minor
06-05 18:35:57.918: E/ActivityManager(183): 2.2% 6173/com.android.vending: 1.8% user + 0.3% kernel / faults: 316 minor
06-05 18:35:57.918: E/ActivityManager(183): 0.6% 117/drmserver: 0.2% user + 0.4% kernel / faults: 27 minor
06-05 18:35:57.918: E/ActivityManager(183): 0.5% 126/adbd: 0.1% user + 0.4% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0.4% 115/surfaceflinger: 0.1% user + 0.2% kernel / faults: 1 minor
06-05 18:35:57.918: E/ActivityManager(183): 0.4% 382/com.android.phone: 0.1% user + 0.2% kernel / faults: 2 minor
06-05 18:35:57.918: E/ActivityManager(183): 0.3% 6065/logcat: 0.2% user + 0.1% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0.2% 107/servicemanager: 0% user + 0.2% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0.2% 14957/kworker/0:2: 0% user + 0.2% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0.1% 22/kinteractiveup: 0% user + 0.1% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0.1% 100/irq/206-mms_ts: 0% user + 0.1% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0% 357/com.google.android.inputmethod.latin: 0% user + 0% kernel / faults: 13 minor
06-05 18:35:57.918: E/ActivityManager(183): 0.1% 5715/kworker/u:5: 0% user + 0.1% kernel
06-05 18:35:57.918: E/ActivityManager(183): 0% 5720/kworker/u:10: 0% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): 14% TOTAL: 7.4% user + 7.5% kernel
06-05 18:35:57.918: E/ActivityManager(183): CPU usage from 551ms to 1069ms later with 99% awake:
06-05 18:35:57.918: E/ActivityManager(183): 13% 118/mediaserver: 9.6% user + 3.8% kernel / faults: 8 minor
06-05 18:35:57.918: E/ActivityManager(183): 7.6% 165/Binder Thread #: 1.9% user + 5.7% kernel
06-05 18:35:57.918: E/ActivityManager(183): 3.8% 164/AudioOut_1: 3.8% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): 1.9% 14688/Binder Thread #: 0% user + 1.9% kernel
06-05 18:35:57.918: E/ActivityManager(183): +0% 6678/TimedEventQueue: 0% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): +0% 6679/AudioTrackThrea: 0% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): 9.4% 183/system_server: 3.7% user + 5.6% kernel / faults: 1 minor
06-05 18:35:57.918: E/ActivityManager(183): 5.6% 223/InputDispatcher: 0% user + 5.6% kernel
06-05 18:35:57.918: E/ActivityManager(183): 1.8% 195/SensorService: 0% user + 1.8% kernel
06-05 18:35:57.918: E/ActivityManager(183): 1.8% 222/er$SensorThread: 1.8% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): 2.9% 6566/robot.test: 1.4% user + 1.4% kernel / faults: 4 minor
06-05 18:35:57.918: E/ActivityManager(183): 2.9% 6584/er$SensorThread: 2.9% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): 1.9% 126/adbd: 1.9% user + 0% kernel
06-05 18:35:57.918: E/ActivityManager(183): 1.9% 25405/adbd: 0% user + 1.9% kernel
06-05 18:35:57.918: E/ActivityManager(183): 17% TOTAL: 9.5% user + 7.6% kernel
06-05 18:35:58.106: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:58.106: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:58.106: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:58.152: D/sensor(6566): =====UP====
06-05 18:35:58.402: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:58.402: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:58.402: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:58.434: D/sensor(6566): =====UP====
06-05 18:35:58.684: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:58.684: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:58.684: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:58.715: D/sensor(6566): =====UP====
06-05 18:35:58.965: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:58.965: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:58.973: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:59.004: D/sensor(6566): =====UP====
06-05 18:35:59.254: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:59.254: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:59.254: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:59.285: D/sensor(6566): =====UP====
06-05 18:35:59.535: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:59.543: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:59.543: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:59.566: D/sensor(6566): =====UP====
06-05 18:35:59.816: I/System.out(6566): !!!!!PLAY SOUND
06-05 18:35:59.816: W/AudioCache(118): Battery track warning: refCount is already 0
06-05 18:35:59.816: W/TimedEventQueue(118): Event 2 was not found in the queue, already cancelled?
06-05 18:35:59.848: D/sensor(6566): =====UP====

Here is where the app hangs and the box pops up asking to close it or wait.

06-05 18:35:59.848: W/ActivityManager(183): Force finishing activity robot.test/.UseAccel
06-05 18:35:59.887: W/ActivityManager(183): Force finishing activity robot.test/.RobottestActivity
06-05 18:35:59.895: I/ActivityManager(183): Killing ProcessRecord{4167f618 6566:robot.test/10073}: user's request
06-05 18:35:59.926: I/WindowManager(183): WIN DEATH: Window{41cb8038 robot.test/robot.test.UseAccel paused=true}
06-05 18:35:59.926: W/AudioFlinger(118): session id 112 not found for pid 118
06-05 18:35:59.926: I/ActivityManager(183): Process robot.test (pid 6566) has died.
06-05 18:35:59.926: I/WindowManager(183): WIN DEATH: Window{41aece00 robot.test/robot.test.RobottestActivity paused=true}
06-05 18:36:00.090: W/InputManagerService(183): Got RemoteException sending setActive(false) notification to pid 6566 uid 10073


----------



## JBirdVegas (Jun 11, 2011)

line 226 (y > 1.0000) it seems that the y value is always above 1.0000, I think you need to start adding in some logging to see what your y variable is really doing, because if it is stuck in a loop, kinda like what your seeing, till it drops the process as unresponsive.


----------



## dl_evans (Dec 13, 2011)

That's just because the phone wasn't level (it was tilted on it's side). Even if the phone was level it would keep sending the "stop" command and hang the app again. I think I'm going to work on just sending the command once for each direction (up, back, left, right, and stop) and then unregister or stop the media player until the phone is tilted in a new direction.


----------



## JBirdVegas (Jun 11, 2011)

dl_evans said:


> That's just because the phone wasn't level (it was tilted on it's side). Even if the phone was level it would keep sending the "stop" command and hang the app again. I think I'm going to work on just sending the command once for each direction (up, back, left, right, and stop) and then unregister or stop the media player until the phone is tilted in a new direction.


Could you post a log that represents the problem you are attempting to fix?


----------



## dl_evans (Dec 13, 2011)

That's what the first log was from. Let me try another way, though. This log is from the same app without playing the mp3s.


```
<br />
06-05 23:34:20.248: I/ActivityManager(183): No longer want com.google.android.gallery3d (pid 15868): hidden #16<br />
06-05 23:34:23.772: I/ActivityManager(183): START {cmp=robot.test/.UseAccel (has extras)} from pid 16205<br />
06-05 23:34:23.990: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.006: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.006: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.006: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.014: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.022: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.092: I/ActivityManager(183): Displayed robot.test/.UseAccel: +260ms<br />
06-05 23:34:24.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.115: D/OpenGLRenderer(16205): Flushing caches (mode 0)<br />
06-05 23:34:24.147: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.147: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.154: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.178: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.194: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.209: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.209: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.225: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.256: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.256: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.279: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.295: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.319: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.342: D/sensor(16205): =====STOP====<br />
06-05 23:34:24.342: D/sensor(16205): =====STOP====<br />
06-05 23:34:25.084: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:25.350: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.365: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.389: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.404: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.420: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.436: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.451: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.467: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.475: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.490: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.506: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.522: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.537: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.553: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.569: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.592: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.608: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.623: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.647: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.654: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.670: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.694: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.709: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.725: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.740: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.756: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.772: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.795: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.795: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.811: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.826: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.842: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.858: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.873: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.897: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.912: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.928: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.944: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.959: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.975: D/sensor(16205): =====DOWN====<br />
06-05 23:34:25.998: D/sensor(16205): =====DOWN====<br />
06-05 23:34:26.014: D/sensor(16205): =====DOWN====<br />
06-05 23:34:26.029: D/sensor(16205): =====DOWN====<br />
06-05 23:34:26.045: D/sensor(16205): =====DOWN====<br />
06-05 23:34:26.061: D/sensor(16205): =====DOWN====<br />
06-05 23:34:26.365: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.389: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.404: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.420: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.436: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.451: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.467: D/sensor(16205): =====STOP====<br />
06-05 23:34:26.490: D/sensor(16205): =====UP====<br />
06-05 23:34:26.490: D/sensor(16205): =====UP====<br />
06-05 23:34:26.506: D/sensor(16205): =====UP====<br />
06-05 23:34:26.522: D/sensor(16205): =====UP====<br />
06-05 23:34:26.537: D/sensor(16205): =====UP====<br />
06-05 23:34:26.553: D/sensor(16205): =====UP====<br />
06-05 23:34:26.569: D/sensor(16205): =====UP====<br />
06-05 23:34:26.592: D/sensor(16205): =====UP====<br />
06-05 23:34:26.608: D/sensor(16205): =====UP====<br />
06-05 23:34:26.623: D/sensor(16205): =====UP====<br />
06-05 23:34:26.639: D/sensor(16205): =====UP====<br />
06-05 23:34:26.654: D/sensor(16205): =====UP====<br />
06-05 23:34:26.670: D/sensor(16205): =====UP====<br />
06-05 23:34:26.694: D/sensor(16205): =====UP====<br />
06-05 23:34:26.709: D/sensor(16205): =====UP====<br />
06-05 23:34:26.725: D/sensor(16205): =====UP====<br />
06-05 23:34:26.740: D/sensor(16205): =====UP====<br />
06-05 23:34:26.756: D/sensor(16205): =====UP====<br />
06-05 23:34:26.779: D/sensor(16205): =====UP====<br />
06-05 23:34:26.795: D/sensor(16205): =====UP====<br />
06-05 23:34:26.811: D/sensor(16205): =====UP====<br />
06-05 23:34:26.826: D/sensor(16205): =====UP====<br />
06-05 23:34:26.842: D/sensor(16205): =====UP====<br />
06-05 23:34:27.334: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.350: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.373: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.389: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.404: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.420: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.436: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.451: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.475: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.490: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.506: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.506: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.522: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.537: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.553: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.569: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.592: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.608: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.623: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.639: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.654: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.670: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.694: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.709: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.725: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.740: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.756: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.772: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.795: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.811: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.826: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.842: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.858: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.865: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.881: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.897: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.912: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.928: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.944: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.959: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.983: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:27.998: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.014: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.029: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.045: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.061: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.084: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.100: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.115: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.131: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.147: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.162: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.186: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.201: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.201: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.217: D/sensor(16205): =====RIGHT====<br />
06-05 23:34:28.233: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.248: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.272: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.287: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.303: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.319: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.334: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.350: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.373: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.389: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.404: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.420: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.436: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.451: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.467: D/sensor(16205): =====STOP====<br />
06-05 23:34:28.490: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.506: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.506: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.522: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.537: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.553: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.576: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.592: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.608: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.623: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.639: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.654: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.678: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.694: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.709: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.733: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.740: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.756: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.779: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.795: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.811: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.826: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.842: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.858: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.881: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.881: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.897: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.912: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.928: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.944: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.959: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.983: D/sensor(16205): =====LEFT====<br />
06-05 23:34:28.998: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.014: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.029: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.045: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.069: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.084: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.100: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.115: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.131: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.147: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.170: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.186: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.186: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.217: D/sensor(16205): =====LEFT====<br />
06-05 23:34:29.217: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.233: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.248: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.264: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.279: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.295: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.311: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.326: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.342: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.365: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.381: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.397: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.412: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.428: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.444: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.459: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.467: D/dalvikvm(16313): GC_CONCURRENT freed 197K, 3% free 12861K/13127K, paused 2ms+3ms<br />
06-05 23:34:29.475: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.490: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.506: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.522: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.537: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.553: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.592: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.608: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.623: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.639: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.654: D/sensor(16205): =====DOWN====<br />
06-05 23:34:29.678: D/sensor(16205): =====DOWN====<br />
06-05 23:34:29.694: D/sensor(16205): =====DOWN====<br />
06-05 23:34:29.709: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.725: D/sensor(16205): =====DOWN====<br />
06-05 23:34:29.740: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.764: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.779: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.795: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.811: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.826: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.842: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.850: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.865: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.881: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.897: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.912: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.928: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.944: D/sensor(16205): =====STOP====<br />
06-05 23:34:29.959: D/sensor(16205): =====DOWN====<br />
06-05 23:34:29.983: D/sensor(16205): =====DOWN====<br />
06-05 23:34:29.998: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.014: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.029: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.045: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.069: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.084: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.115: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.131: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.147: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.170: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.186: D/sensor(16205): =====DOWN====<br />
06-05 23:34:30.201: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.217: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.217: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.233: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.248: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.272: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.287: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.303: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.319: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.342: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.350: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.373: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.389: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.404: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.420: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.436: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.459: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.475: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.490: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.506: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.522: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.537: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.561: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.561: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.576: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.592: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.608: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.623: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.639: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.654: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.678: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.694: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.709: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.725: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.740: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.764: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.779: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.795: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.811: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.826: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.842: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.865: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.881: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.897: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.897: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.912: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.928: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.951: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.967: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.983: D/sensor(16205): =====STOP====<br />
06-05 23:34:30.998: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.014: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.029: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.045: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.069: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.084: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.100: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.123: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.131: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.147: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.170: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.186: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.201: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.217: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.233: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.240: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.248: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.272: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.287: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.303: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.319: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.334: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.358: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.373: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.389: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.404: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.420: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.436: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.451: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.475: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.490: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.506: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.522: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.537: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.553: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.576: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.576: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.592: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.608: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.623: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.639: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.662: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.678: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.694: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.709: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.725: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.740: D/sensor(16205): =====STOP====<br />
06-05 23:34:31.764: D/sensor(16205): =====STOP====<br />
```
It work's as expected and doesn't hang or force close. When I add the playsound function is when it closes. That log is here:

I cleaned it up a bit (there were a lot of repeats and the log was HUGE) looks like the accelerometer updates ever millisecond?


```
<br />
06-05 23:49:33.967: D/sensor(16484): =====UP====<br />
06-05 23:49:33.967: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:33.967: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:33.983: D/sensor(16484): =====UP====<br />
06-05 23:49:33.983: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:33.983: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:34.014: D/sensor(16484): =====UP====<br />
06-05 23:49:34.014: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:34.014: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:34.022: W/ActivityManager(183): Launch timeout has expired, giving up wake lock!<br />
06-05 23:49:34.029: D/sensor(16484): =====UP====<br />
06-05 23:49:34.029: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:34.029: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:34.045: D/sensor(16484): =====UP====<br />
06-05 23:49:34.045: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:34.045: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:34.045: W/ActivityManager(183): Activity idle timeout for ActivityRecord{41a59f70 robot.test/.UseAccel}<br />
06-05 23:49:34.061: D/sensor(16484): =====UP====<br />
06-05 23:49:34.061: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:34.061: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:34.069: D/sensor(16484): =====UP====<br />
06-05 23:49:34.069: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:34.069: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:34.084: D/sensor(16484): =====UP====<br />
06-05 23:49:34.084: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:36.061: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:36.061: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:36.076: D/sensor(16484): =====UP====<br />
06-05 23:49:36.076: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:36.076: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:36.084: D/sensor(16484): =====UP====<br />
06-05 23:49:36.084: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:36.084: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:36.100: D/sensor(16484): =====UP====<br />
06-05 23:49:36.100: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:47.381: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:47.412: D/sensor(16484): =====RIGHT====<br />
06-05 23:49:47.412: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:47.412: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:47.451: D/sensor(16484): =====RIGHT====<br />
06-05 23:49:56.053: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:56.084: D/sensor(16484): =====LEFT====<br />
06-05 23:49:56.084: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:56.084: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:56.108: D/sensor(16484): =====LEFT====<br />
06-05 23:49:56.108: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:56.108: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:56.115: D/dalvikvm(19197): GC_CONCURRENT freed 170K, 2% free 12891K/13127K, paused 3ms+3ms<br />
06-05 23:49:56.123: D/sensor(16484): =====LEFT====<br />
06-05 23:49:56.123: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:56.123: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:56.147: D/sensor(16484): =====LEFT====<br />
06-05 23:49:56.147: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:56.147: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:56.162: D/sensor(16484): =====LEFT====<br />
06-05 23:49:56.162: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:56.162: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.014: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.014: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.014: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.029: D/dalvikvm(19197): GC_CONCURRENT freed 195K, 3% free 13193K/13511K, paused 3ms+3ms<br />
06-05 23:49:57.029: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.029: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.029: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.029: D/androidNetworkLocationListeners(324): Still have listener com.[email protected]416cdee8<br />
06-05 23:49:57.045: D/androidNetworkLocationListeners(324): Still have listener com.[email protected]416cdee8<br />
06-05 23:49:57.045: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.045: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.045: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.061: D/WifiLocator(324): Too many no-location APs. Will not compute a location nor go to the server. hasLocation=0 noLocation=0 cacheMiss=0<br />
06-05 23:49:57.069: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.069: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.069: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.084: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.084: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.084: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.108: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.108: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.108: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.115: E/(19197): Failed to open command storage<br />
06-05 23:49:57.115: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.115: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.240: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.256: D/dalvikvm(183): GC_EXPLICIT freed 794K, 18% free 21071K/25415K, paused 26ms+8ms<br />
06-05 23:49:57.256: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.256: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.256: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.272: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.272: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:57.272: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:57.279: D/sensor(16484): =====LEFT====<br />
06-05 23:49:57.279: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:58.279: D/sensor(16484): =====LEFT====<br />
06-05 23:49:58.279: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:58.279: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:58.295: D/sensor(16484): =====LEFT====<br />
06-05 23:49:58.295: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:58.295: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:58.303: E/(19197): Failed to read id String<br />
06-05 23:49:58.311: D/sensor(16484): =====LEFT====<br />
06-05 23:49:58.311: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:58.311: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:58.319: D/sensor(16484): =====LEFT====<br />
06-05 23:49:58.319: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:58.319: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:58.334: D/dalvikvm(19197): GC_CONCURRENT freed 331K, 4% free 13341K/13767K, paused 3ms+3ms<br />
06-05 23:49:58.334: D/sensor(16484): =====LEFT====<br />
06-05 23:49:58.334: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:49:58.334: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:49:58.350: D/sensor(16484): =====LEFT====<br />
06-05 23:49:58.350: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.451: D/sensor(16484): =====STOP====<br />
06-05 23:50:01.451: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.451: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:01.475: D/sensor(16484): =====UP====<br />
06-05 23:50:01.475: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.475: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:01.483: I/InputDispatcher(183): Dropped event because the current application is not responding and the user has started interacting with a different application.<br />
06-05 23:50:01.483: I/InputDispatcher(183): Dropped event because the current application is not responding and the user has started interacting with a different application.<br />
06-05 23:50:01.483: I/InputDispatcher(183): Dropped event because the current application is not responding and the user has started interacting with a different application.<br />
06-05 23:50:01.483: I/InputDispatcher(183): Dropped event because the current application is not responding and the user has started interacting with a different application.<br />
06-05 23:50:01.522: D/sensor(16484): =====LEFT====<br />
06-05 23:50:01.522: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.522: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:01.545: D/sensor(16484): =====LEFT====<br />
06-05 23:50:01.545: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.553: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:01.592: D/sensor(16484): =====UP====<br />
06-05 23:50:01.592: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.592: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:01.631: D/sensor(16484): =====UP====<br />
06-05 23:50:01.631: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:01.631: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:01.654: D/sensor(16484): =====UP====<br />
06-05 23:50:01.654: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.358: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.358: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.358: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.373: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.373: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.373: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.389: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.389: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.389: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.428: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.428: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.428: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.459: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.459: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.459: W/AudioCache(118): Battery track warning: refCount is already 0<br />
**Starts not responding?**<br />
06-05 23:50:06.490: I/InputDispatcher(183): Application is not responding: AppWindowToken{41edf940 token=Token{41bcb240 ActivityRecord{41a59f70 robot.test/.UseAccel}}} - Window{41cda0c0 robot.test/robot.test.UseAccel paused=false}.  5005.6ms since event, 5001.0ms since wait started<br />
06-05 23:50:06.490: I/WindowManager(183): Input event dispatching timed out sending to robot.test/robot.test.UseAccel<br />
06-05 23:50:06.498: I/Process(183): Sending signal. PID: 16484 SIG: 3<br />
06-05 23:50:06.498: I/dalvikvm(16484): threadid=3: reacting to signal 3<br />
06-05 23:50:06.514: I/dalvikvm(16484): Wrote stack traces to '/data/anr/traces.txt'<br />
06-05 23:50:06.514: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.514: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.514: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.514: I/Process(183): Sending signal. PID: 183 SIG: 3<br />
06-05 23:50:06.514: I/dalvikvm(183): threadid=3: reacting to signal 3<br />
06-05 23:50:06.537: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.537: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.537: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.561: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.561: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.561: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.561: I/dalvikvm(183): Wrote stack traces to '/data/anr/traces.txt'<br />
06-05 23:50:06.569: I/Process(183): Sending signal. PID: 382 SIG: 3<br />
06-05 23:50:06.569: I/dalvikvm(382): threadid=3: reacting to signal 3<br />
06-05 23:50:06.576: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.576: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.576: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.584: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.584: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.584: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.592: I/dalvikvm(382): Wrote stack traces to '/data/anr/traces.txt'<br />
06-05 23:50:06.592: I/Process(183): Sending signal. PID: 264 SIG: 3<br />
06-05 23:50:06.592: I/dalvikvm(264): threadid=3: reacting to signal 3<br />
06-05 23:50:06.600: I/dalvikvm(264): Wrote stack traces to '/data/anr/traces.txt'<br />
06-05 23:50:06.600: I/Process(183): Sending signal. PID: 392 SIG: 3<br />
06-05 23:50:06.600: I/dalvikvm(392): threadid=3: reacting to signal 3<br />
06-05 23:50:06.608: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.608: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.608: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.608: I/dalvikvm(392): Wrote stack traces to '/data/anr/traces.txt'<br />
06-05 23:50:06.608: I/Process(183): Sending signal. PID: 401 SIG: 3<br />
06-05 23:50:06.608: I/dalvikvm(401): threadid=3: reacting to signal 3<br />
06-05 23:50:06.623: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.623: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.623: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.623: I/dalvikvm(401): Wrote stack traces to '/data/anr/traces.txt'<br />
06-05 23:50:06.639: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.639: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.647: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.662: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.662: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.662: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.678: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.678: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.850: W/ActivityManager(183): Activity idle timeout for ActivityRecord{41a59f70 robot.test/.UseAccel}<br />
06-05 23:50:06.865: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.865: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.865: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.881: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.881: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.881: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.889: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.889: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.889: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.904: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.904: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.904: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.920: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.920: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.920: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.928: D/dalvikvm(183): GC_EXPLICIT freed 2224K, 21% free 20134K/25415K, paused 2ms+6ms<br />
06-05 23:50:06.928: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.928: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.928: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.936: W/ProcessStats(183): Skipping unknown process pid 20272<br />
06-05 23:50:06.944: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.944: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:06.944: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:06.959: D/sensor(16484): =====STOP====<br />
06-05 23:50:06.959: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:07.506: E/ActivityManager(183): ANR in robot.test (robot.test/.UseAccel)<br />
06-05 23:50:07.506: E/ActivityManager(183): Reason: keyDispatchingTimedOut<br />
06-05 23:50:07.506: E/ActivityManager(183): Load: 0.17 / 0.19 / 0.2<br />
06-05 23:50:07.506: E/ActivityManager(183): CPU usage from 12103ms to 2137ms ago:<br />
06-05 23:50:07.506: E/ActivityManager(183):   79% 118/mediaserver: 25% user + 53% kernel / faults: 1677 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   13% 16484/robot.test: 10% user + 3.8% kernel / faults: 127 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   8% 183/system_server: 4.1% user + 3.9% kernel / faults: 434 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   5.4% 117/drmserver: 2.2% user + 3.2% kernel / faults: 447 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   4.3% 126/adbd: 0.7% user + 3.6% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   2.1% 15846/logcat: 1.1% user + 1% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.5% 264/com.android.systemui: 0.4% user + 0.1% kernel / faults: 60 minor 1 major<br />
06-05 23:50:07.506: E/ActivityManager(183):   1.4% 16263/kworker/0:2: 0% user + 1.4% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   1.3% 107/servicemanager: 0.6% user + 0.7% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.5% 22/kinteractiveup: 0% user + 0.5% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.5% 15866/kworker/1:1: 0% user + 0.5% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 86/mmcqd/0: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.3% 115/surfaceflinger: 0.1% user + 0.2% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 116/zygote: 0% user + 0% kernel / faults: 117 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 401/com.android.nfc: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 181/irq/320-modem_u: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 324/com.google.process.gapps: 0% user + 0% kernel / faults: 20 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.2% 382/com.android.phone: 0.2% user + 0% kernel / faults: 8 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 429/com.android.launcher: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.2% 15430/kworker/u:4: 0% user + 0.2% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.2% 16382/kworker/u:0: 0% user + 0.2% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0.2% 16383/kworker/u:1: 0% user + 0.2% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 114/rild: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 4994/com.google.android.apps.maps:LocationFriendService: 0% user + 0% kernel / faults: 4 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 15778/netd: 0% user + 0% kernel / faults: 48 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):   0% 15942/com.samsung.syncservice: 0% user + 0% kernel / faults: 13 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):  +0% 19197/com.aws.android: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):  +0% 19567/com.android.bip: 0% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183): 64% TOTAL: 26% user + 36% kernel + 0.7% iowait + 0% softirq<br />
06-05 23:50:07.506: E/ActivityManager(183): CPU usage from 444ms to 962ms later:<br />
06-05 23:50:07.506: E/ActivityManager(183):   81% 118/mediaserver: 33% user + 47% kernel / faults: 75 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):	 35% 118/mediaserver: 18% user + 16% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 15% 165/Binder Thread #: 3.7% user + 11% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 13% 14688/Binder Thread #: 5.6% user + 7.5% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 11% 567/Binder Thread #: 3.7% user + 7.5% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 3.7% 164/AudioOut_1: 0% user + 3.7% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   12% 16484/robot.test: 9.2% user + 3.7% kernel / faults: 6 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):	 9.2% 16484/robot.test: 5.5% user + 3.7% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 16496/Binder Thread #: 1.8% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 16540/er$SensorThread: 1.8% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   11% 183/system_server: 3.7% user + 7.4% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 5.5% 223/InputDispatcher: 3.7% user + 1.8% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 3.7% 195/SensorService: 0% user + 3.7% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 13403/er$SensorThread: 0% user + 1.8% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   3.7% 117/drmserver: 3.7% user + 0% kernel / faults: 20 minor<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 161/Binder Thread #: 1.8% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 1428/Binder Thread #: 1.8% user + 0% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 1429/Binder Thread #: 0% user + 1.8% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   1.8% 126/adbd: 0% user + 1.8% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 3.7% 126/adbd: 0% user + 3.7% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):	 1.8% 13008/adbd: 0% user + 1.8% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183):   1.8% 15846/logcat: 0% user + 1.8% kernel<br />
06-05 23:50:07.506: E/ActivityManager(183): 58% TOTAL: 24% user + 33% kernel<br />
06-05 23:50:07.514: D/sensor(16484): =====STOP====<br />
06-05 23:50:07.514: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:07.514: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:07.514: W/InputDispatcher(183): Asynchronous input event injection timed out.<br />
06-05 23:50:07.529: D/sensor(16484): =====STOP====<br />
06-05 23:50:07.529: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:07.529: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:07.545: D/sensor(16484): =====STOP====<br />
06-05 23:50:07.545: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:07.545: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:07.561: D/sensor(16484): =====STOP====<br />
06-05 23:50:07.561: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:07.561: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:07.576: D/sensor(16484): =====STOP====<br />
06-05 23:50:07.576: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:07.576: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:07.592: D/sensor(16484): =====STOP====<br />
06-05 23:50:07.592: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.350: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.365: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.365: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.365: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.404: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.404: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.404: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.404: D/dalvikvm(4994): GC_EXPLICIT freed 141K, 6% free 13868K/14599K, paused 6ms+2ms<br />
06-05 23:50:08.420: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.420: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.420: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.436: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.436: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.436: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.451: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.451: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.451: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.451: D/dalvikvm(324): GC_EXPLICIT freed 144K, 5% free 14037K/14727K, paused 2ms+4ms<br />
06-05 23:50:08.467: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.467: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.467: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.483: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.483: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.483: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.498: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.498: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.498: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.514: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.514: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.514: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.529: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.529: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.529: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.545: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.545: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.545: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.576: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.576: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.576: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.615: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.615: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.615: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.647: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.647: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.647: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.686: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.686: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:08.686: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:08.717: D/sensor(16484): =====STOP====<br />
06-05 23:50:08.717: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:09.115: W/AudioCache(118): Battery track warning: refCount is already 0<br />
06-05 23:50:09.139: W/ActivityManager(183):   Force finishing activity robot.test/.UseAccel<br />
06-05 23:50:09.154: D/sensor(16484): =====STOP====<br />
06-05 23:50:09.154: I/System.out(16484): !!!!!PLAY SOUND<br />
06-05 23:50:09.154: W/AudioCache(118): Battery track warning: refCount is already 0<br />
**This is where it hangs and I force closed it after the prompt popped up**<br />
06-05 23:50:09.178: I/ActivityManager(183): Killing ProcessRecord{416c1b48 16484:robot.test/10073}: user's request<br />
06-05 23:50:09.201: I/ActivityManager(183): Process robot.test (pid 16484) has died.<br />
06-05 23:50:09.201: I/WindowManager(183): WIN DEATH: Window{41a6d070 robot.test/robot.test.RobottestActivity paused=false}<br />
06-05 23:50:09.209: I/WindowManager(183): WIN DEATH: Window{41cda0c0 robot.test/robot.test.UseAccel paused=true}<br />
06-05 23:50:09.217: D/dalvikvm(20448): Late-enabling CheckJNI<br />
06-05 23:50:09.225: I/ActivityManager(183): Start proc robot.test for activity robot.test/.RobottestActivity: pid=20448 uid=10073 gids={}<br />
06-05 23:50:09.334: D/dalvikvm(20448): GC_FOR_ALLOC freed 179K, 3% free 12814K/13127K, paused 17ms<br />
06-05 23:50:09.358: D/dalvikvm(20448): GC_FOR_ALLOC freed 81K, 4% free 12957K/13447K, paused 13ms<br />
06-05 23:50:09.358: I/dalvikvm-heap(20448): Grow heap (frag case) to 13.445MB for 767392-byte allocation<br />
06-05 23:50:09.381: D/dalvikvm(20448): GC_CONCURRENT freed <1K, 4% free 13707K/14215K, paused 2ms+2ms<br />
06-05 23:50:09.428: D/dalvikvm(20448): GC_FOR_ALLOC freed 0K, 4% free 13707K/14215K, paused 12ms<br />
06-05 23:50:09.428: I/dalvikvm-heap(20448): Grow heap (frag case) to 14.746MB for 1364240-byte allocation<br />
06-05 23:50:09.475: D/dalvikvm(20448): GC_CONCURRENT freed 0K, 4% free 15039K/15559K, paused 5ms+2ms<br />
06-05 23:50:09.529: D/dalvikvm(20448): GC_FOR_ALLOC freed 749K, 9% free 14292K/15559K, paused 14ms<br />
06-05 23:50:09.537: I/dalvikvm-heap(20448): Grow heap (frag case) to 14.748MB for 767392-byte allocation<br />
06-05 23:50:09.545: D/dalvikvm(20448): GC_CONCURRENT freed <1K, 4% free 15041K/15559K, paused 1ms+1ms<br />
06-05 23:50:09.584: D/dalvikvm(20448): GC_FOR_ALLOC freed 0K, 4% free 15041K/15559K, paused 10ms<br />
06-05 23:50:09.584: I/dalvikvm-heap(20448): Grow heap (frag case) to 16.048MB for 1364240-byte allocation<br />
06-05 23:50:09.600: D/dalvikvm(20448): GC_FOR_ALLOC freed 0K, 4% free 16373K/16903K, paused 10ms<br />
06-05 23:50:09.608: D/dalvikvm(20448): GC_CONCURRENT freed 0K, 4% free 16374K/16903K, paused 1ms+1ms<br />
06-05 23:50:09.678: D/dalvikvm(20448): GC_FOR_ALLOC freed 749K, 8% free 16377K/17671K, paused 11ms<br />
06-05 23:50:09.686: I/dalvikvm-heap(20448): Grow heap (frag case) to 17.355MB for 1366576-byte allocation<br />
06-05 23:50:09.694: D/dalvikvm(20448): GC_FOR_ALLOC freed <1K, 7% free 17711K/19015K, paused 11ms<br />
06-05 23:50:09.709: D/dalvikvm(20448): GC_CONCURRENT freed 0K, 7% free 17712K/19015K, paused 1ms+1ms<br />
06-05 23:50:09.733: D/dalvikvm(20448): GC_FOR_ALLOC freed 751K, 11% free 16962K/19015K, paused 12ms<br />
06-05 23:50:09.733: I/dalvikvm-heap(20448): Grow heap (frag case) to 17.960MB for 1401616-byte allocation<br />
06-05 23:50:09.756: D/dalvikvm(20448): GC_CONCURRENT freed <1K, 11% free 18331K/20423K, paused 2ms+2ms<br />
06-05 23:50:09.795: D/dalvikvm(20448): GC_FOR_ALLOC freed 0K, 11% free 18331K/20423K, paused 10ms<br />
06-05 23:50:09.795: I/dalvikvm-heap(20448): Grow heap (frag case) to 20.337MB for 2492816-byte allocation<br />
06-05 23:50:09.811: D/dalvikvm(20448): GC_FOR_ALLOC freed 0K, 10% free 20765K/22919K, paused 12ms<br />
06-05 23:50:09.826: D/dalvikvm(20448): GC_CONCURRENT freed 0K, 10% free 20766K/22919K, paused 1ms+2ms<br />
06-05 23:50:09.897: D/dalvikvm(20448): GC_FOR_ALLOC freed 1369K, 13% free 20150K/22919K, paused 11ms<br />
06-05 23:50:10.014: D/libEGL(20448): loaded /system/lib/egl/libGLES_android.so<br />
06-05 23:50:10.022: D/dalvikvm(20448): GC_CONCURRENT freed 1120K, 9% free 20968K/22919K, paused 2ms+7ms<br />
06-05 23:50:10.022: D/libEGL(20448): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so<br />
06-05 23:50:10.029: D/libEGL(20448): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so<br />
06-05 23:50:10.037: D/libEGL(20448): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so<br />
06-05 23:50:10.139: D/OpenGLRenderer(20448): Enabling debug mode 0<br />
06-05 23:50:10.139: W/InputManagerService(183): Got RemoteException sending setActive(false) notification to pid 16484 uid 10073<br />
06-05 23:50:10.381: I/ActivityManager(183): Displayed robot.test/.RobottestActivity: +1s170ms<br />
06-05 23:50:12.037: D/androidNetworkLocationListeners(324): Still have listener com.[email protected]416cdee8<br />
06-05 23:50:12.053: D/WifiLocator(324): Too many no-location APs. Will not compute a location nor go to the server. hasLocation=0 noLocation=0 cacheMiss=0<br />
06-05 23:50:12.248: D/dalvikvm(19197): GC_CONCURRENT freed 439K, 4% free 13402K/13959K, paused 5ms+6ms<br />
```


----------



## dl_evans (Dec 13, 2011)

Well using what I learned the last time you helped me (Async Tasks) I got it working. No force closes or anything. I don't have the robot with me at the moment (I'm at work) so we'll see how well it works when I get home. By chance do you have any experience with Action Bar Sherlock? http://actionbarsherlock.com/ Something new has gone weird and it's related to ABS. (I think).


----------



## JBirdVegas (Jun 11, 2011)

dl_evans said:


> Well using what I learned the last time you helped me (Async Tasks) I got it working. No force closes or anything. I don't have the robot with me at the moment (I'm at work) so we'll see how well it works when I get home. By chance do you have any experience with Action Bar Sherlock? http://actionbarsherlock.com/ Something new has gone weird and it's related to ABS. (I think).


Haha well good but I don't feel like I helped.

I've never user Sherlock Action bar but I'm curious now!

Sent from my Galaxy Nexus using Tapatalk 2


----------



## dl_evans (Dec 13, 2011)

ActionBarSherlock is a must. It somehow (magic?) puts the Action Bar (Android 3.0+) onto 2.1 apps. And it's so easy to use (I figured it out! ha ha)

As far as my new dilemma feel like I've got everything working it's just that accelerometer updates way to quickly and so the robot doesn't have time to react to the blinking led before the next sound plays. So instead of "go forward, stop, go back, stop" it just sees "zOMGgoforwardGOBACKstopGOahhhhhhhhhhhh" does that make any sense? I can make a video or something if it would help.

I'd like this code:

```
<br />
if(x > 4.0000){<br />
			 Log.d("sensor", "=====LEFT====");<br />
			 direction.setText("LEFT");<br />
			 command = 4;<br />
			 new play().execute();<br />
		 }<br />
```
to just play the audio once.

so it'd be like this (just jotting an idea down... i'll test it later)


```
<br />
if(x > 4.0000){<br />
				    newDirection = "LEFT";<br />
			 Log.d("sensor", "=====LEFT====");<br />
			 direction.setText("LEFT");<br />
			 command = 4;<br />
			 new play().execute();<br />
				    checkDirection();<br />
		 }<br />
newDirection(){<br />
if(currentDirection != newDirection){<br />
mp.stop;<br />
}<br />
else(newDirection = currentDirection);<br />
}<br />
```


----------



## JBirdVegas (Jun 11, 2011)

Simple solution...

Look at using Runnables specifically postDelayed(Runnable, int) just call it on a Handler. I'd be happy to provide a more in-depth answer but it will have to wait till after this crazy upcoming weekend.


----------



## dl_evans (Dec 13, 2011)

I'll give it a try. My weekend will be busy as well. 12 hour work days... I'll give it a go and we'll meet back on Monday.


----------

