Thanks, looks like I'm not going inasane...

Does anyone else have a Samsung Galaxy and can try this?

On Dec 6, 4:52 pm, Lance Nanek <[email protected]> wrote:
> T-Mobile G1:
>
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=79
> V/SensorEvent( 2054): Time=159
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=39
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=59
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=60
> V/SensorEvent( 2054): Time=40
> V/SensorEvent( 2054): Time=58
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=39
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=21
> V/SensorEvent( 2054): Time=17
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=60
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=18
> V/SensorEvent( 2054): Time=20
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=19
> V/SensorEvent( 2054): Time=59
> V/SensorEvent( 2054): Time=39
> V/SensorEvent( 2054): Time=59
> V/SensorEvent( 2054): Time=79
> V/SensorEvent( 2054): Time=100
>
> On Dec 6, 6:09 am, TonyDoc <[email protected]> wrote:
>
> > Hi,
>
> > Could someone try the sample source for me on their device? I think it
> > may be hardware related, I'm developing on a Samsung Galaxy.
>
> > I get this output.
>
> > 12-06 11:04:01.337: VERBOSE/SensorEvent(27604): Time=213
> > 12-06 11:04:01.547: VERBOSE/SensorEvent(27604): Time=211
> > 12-06 11:04:01.767: VERBOSE/SensorEvent(27604): Time=212
> > 12-06 11:04:01.977: VERBOSE/SensorEvent(27604): Time=211
> > 12-06 11:04:02.187: VERBOSE/SensorEvent(27604): Time=214
> > 12-06 11:04:02.427: VERBOSE/SensorEvent(27604): Time=237
> > 12-06 11:04:02.657: VERBOSE/SensorEvent(27604): Time=226
> > 12-06 11:04:02.857: VERBOSE/SensorEvent(27604): Time=207
> > 12-06 11:04:03.077: VERBOSE/SensorEvent(27604): Time=216
> > 12-06 11:04:03.287: VERBOSE/SensorEvent(27604): Time=212
> > 12-06 11:04:03.497: VERBOSE/SensorEvent(27604): Time=212
> > 12-06 11:04:03.707: VERBOSE/SensorEvent(27604): Time=210
> > 12-06 11:04:03.927: VERBOSE/SensorEvent(27604): Time=211
> > 12-06 11:04:04.557: VERBOSE/SensorEvent(27604): Time=214
> > 12-06 11:04:04.967: VERBOSE/SensorEvent(27604): Time=413
>
> > Thanks
>
> > On Nov 30, 3:03 pm, TonyDoc <[email protected]> wrote:
>
> > > Here is the sample code
>
> > > package com.example.example;
>
> > > import android.app.Activity;
> > > import android.hardware.Sensor;
> > > import android.hardware.SensorEvent;
> > > import android.hardware.SensorEventListener;
> > > import android.hardware.SensorManager;
> > > import android.os.Bundle;
> > > import android.util.Log;
> > > import android.view.View;
> > > import android.view.View.OnClickListener;
>
> > > public class CopyOfTimedRun_Timer extends Activity implements
> > > OnClickListener, SensorEventListener {
>
> > >     SensorManager mSensorManager;
> > >     long lastTime;
>
> > >     @Override
> > >     protected void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
> > >         mSensorManager = (SensorManager) getSystemService
> > > (SENSOR_SERVICE);
> > >         mSensorManager.registerListener
> > > (this,mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
> > > SensorManager.SENSOR_DELAY_FASTEST);
> > >         setContentView(R.layout.main);
> > >     }
>
> > >     @Override
> > >     public void onSensorChanged(SensorEvent event) {
> > >         if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){
> > >             Log.v("SensorEvent", "Time="+(System.currentTimeMillis()-
> > > lastTime));
> > >         }
> > >         lastTime = System.currentTimeMillis();
> > >     }
>
> > >     @Override
> > >     public void onAccuracyChanged(Sensor sensor, int accuracy) {}
>
> > >     @Override
> > >     public void onClick(View v) {}
>
> > > }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to