[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-30 Thread TonyDoc
Arrived, Scotland.

Thanks google

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


[android-developers] Re: Power event

2010-03-08 Thread TonyDoc
I do something like this

private static BroadcastReceiver batteryInfo = new BroadcastReceiver()
{
 @Override
 public void onReceive(Context context, Intent intent) {
  String action = intent.getAction();
  if(Intent.ACTION_BATTERY_CHANGED.equals(action)) {
   int level = intent.getIntExtra(level, 0);
   int scale = intent.getIntExtra(scale, 100);
   int plugged = intent.getIntExtra(plugged, 0);
   int batteryLevel = level * 100 / scale;
   .
   .
   .
  }
 }
}

the value of 'plugged' indicates whether the phone is on charge or
not. Normally a 2 indicates that the phone is on charge.

Regards

On Mar 8, 5:31 pm, Paul paulcalvinkenn...@gmail.com wrote:
 What is the event that tells me when the Android device is hooked up
 to a power plug?  I need to know what to monitor to know when the
 system goes from battery to charging and vice versa.

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


[android-developers] How to shut down phone from within an Application?

2010-02-26 Thread TonyDoc
Is there anyway I can shut down the phone from my app without the need
for user confirmation?

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


[android-developers] Re: Apps not appearing in market place on certain phones

2010-02-14 Thread TonyDoc
Bumpy de bump

On Feb 3, 10:42 pm, TonyDoc tony...@gmail.com wrote:
 [ro.build.description]: [U8220-user 1.5 CRB17 20091126.110223 ota-rel-
 keys,relea
 se-keys]
 [ro.build.fingerprint]: [T-Mobile/U8220/U8220/U8220:1.5/
 CRB17/20091126.110223:us
 er/ota-rel-keys,release-keys]

 On Jan 24, 9:13 pm, TonyDoc tony...@gmail.com wrote:

  Hi Dave,

  I was unaware that some providers are specifically blocking protected
  apps, should they not be required to advertise this fact to allow folk
  to make a better informed decision when purchasing a phone from them?
  Would a solution be to ask t-mobile to unlock the phone due to these
  unadvertised restrictions, and then move to a different network
  provider?

  Also, my hero is on the Orange UK network. That seems to work fine.

  On Jan 24, 9:01 pm, Dave Gracie david.gra...@gmail.com wrote:

   I had the same issue when releasing one of my applications, the app didnt
   appear on the Orange UK network.

   This was, as TonyDoc referred to, due to the app being protected. There 
   is a
   link somewhere on the android site showing all providers who allow 
   protected
   applications. I was not aware of this being phone specific however.

   Dave

   2010/1/24 Yuvi yuvidr...@gmail.com

They same happened to me, but with HTC Tatoo (no showing some apps) vs 
HTC
Hero and Magic...

On Sun, Jan 24, 2010 at 11:20 AM, TonyDoc tony...@gmail.com wrote:

My family has got three android phones, an HTC Hero, a Samsung Galaxy,
and a T-MobilePulse, all are running android 1.5 with the latest
manufacturer firmware.
On the T-MobilePulse, when searching for a couple of apps (ones that
I have installed on the other two devices), I get returned 'no
matches'. For example, if I search for 'BrightAI', which is a
developer who has around 8 apps on themarket, I get no matches. If I
search for individual apps, I get 'no matches'. Searching for the same
on either the Hero or Galaxy returns the expected results.
Does anyone have any ideas why certain apps are accessible on one
device, but not the other?
Thanks

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 
android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

 --
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en



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


[android-developers] How to check if the phone is in Standby from a service?

2010-02-11 Thread TonyDoc
Anyone know how my service can check if the phone is currently in
standby mode?
And if I can trigger an event within my service when the phone comes
out of standby mode...

Thanks

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


[android-developers] Re: How to check if the phone is in Standby from a service?

2010-02-11 Thread TonyDoc
This seems to work great...

Thanks very much.

On Feb 11, 9:07 pm, JP joachim.pfeif...@gmail.com wrote:
 I am following standby mode by catching SCREEN_ON / SCREEN_OFF
 broadcasts.
 We've had a thread about this, 
 here:http://groups.google.com/group/android-developers/browse_thread/threa...

 On Feb 11, 11:21 am, TonyDoc tony...@gmail.com wrote:

  Anyone know how my service can check if the phone is currently in
  standby mode?
  And if I can trigger an event within my service when the phone comes
  out of standby mode...

  Thanks



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


[android-developers] Re: Apps not appearing in market place on certain phones

2010-02-03 Thread TonyDoc
Sorry for the delay dan, my daughter took the phone on holiday with
her...

Here is the info you asked for, thanks again for the help.

[ro.build.description]: [U8220-user 1.5 CRB17 20091126.110223 ota-rel-
keys,release-keys]
[ro.build.fingerprint]: [T-Mobile/U8220/U8220/U8220:1.5/
CRB17/20091126.110223:user/ota-rel-keys,release-keys]

On Jan 25, 11:24 pm, dan raaka danra...@gmail.com wrote:
 Can you post the build fingerprint of the device that is NOT showing the
 app?
 $ adb shell getprop | grep fingerprint

 -Dan

 On Sun, Jan 24, 2010 at 1:13 PM, TonyDoc tony...@gmail.com wrote:
  Hi Dave,

  I was unaware that some providers are specifically blocking protected
  apps, should they not be required to advertise this fact to allow folk
  to make a better informed decision when purchasing a phone from them?
  Would a solution be to ask t-mobile to unlock the phone due to these
  unadvertised restrictions, and then move to a different network
  provider?

  Also, my hero is on the Orange UK network. That seems to work fine.

  On Jan 24, 9:01 pm, Dave Gracie david.gra...@gmail.com wrote:
   I had the same issue when releasing one of my applications, the app didnt
   appear on the Orange UK network.

   This was, as TonyDoc referred to, due to the app being protected. There
  is a
   link somewhere on the android site showing all providers who allow
  protected
   applications. I was not aware of this being phone specific however.

   Dave

   2010/1/24 Yuvi yuvidr...@gmail.com

They same happened to me, but with HTC Tatoo (no showing some apps) vs
  HTC
Hero and Magic...

On Sun, Jan 24, 2010 at 11:20 AM, TonyDoc tony...@gmail.com wrote:

My family has got three android phones, an HTC Hero, a Samsung Galaxy,
and a T-Mobile Pulse, all are running android 1.5 with the latest
manufacturer firmware.
On the T-Mobile Pulse, when searching for a couple of apps (ones that
I have installed on the other two devices), I get returned 'no
matches'. For example, if I search for 'BrightAI', which is a
developer who has around 8 apps on the market, I get no matches. If I
search for individual apps, I get 'no matches'. Searching for the same
on either the Hero or Galaxy returns the expected results.
Does anyone have any ideas why certain apps are accessible on one
device, but not the other?
Thanks

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

 --
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

     For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



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


[android-developers] Re: Apps not appearing in market place on certain phones

2010-02-03 Thread TonyDoc
[ro.build.description]: [U8220-user 1.5 CRB17 20091126.110223 ota-rel-
keys,relea
se-keys]
[ro.build.fingerprint]: [T-Mobile/U8220/U8220/U8220:1.5/
CRB17/20091126.110223:us
er/ota-rel-keys,release-keys]

On Jan 24, 9:13 pm, TonyDoc tony...@gmail.com wrote:
 Hi Dave,

 I was unaware that some providers are specifically blocking protected
 apps, should they not be required to advertise this fact to allow folk
 to make a better informed decision when purchasing a phone from them?
 Would a solution be to ask t-mobile to unlock the phone due to these
 unadvertised restrictions, and then move to a different network
 provider?

 Also, my hero is on the Orange UK network. That seems to work fine.

 On Jan 24, 9:01 pm, Dave Gracie david.gra...@gmail.com wrote:

  I had the same issue when releasing one of my applications, the app didnt
  appear on the Orange UK network.

  This was, as TonyDoc referred to, due to the app being protected. There is a
  link somewhere on the android site showing all providers who allow protected
  applications. I was not aware of this being phone specific however.

  Dave

  2010/1/24 Yuvi yuvidr...@gmail.com

   They same happened to me, but with HTC Tatoo (no showing some apps) vs HTC
   Hero and Magic...

   On Sun, Jan 24, 2010 at 11:20 AM, TonyDoc tony...@gmail.com wrote:

   My family has got three android phones, an HTC Hero, a Samsung Galaxy,
   and a T-MobilePulse, all are running android 1.5 with the latest
   manufacturer firmware.
   On the T-MobilePulse, when searching for a couple of apps (ones that
   I have installed on the other two devices), I get returned 'no
   matches'. For example, if I search for 'BrightAI', which is a
   developer who has around 8 apps on themarket, I get no matches. If I
   search for individual apps, I get 'no matches'. Searching for the same
   on either the Hero or Galaxy returns the expected results.
   Does anyone have any ideas why certain apps are accessible on one
   device, but not the other?
   Thanks

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

    --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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


[android-developers] Apps not appearing in market place on certain phones

2010-01-24 Thread TonyDoc
My family has got three android phones, an HTC Hero, a Samsung Galaxy,
and a T-Mobile Pulse, all are running android 1.5 with the latest
manufacturer firmware.
On the T-Mobile Pulse, when searching for a couple of apps (ones that
I have installed on the other two devices), I get returned 'no
matches'. For example, if I search for 'BrightAI', which is a
developer who has around 8 apps on the market, I get no matches. If I
search for individual apps, I get 'no matches'. Searching for the same
on either the Hero or Galaxy returns the expected results.
Does anyone have any ideas why certain apps are accessible on one
device, but not the other?
Thanks

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


[android-developers] Re: Apps not appearing in market place on certain phones

2010-01-24 Thread TonyDoc
It seems like the apps that are missing are ALL protected apps, Seems
like google has not yet white listed the T-Mobile Pulse for use in the
market? I've had the phone for nearly three months now. Does it take
that long to white list a phone? Who should I contact? Google directly
or T-Mobile?

On Jan 24, 10:20 am, TonyDoc tony...@gmail.com wrote:
 My family has got three android phones, an HTC Hero, a Samsung Galaxy,
 and a T-Mobile Pulse, all are running android 1.5 with the latest
 manufacturer firmware.
 On the T-Mobile Pulse, when searching for a couple of apps (ones that
 I have installed on the other two devices), I get returned 'no
 matches'. For example, if I search for 'BrightAI', which is a
 developer who has around 8 apps on the market, I get no matches. If I
 search for individual apps, I get 'no matches'. Searching for the same
 on either the Hero or Galaxy returns the expected results.
 Does anyone have any ideas why certain apps are accessible on one
 device, but not the other?
 Thanks

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


[android-developers] Re: Apps not appearing in market place on certain phones

2010-01-24 Thread TonyDoc
Hi Dave,

I was unaware that some providers are specifically blocking protected
apps, should they not be required to advertise this fact to allow folk
to make a better informed decision when purchasing a phone from them?
Would a solution be to ask t-mobile to unlock the phone due to these
unadvertised restrictions, and then move to a different network
provider?

Also, my hero is on the Orange UK network. That seems to work fine.

On Jan 24, 9:01 pm, Dave Gracie david.gra...@gmail.com wrote:
 I had the same issue when releasing one of my applications, the app didnt
 appear on the Orange UK network.

 This was, as TonyDoc referred to, due to the app being protected. There is a
 link somewhere on the android site showing all providers who allow protected
 applications. I was not aware of this being phone specific however.

 Dave

 2010/1/24 Yuvi yuvidr...@gmail.com

  They same happened to me, but with HTC Tatoo (no showing some apps) vs HTC
  Hero and Magic...

  On Sun, Jan 24, 2010 at 11:20 AM, TonyDoc tony...@gmail.com wrote:

  My family has got three android phones, an HTC Hero, a Samsung Galaxy,
  and a T-Mobile Pulse, all are running android 1.5 with the latest
  manufacturer firmware.
  On the T-Mobile Pulse, when searching for a couple of apps (ones that
  I have installed on the other two devices), I get returned 'no
  matches'. For example, if I search for 'BrightAI', which is a
  developer who has around 8 apps on the market, I get no matches. If I
  search for individual apps, I get 'no matches'. Searching for the same
  on either the Hero or Galaxy returns the expected results.
  Does anyone have any ideas why certain apps are accessible on one
  device, but not the other?
  Thanks

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

   --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



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


[android-developers] Re: How to increase FPS (now ~20, desired ~40-50)

2010-01-22 Thread TonyDoc
using logcat to output you fps will reduce your fps.

On Jan 22, 6:37 am, Andre andranik.abra...@gmail.com wrote:
 Hi Jason,

 Thank you very much for test and code example

 Best Regards, Andre

 On 22 янв, 01:19, Jason Arora jaso...@gmail.com wrote:

  Hi Andre,

  I got around 60 fps without bullets on my Google Ion device. When
  touching the screen it would go around 53 and when shooting it would
  dip just under 40. Before doing my test, I closed all apps with Task
  Killer.

  You can remove the status bar by calling the following in your
  Activity.onCreate method:
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
  WindowManager.LayoutParams.FLAG_FULLSCREEN);

  -Jason

  On Jan 21, 6:09 am, Andre andranik.abra...@gmail.com wrote:

   Hi TonyDoc,

   I agree with you, recently I've started to study Open GL ES...
   But I think it worth to know, what limitations exist for Canvas? And
   what kind of games can be implemented with Canvas? As we know, thanks
   to google, simple 2D games like Snake, Tetris and so on, can be
   created without Open GL ES.

   Best Regards, Andre

   On 21 ÑÎ×, 16:07, TonyDoc tony...@gmail.com wrote:

Hi all, interesting thread, here's my tuppenceworth.

My first attempt at a simple game took the same approach, things
looked favourable when I first threw a few dozen sprites onto the
canvas along with some simple game logic to try and get a handle on
fps and timing. I was getting around 40-45fps which I was happy with,
as my goal was around 30fps for the final game. I then added matrix
transformations to the sprites (scaling and/or rotating) and bang!
20-25fps... I fiddled some more for a while then gave up. I guessed
that without GL hardware acceleration, bitmap transforms just take way
too long. The only solution that I could come up with, was to cache a
whole load of transformed bitmaps prior to game start up, and draw/
swap these 'pre transformed' sprites directly to the canvas without
the use of matrix/rotate etc...

GL is probably the way to go, and biting the bullet might be the only
solution. It's a pity google don't provide a basic example of a 2d GL
game with their SDK, if they did, they might end up with a few more
decent games on the market.

On Jan 20, 7:05 am, Kevin Duffey andjar...@gmail.com wrote:

 Was just watching the video from back in May by Chris Pruett. He had a
 performance slide comparing canvas to opengl and as he noted there, 
 canvas
 is much slower. I am sure you know this, but getting 30fps on a 
 Canvas with
 more than a dozen or so sprites might be difficult when you factor in 
 game
 logic, collision detections, etc. I didn't realize you were running 
 this on
 the emulator as well. For sure you'll see much faster fps on a real 
 device.

 On Tue, Jan 19, 2010 at 10:55 PM, Dan Sherman impact...@gmail.com 
 wrote:
   I run my app on emulator, and currently have
   not tested it on real device.

  The emulator is not, in any way, going to run the same speed as a 
  real
  device.

  Run it on a real device and see what FPS you get.  Or if you want, 
  publish
  an APK and someone here will run it I'm sure (I'll do it =P)

  - Dan

  On Wed, Jan 20, 2010 at 1:44 AM, Andre andranik.abra...@gmail.com 
  wrote:

  Hi,

  Yesterday, I've changed my code, to work with the matrix more
  effectively...

  My GameEntity class now looks like this:

  --GAME ENTITY--

  public class GameEntity {
         public Bitmap mBitmap;
         private Rect mBounds;
         private Matrix mMatrix;
         public int mWidth;
         public int mHeight;
         public boolean mAlive;
         public float mX, mY;
         public float mVelocityX, mVelocityY;
         public float mMoveAngle, mFaceAngle;
         public float mRotationVelocity;

         public GameEntity(Bitmap bitmap) {
                 mBitmap = bitmap;
                 mBounds = new Rect();
                 mMatrix = new Matrix();
                 mWidth = bitmap.getWidth();
                 mHeight = bitmap.getHeight();
                 mAlive = false;
                 mX = 0.0f;
                 mY = 0.0f;
                 mVelocityX = 0.0f;
                 mVelocityY = 0.0f;
                 mMoveAngle = 0.0f;
                 mFaceAngle = 0.0f;
                 mRotationVelocity = 0.0f;
         }

         public void draw(Canvas canvas, float angle) {
                 Matrix m = mMatrix;
                 m.reset();
                 m.postTranslate(mX - mWidth / 2, mY - mHeight / 2);
                 m.postRotate(angle, mX, mY);
                 canvas.drawBitmap(mBitmap, m, null

[android-developers] Re: How to increase FPS (now ~20, desired ~40-50)

2010-01-21 Thread TonyDoc
Hi all, interesting thread, here's my tuppenceworth.

My first attempt at a simple game took the same approach, things
looked favourable when I first threw a few dozen sprites onto the
canvas along with some simple game logic to try and get a handle on
fps and timing. I was getting around 40-45fps which I was happy with,
as my goal was around 30fps for the final game. I then added matrix
transformations to the sprites (scaling and/or rotating) and bang!
20-25fps... I fiddled some more for a while then gave up. I guessed
that without GL hardware acceleration, bitmap transforms just take way
too long. The only solution that I could come up with, was to cache a
whole load of transformed bitmaps prior to game start up, and draw/
swap these 'pre transformed' sprites directly to the canvas without
the use of matrix/rotate etc...

GL is probably the way to go, and biting the bullet might be the only
solution. It's a pity google don't provide a basic example of a 2d GL
game with their SDK, if they did, they might end up with a few more
decent games on the market.


On Jan 20, 7:05 am, Kevin Duffey andjar...@gmail.com wrote:
 Was just watching the video from back in May by Chris Pruett. He had a
 performance slide comparing canvas to opengl and as he noted there, canvas
 is much slower. I am sure you know this, but getting 30fps on a Canvas with
 more than a dozen or so sprites might be difficult when you factor in game
 logic, collision detections, etc. I didn't realize you were running this on
 the emulator as well. For sure you'll see much faster fps on a real device.

 On Tue, Jan 19, 2010 at 10:55 PM, Dan Sherman impact...@gmail.com wrote:
   I run my app on emulator, and currently have
   not tested it on real device.

  The emulator is not, in any way, going to run the same speed as a real
  device.

  Run it on a real device and see what FPS you get.  Or if you want, publish
  an APK and someone here will run it I'm sure (I'll do it =P)

  - Dan

  On Wed, Jan 20, 2010 at 1:44 AM, Andre andranik.abra...@gmail.com wrote:

  Hi,

  Yesterday, I've changed my code, to work with the matrix more
  effectively...

  My GameEntity class now looks like this:

  --GAME ENTITY--

  public class GameEntity {
         public Bitmap mBitmap;
         private Rect mBounds;
         private Matrix mMatrix;
         public int mWidth;
         public int mHeight;
         public boolean mAlive;
         public float mX, mY;
         public float mVelocityX, mVelocityY;
         public float mMoveAngle, mFaceAngle;
         public float mRotationVelocity;

         public GameEntity(Bitmap bitmap) {
                 mBitmap = bitmap;
                 mBounds = new Rect();
                 mMatrix = new Matrix();
                 mWidth = bitmap.getWidth();
                 mHeight = bitmap.getHeight();
                 mAlive = false;
                 mX = 0.0f;
                 mY = 0.0f;
                 mVelocityX = 0.0f;
                 mVelocityY = 0.0f;
                 mMoveAngle = 0.0f;
                 mFaceAngle = 0.0f;
                 mRotationVelocity = 0.0f;
         }

         public void draw(Canvas canvas, float angle) {
                 Matrix m = mMatrix;
                 m.reset();
                 m.postTranslate(mX - mWidth / 2, mY - mHeight / 2);
                 m.postRotate(angle, mX, mY);
                 canvas.drawBitmap(mBitmap, m, null);
         }

          public Rect getBounds() {
                 mBounds.left = (int)(mX - mWidth / 2);
                 mBounds.top = (int)(mY - mHeight / 2);
                 mBounds.right = (int)(mX + mWidth / 2);
                 mBounds.bottom = (int)(mY + mHeight / 2);
                 return mBounds;
         }
  }

  And draw methods in GameView class:

  --GAME VIEW--

  private void drawSpaceship(Canvas canvas) {
          mSpaceship.draw(canvas, mSpaceship.mFaceAngle);
  }

  private void drawAsteroids(Canvas canvas) {
         GameEntity[] asteroids = mAsteroids;
         GameEntity asteroid;
         for(int i = 0; i  MAX_ASTEROIDS; i++) {
                 asteroid = asteroids[i];
                  if(asteroid.mAlive) {
                         asteroid.draw(canvas, asteroid.mMoveAngle);
                  }
         }
  }

  private void drawBullets(Canvas canvas) {
         GameEntity[] bullets = mBullets;
          GameEntity bullet;
         for(int i = 0; i  MAX_BULLETS; i++) {
                 bullet = bullets[i];
                 if(bullet.mAlive) {
                         bullet.draw(canvas, bullet.mMoveAngle + 90);
                 }
         }
  }

  This gives me an extra 4-5 FPS, and now I have ~25 FPS.
  It worth to mention, that I run my app on emulator, and currently have
  not tested it on real device.

  I decide to go little further with testing and commented out
  m.postTranslate() method call, and got +4 FPS, after that I commented
  out m.postRotate(), and got +12-15 FPS, it seems that 

[android-developers] Re: Market access on the emulator?

2010-01-21 Thread TonyDoc
Option 1. Get hold of the APK from the developer and install it on
your emulator

Option 2. If the app is unprotected, use a backup utility to copy the
APK off your phone and onto your SD card, then copy it onto the
emulator  install.

Option 3. Make (or google for) an AVD with the market app
installed. ;)

On Jan 20, 7:33 pm, Mark Murphy mmur...@commonsware.com wrote:
    I suppose that there is probably several approaches to dealing with
  the situation at hand but after some quick checks online about it, I
  had conflicting thoughts as to what people were really doing/using.
   If one were to start testing communications with the ContentProviders
  and ContentResolver classes on the Android phone, it would be helpful
  if a couple applications that we would like to interact with could be
  tested through the emulator against our code that we are writing.

 Ask the authors of those applications for an APK to be made available
 outside of the Market.

  Can we not
  download an application from the market onto the emulator and then
  test communicate with the application?

 The emulators do not have the Android Market. If you cannot get the apps
 you want on your emulator, that is those apps' developers fault for not
 offering more places to get their app.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread TonyDoc
Hi,

As PhoenixofMT said, calibration from factory is poor, but sufficient
for most games and the like. I had to write a similar calibration
routine into my software before I managed to get any realistic figures
from the accelerometer. The user is required to sit the device in the
various orientations, then you need to scale the device provided
accelerometer readings proportionally with your calibrated ranges. I
also found that changes in temperature affects calibration, so I
recommend the user to calibrate the device every time they use the
application :( .

On Jan 17, 11:51 pm, PhoenixofMT jimstanle...@gmail.com wrote:
 I can't provide much on this. I'm not a developer, but I may be able
 to provide some insight. I've been wanting to find a way to calibrate
 the accelerometers on my droid since I installed the tricorder app. It
 bugs me that the X and Y axes are off by about .2 ms^-2 in both
 orientations. In my searches for such a calibration method, I came
 across this post.

 The reason the accelerometers never measure zero is that there is
 always at least one axis being pulled by gravity. If the device is
 lying flat, the Z axis is pointing at (roughly) the center of the
 earth and should measure acceleration due to gravity (9.8 ms^-2). The
 other axes should be near zero, but the shoddy factory calibration
 makes this difficult. The company I work for manufactures marine
 inertial navigation systems that use accelerometers, gyros and a 3-
 axis electronic compass and I get to calibrate them from time to
 time.The way I do this (using a built in program that I've had nothing
 to do with) is to set the box on each side and have the calibration
 program take 10 readings from the relevant accelerometer, (it also
 takes readings from the electronic compass to help with those
 measurements, in case you're also working on a compass program). What
 I assume, is that the calibration program sets the reading from each
 orientation of each axis at +/- 9.2ms^-2. It probably also compares
 the differences in magnitudes of the signals from each sensor to
 further sharpen the accuracy, since I do not set these things
 perfectly vertical for the calibration. As long as the device is held
 in the same orientation within the calibration box and the outside of
 the box is square, the calibration program can figure it out.

 As for using the accelerometers to measure speed changes, I've been
 thinking about that to. It would be cool to, perhaps, augment a GPS
 speedometer with the accelerometers. Maybe to provide higher
 resolution without taxing the GPS receivers? In any case, its pretty
 complicated, I'd have to dig out my physics textbook to find the
 formulas. Even then it would probably take me a while to wrap my head
 around a combination of three axes. Then there is filtering out noise
 from, say, the vibrations of a car

 Any way, I hope I've been of some help. Good luck, I look forward to
 trying out your app.
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread TonyDoc
Hi PhoenixofMT,

I've looked into augmenting the accelerometer data with GPS info. The
major hurdle is not the physics, it's the resolution of the GPS data
provided, which is only timestamped to the nearest second! This makes
it extremely difficult the calculate any sort of realistic figures
without a lot of assumptions.
The accelerometer though, after proper calibration, does provide
figures that allow for pretty accurate calculation of acceleration/
speed/distance/power/torque...

On Jan 17, 11:51 pm, PhoenixofMT jimstanle...@gmail.com wrote:
 I can't provide much on this. I'm not a developer, but I may be able
 to provide some insight. I've been wanting to find a way to calibrate
 the accelerometers on my droid since I installed the tricorder app. It
 bugs me that the X and Y axes are off by about .2 ms^-2 in both
 orientations. In my searches for such a calibration method, I came
 across this post.

 The reason the accelerometers never measure zero is that there is
 always at least one axis being pulled by gravity. If the device is
 lying flat, the Z axis is pointing at (roughly) the center of the
 earth and should measure acceleration due to gravity (9.8 ms^-2). The
 other axes should be near zero, but the shoddy factory calibration
 makes this difficult. The company I work for manufactures marine
 inertial navigation systems that use accelerometers, gyros and a 3-
 axis electronic compass and I get to calibrate them from time to
 time.The way I do this (using a built in program that I've had nothing
 to do with) is to set the box on each side and have the calibration
 program take 10 readings from the relevant accelerometer, (it also
 takes readings from the electronic compass to help with those
 measurements, in case you're also working on a compass program). What
 I assume, is that the calibration program sets the reading from each
 orientation of each axis at +/- 9.2ms^-2. It probably also compares
 the differences in magnitudes of the signals from each sensor to
 further sharpen the accuracy, since I do not set these things
 perfectly vertical for the calibration. As long as the device is held
 in the same orientation within the calibration box and the outside of
 the box is square, the calibration program can figure it out.

 As for using the accelerometers to measure speed changes, I've been
 thinking about that to. It would be cool to, perhaps, augment a GPS
 speedometer with the accelerometers. Maybe to provide higher
 resolution without taxing the GPS receivers? In any case, its pretty
 complicated, I'd have to dig out my physics textbook to find the
 formulas. Even then it would probably take me a while to wrap my head
 around a combination of three axes. Then there is filtering out noise
 from, say, the vibrations of a car

 Any way, I hope I've been of some help. Good luck, I look forward to
 trying out your app.
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: SensorManager.registerListener gives unexpected results

2010-01-19 Thread TonyDoc
Thanks dan, this fixed it, sorry for not getting back sooner...

On Dec 13 2009, 9:57 pm, dan raaka danra...@gmail.com wrote:
 the IK series have the fix.

 -Dan

 On Thu, Dec 10, 2009 at 12:28 AM, TonyDoc tony...@gmail.com wrote:
  I'm running firmware 1.5,
  baseband I7500XXII5,
  kernel 2.6.27.35,
  build no 76XXCSDCBALUM6375

  On Dec 10, 4:51 am, dan raaka danra...@gmail.com wrote:
   what is the full version name ?
   -Dan

    On Wed, Dec 9, 2009 at 10:41 AM, TonyDoc tony...@gmail.com wrote:
Thanks Dan,
I see K4 is out in the wild now. But not yet on NPS. Is it this
firmware you speak of?

On Dec 9, 8:15 am, TonyDoc tony...@gmail.com wrote:
 Hi, I have firmware I5on my device (latest I think). Do you know
  which
 firmware gives correct sensor updates?

 On Dec 8, 6:31 pm, dan raaka danra...@gmail.com wrote:

  If you use NPS studio - it allows you to update your device
  software
tonewer
  builds.
  -Dan

  On Tue, Dec 8, 2009 at 3:24 AM, TonyDoc tony...@gmail.com wrote:
   What do you mean? Newer builds? Do you mean 1,6, 2.0? I'm using
  1.5
   SDK to try this...

   On Dec 7, 5:45 pm, dan raaka danra...@gmail.com wrote:
The newer versions of the build dont exhibit this problem ..
-Dan

On Mon, Nov 30, 2009 at 6:30 AM, TonyDoc tony...@gmail.com
wrote:
 I'm registering a sensor listener with this line of code.

mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
 (Sensor.TYPE_ACCELEROMETER),
  SensorManager.SENSOR_DELAY_FASTEST);

 The rate is set to SENSOR_DELAY_FASTEST with the expectation
  that
I
 would receive events roughly every 20-30ms. It turns out that
  I
 receive events only every 200-220ms (just now, my event code
simply
 logcats the system time).

 No matter which rate I use, SENSOR_DELAY_NORMAL,
  SENSOR_DELAY_UI,
 SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same
result?

 Any ideas to what am I doing wrong?

 --
 You received this message because you are subscribed to the
Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com

   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com

android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
  android-developers%25252bunsubscr...@googlegroups.comandroid-developers%2525252bunsubscr...@googlegroups.com

 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

   --
   You received this message because you are subscribed to the
  Google
   Groups Android Developers group.
   To post to this group, send email to
android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com

   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com

[android-developers] Re: How to GIF image for a finate time

2010-01-06 Thread TonyDoc
Convert it to multiple png's  use androids animation manager.

On Jan 6, 5:31 am, RamaMohan rama.mohan...@gmail.com wrote:
 Hi all,
 I want to show  a loading Image of GIF type  for a finite time .how to
 do this.
 Please tell me the solution if anyone knows.

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

[android-developers] Re: SensorManager.registerListener gives unexpected results

2009-12-10 Thread TonyDoc
I'm running firmware 1.5,
baseband I7500XXII5,
kernel 2.6.27.35,
build no 76XXCSDCBALUM6375

On Dec 10, 4:51 am, dan raaka danra...@gmail.com wrote:
 what is the full version name ?
 -Dan

 On Wed, Dec 9, 2009 at 10:41 AM, TonyDoc tony...@gmail.com wrote:
  Thanks Dan,
  I see K4 is out in the wild now. But not yet on NPS. Is it this
  firmware you speak of?

  On Dec 9, 8:15 am, TonyDoc tony...@gmail.com wrote:
   Hi, I have firmware I5on my device (latest I think). Do you know which
   firmware gives correct sensor updates?

   On Dec 8, 6:31 pm, dan raaka danra...@gmail.com wrote:

If you use NPS studio - it allows you to update your device software
  tonewer
builds.
-Dan

On Tue, Dec 8, 2009 at 3:24 AM, TonyDoc tony...@gmail.com wrote:
 What do you mean? Newer builds? Do you mean 1,6, 2.0? I'm using 1.5
 SDK to try this...

 On Dec 7, 5:45 pm, dan raaka danra...@gmail.com wrote:
  The newer versions of the build dont exhibit this problem ..
  -Dan

  On Mon, Nov 30, 2009 at 6:30 AM, TonyDoc tony...@gmail.com
  wrote:
   I'm registering a sensor listener with this line of code.

  mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
   (Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST);

   The rate is set to SENSOR_DELAY_FASTEST with the expectation that
  I
   would receive events roughly every 20-30ms. It turns out that I
   receive events only every 200-220ms (just now, my event code
  simply
   logcats the system time).

   No matter which rate I use, SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI,
   SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same
  result?

   Any ideas to what am I doing wrong?

   --
   You received this message because you are subscribed to the
  Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com

   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
  android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: SensorManager.registerListener gives unexpected results

2009-12-09 Thread TonyDoc
Hi, I have firmware I5on my device (latest I think). Do you know which
firmware gives correct sensor updates?

On Dec 8, 6:31 pm, dan raaka danra...@gmail.com wrote:
 If you use NPS studio - it allows you to update your device software tonewer
 builds.
 -Dan

 On Tue, Dec 8, 2009 at 3:24 AM, TonyDoc tony...@gmail.com wrote:
  What do you mean? Newer builds? Do you mean 1,6, 2.0? I'm using 1.5
  SDK to try this...

  On Dec 7, 5:45 pm, dan raaka danra...@gmail.com wrote:
   The newer versions of the build dont exhibit this problem ..
   -Dan

   On Mon, Nov 30, 2009 at 6:30 AM, TonyDoc tony...@gmail.com wrote:
I'm registering a sensor listener with this line of code.

mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST);

The rate is set to SENSOR_DELAY_FASTEST with the expectation that I
would receive events roughly every 20-30ms. It turns out that I
receive events only every 200-220ms (just now, my event code simply
logcats the system time).

No matter which rate I use, SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI,
SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same result?

Any ideas to what am I doing wrong?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: SensorManager.registerListener gives unexpected results

2009-12-09 Thread TonyDoc
Thanks Dan,
I see K4 is out in the wild now. But not yet on NPS. Is it this
firmware you speak of?

On Dec 9, 8:15 am, TonyDoc tony...@gmail.com wrote:
 Hi, I have firmware I5on my device (latest I think). Do you know which
 firmware gives correct sensor updates?

 On Dec 8, 6:31 pm, dan raaka danra...@gmail.com wrote:

  If you use NPS studio - it allows you to update your device software tonewer
  builds.
  -Dan

  On Tue, Dec 8, 2009 at 3:24 AM, TonyDoc tony...@gmail.com wrote:
   What do you mean? Newer builds? Do you mean 1,6, 2.0? I'm using 1.5
   SDK to try this...

   On Dec 7, 5:45 pm, dan raaka danra...@gmail.com wrote:
The newer versions of the build dont exhibit this problem ..
-Dan

On Mon, Nov 30, 2009 at 6:30 AM, TonyDoc tony...@gmail.com wrote:
 I'm registering a sensor listener with this line of code.

 mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
 (Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST);

 The rate is set to SENSOR_DELAY_FASTEST with the expectation that I
 would receive events roughly every 20-30ms. It turns out that I
 receive events only every 200-220ms (just now, my event code simply
 logcats the system time).

 No matter which rate I use, SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI,
 SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same result?

 Any ideas to what am I doing wrong?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: SensorManager.registerListener gives unexpected results

2009-12-08 Thread TonyDoc
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 lna...@gmail.com 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 tony...@gmail.com 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 tony...@gmail.com 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: SensorManager.registerListener gives unexpected results

2009-12-08 Thread TonyDoc
What do you mean? Newer builds? Do you mean 1,6, 2.0? I'm using 1.5
SDK to try this...

On Dec 7, 5:45 pm, dan raaka danra...@gmail.com wrote:
 The newer versions of the build dont exhibit this problem ..
 -Dan

 On Mon, Nov 30, 2009 at 6:30 AM, TonyDoc tony...@gmail.com wrote:
  I'm registering a sensor listener with this line of code.

  mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
  (Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST);

  The rate is set to SENSOR_DELAY_FASTEST with the expectation that I
  would receive events roughly every 20-30ms. It turns out that I
  receive events only every 200-220ms (just now, my event code simply
  logcats the system time).

  No matter which rate I use, SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI,
  SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same result?

  Any ideas to what am I doing wrong?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: SensorManager.registerListener gives unexpected results

2009-12-06 Thread TonyDoc
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 tony...@gmail.com 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Samsung devices and 3D performance

2009-12-04 Thread TonyDoc
Samsung hardware drivers for 3D, Power, Accelerometer and Camera
(amongst others) are dismal.
I recommend not to buy a samsung if you need decent functionality from
any of this hardware.

On Dec 4, 5:16 am, SoftwareForMe.com sa...@softwareforme.com
wrote:
 Greetings,

 We acquired a Samsung Moment today, and find that it's 3D performance is
 very poor compared to the HTC and Motorola devices. I've tried all the
 tricks I know (color depths, rendering options), but can't get much out of
 it. Rotating a single textured quad is jerky.

 I understand that the Galaxy was missing a software component, and that once
 a surrogate was added, the 3D performance was acceptable.

 Does anybody have the real low-down on this issue? Specifically:

 * Do others also find the Moment to be a poor 3D performer?
 * Is there any word about Samsung fixing this?
 * Am I missing something obvious?

 Thanks much,
 SoftwareForMe.com
 Makers of PhoneMyPC
  Imagine Multi-touch

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


[android-developers] SensorManager.registerListener gives unexpected results

2009-11-30 Thread TonyDoc
I'm registering a sensor listener with this line of code.

mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST);

The rate is set to SENSOR_DELAY_FASTEST with the expectation that I
would receive events roughly every 20-30ms. It turns out that I
receive events only every 200-220ms (just now, my event code simply
logcats the system time).

No matter which rate I use, SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI,
SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same result?

Any ideas to what am I doing wrong?

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


[android-developers] Re: passing multi dimensional string array between two actvities.

2009-11-30 Thread TonyDoc
is there a reason you cannot make the array public?

On Nov 30, 5:55 am, pavan pavankumar.k...@gmail.com wrote:
 Here is my Problem :

 I want to pass multi dimensional String array between two activities
 or pages.

 I already tried with bundle.putextra like methods. But those allow
 only one dimensional string array.

 I really hope you can help me with example java code on this . Here is
 my String array, final String[][] arr2={{1,pavan},{2,kumar},
 {3,kora}};

 Please do reply.Its very urgent for my project .

 Thank you!

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


[android-developers] Re: sounpool problem

2009-11-25 Thread TonyDoc
I had issues with this too, converting all music to mp3 fixed it.
I think there are weird bugs in soundpool relating to sample rates
with wav files.

On Nov 25, 2:49 pm, Jags jag...@gmail.com wrote:
 i am trying to play continuous background music using sound pool

 here is my code

         private void initSounds() {
                 soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100);
                 soundPoolMap = new HashMapInteger, Integer();
                 soundPoolMap.put(SOUND_1, soundPool.load(getBaseContext(),
                                 R.raw.one, 1));
                 soundPoolMap.put(SOUND_2, soundPool.load(getBaseContext(),
                                 R.raw.two, 1));
                 soundPoolMap.put(SOUND_3, soundPool.load(getBaseContext(),
                                 R.raw.three, 1));
                 soundPoolMap.put(SOUND_4, soundPool.load(getBaseContext(),
                                 R.raw.four, 1));
         }

         public void playSound(int sound, boolean loop) {
                 int looping = loop ? -1 : 0;
                 AudioManager mgr = (AudioManager) 
 getBaseContext().getSystemService(
                                 Context.AUDIO_SERVICE);
                 int streamVolume = 
 mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
                 soundPool.play(soundPoolMap.get(sound), streamVolume, 
 streamVolume,
 1,
                                 looping, 1f);
         }

 when i do playSound() with 1, 2, 3 sound [wav file] with looping
 false, they play fine. but if i call playSound any of the 4 files with
 looping true, it does not work.

 4th one is an mp3 file which neither plays with looping true nor
 looping false.

 can i create another mediaplayer object as a member variable and use
 it for only background music ?

 regards
 Jagat

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


[android-developers] Re: Invalid Audio Buffer Size on Samsung Galaxy

2009-11-16 Thread TonyDoc
Add you bug to the list over at androidforums.com, samsung seem to
have a dreadful android/galaxy support team.

On Nov 15, 4:55 pm, joelt j...@harpsoft.com wrote:
 Further analysis reveals it only supports an 8k sampling rate. This is
 obviously a bug. Where do I file a bug report against the Samsung
 phone?

 On Nov 14, 9:49 pm, joelt j...@harpsoft.com wrote:

  It is also spitting this out:
  WARN/AudioHardwareMSM72XX(1018): getInputBufferSize bad sampling rate:
  44100

  Is there an API that will tell me which rates it _does_ support? It
  doesn't look like it.

  On Nov 14, 8:57 pm, joelt j...@harpsoft.com wrote:

   The following works fine on a G1 but gives an error on the Samsung
   Galaxy. I was hoping cross-platform support would be better than this.
   See error below.

       private final static int RATE = 44100;
       private final static int CHANNEL_MODE =
   AudioFormat.CHANNEL_CONFIGURATION_MONO;
       private final static int ENCODING =
   AudioFormat.ENCODING_PCM_16BIT;
       private AudioRecord recorder_;

    public boolean open() {

     int bufferSize = 4 * AudioRecord.getMinBufferSize(RATE,
   CHANNEL_MODE, ENCODING);
     recorder_ = new AudioRecord(AudioSource.MIC, RATE, CHANNEL_MODE,
   ENCODING, bufferSize);

   last line gives the following on the Samsung Galaxy phone:
   11-14 19:04:07.507: ERROR/AndroidRuntime(7617):
   java.lang.IllegalArgumentException: Invalid audio buffer size.

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


[android-developers] Re: Market on emulator, scamming opportunity ?

2009-11-07 Thread TonyDoc
You can only rate once per google account.

On Nov 7, 2:44 am, Maps.Huge.Info (Maps API Guru) cor...@gmail.com
wrote:
 If you create an emulator on your PC that has a market app, then
 download it, you can rate it as many times as you can create emulators
 with the market app. Of course, this would be a lot of trouble for a
 couple of ratings. It would be far more useful to spend your time
 making your app better so actual users rate it highly.

 -John Coryat

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


[android-developers] Re: onTrackballEvent hogging CPU time.

2009-10-20 Thread TonyDoc

Thanks James,

I've been struggling with this for a few days. This helps a lot.

Ta,
Tony
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image transparency

2009-10-18 Thread TonyDoc

I suppose an png with transparacy is out of the question?

On Oct 17, 2:21 pm, Neilz neilhorn...@googlemail.com wrote:
 Anyone know if you can make part (i.e. a section which you could
 measure in pixels) of an image transparent? What graphics features
 would I need to look at?

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



[android-developers] onTrackballEvent hogging CPU time.

2009-10-18 Thread TonyDoc

Hi,

First post here, so excuse my French.
I'm writing a little game which has an activity thread, a gui/
surfaceview/handler thread and a 3rd logic thread (emulating a cpu
core).
I am finding that when I move the trackball, the logic thread slows
down dramatically until I stop moving the trackball. I've tried
overriding the onTrackballEvent (in the gui view), leaving it empty
and returning true to indicate I've handled it but no good, still
slows down the 3rd thread. (I'm using the trackball to trigger onKeyUp/
Down events)

Any ideas on why this is happening?

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