[android-developers] G1 Upgrade to 1.6???

2010-03-11 Thread Rud
Somewhat off topic since it isn't development per se, but this group
is most knowledgeable on Android.

Yesterday my G1 upgraded to version 1.6. Now I am pretty sure that it
did this last fall when the official release occurred.

Did anyone else see this upgrade?

I may be having problems with my regular email now. I use IMAP and it
is having a very hard time retrieving messages. I keep getting
Connection errror messages.

Anyone else seeing this?

-- 
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: Where have all the Google employees gone?

2009-10-09 Thread Rud

Please don't confuse me with the facts. LOL

Rud


On Oct 9, 12:06 am, Shawn Brown big.coffee.lo...@gmail.com wrote:
 On Fri, Oct 9, 2009 at 1:45 PM, Rud rudmerr...@gmail.com wrote:

  My web site got hit by 68 people looking at my game page. Since the
  only reference, pretty much, to the site is on the game I am assuming
  around that many people tested it.

  Hopefully I'm not being overly optimistic thinking they liked it
  otherwise they would not have bothered to visit the site.

 Hello?  Anyone there?

 maybe 100 people reviewed it and 2 people liked it and they each told
 34 friends whom they know like similar things.

 You can't conclude anything other than somebody likes it!!!
--~--~-~--~~~---~--~~
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: Where have all the Google employees gone?

2009-10-08 Thread Rud

My web site got hit by 68 people looking at my game page. Since the
only reference, pretty much, to the site is on the game I am assuming
around that many people tested it.

Hopefully I'm not being overly optimistic thinking they liked it
otherwise they would not have bothered to visit the site.

Rud


On Oct 8, 3:58 pm, Brian Wright brian.n.wri...@gmail.com wrote:
 How did you determine you had  95 people test my app for Round 1
 judging, but 27 of those were force closes due to the 1.6 update. 

 I have not been told anything?  Where is this data?

 On Oct 6, 8:48 pm, bellapariah bellapar...@gmail.com wrote:



  Thread for developers to discuss problems with 1.6 update and effects
  on ADC2. If you see other forums or articles on the issue or if you
  are one of the unlucky developers affected by the the untimely 1.6
  update, please post is here!

  Releasing 1.6 in the middle of a contest is unacceptable. According to
  the official terms and conditions:

  a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the
  Challenge consists of an original application that is written using a
  version of the Android Software Development Kit (SDK) (available 
  athttp://developer.android.com) that validly executes on Android version
  1.5. The SDK contains instructions, documentation, and all necessary
  tools to enable a Participant to build an Android application.

  My App as well as many other ADC2 apps worked fine on 1.5 but started
  force closing after the 1.6 update. Programmers were told to develop
  an application for 1.5, not 1.6, and were not given the tools or
  opportunity to test our apps with 1.6. In my case, I have had 95
  people test my app for Round 1 judging, but 27 of those were force
  closes due to the 1.6 update. This is because of an issue with a
  Google API that was updated with 1.6. Here are links to other people
  discussing the 1.6 issue:

 http://groups.google.com/group/android-discuss/browse_thread/thread/7...

 http://groups.google.com/group/android-discuss/browse_thread/thread/a...

 http://groups.google.com/group/android-discuss/browse_thread/thread/5...

 http://groups.google.com/group/android-developers/browse_thread/threa...

 http://www.google.com/support/forum/p/Android+Market/thread?tid=5d754...

 http://androidandme.com/2009/10/news/did-google-fumble-the-android-1-...

 http://polyclefsoftware.blogspot.com/

  One suggestion would be to remove the last 25% of reviews of every app
  in the contest (the ones most likely to have been affected by 1.6
  upgrades) to reduce the negative effects of the 1.6 release.

  How many others were affected? Any solutions to fix the problem?

  Shelby- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Where have all the Google employees gone?

2009-10-06 Thread Rud

My G1 downloaded and installed 1.6 today. My ADC2 game was installed
and runs fine under 1.6. It uses the sensors, GPS, trackball and does
graphics. Not being holier than thou about this; just mentioning it in
conjunction with saying the 1.6 is downloading.

Rud
http://www.mysticlakesoftware.com

On Oct 6, 10:02 pm, niko20 nikolatesl...@yahoo.com wrote:
 Also, I don't think 1.6 is officially out as a image update/download.
 I think if people are using it they are using an unofficial compiled
 ROM. This may be the real problem.

 On Oct 6, 9:57 pm, niko20 nikolatesl...@yahoo.com wrote:



  What API's are you guys using that just going from 1.5 to 1.6 broke
  stuff? I would think 1.6 would have been properly back-compatible...

  On Oct 6, 8:58 pm, bellapariah bellapar...@gmail.com wrote:

   What is Google just dropped the 25 lowest scores for every app? There
   would still be 75 reviews to give a relatively accurate average rating
   and it would be fair for all without giving benefits to select
   developers.

   On Oct 6, 6:48 pm, bellapariah bellapar...@gmail.com wrote:

Thread for developers to discuss problems with 1.6 update and effects
on ADC2. If you see other forums or articles on the issue or if you
are one of the unlucky developers affected by the the untimely 1.6
update, please post is here!

Releasing 1.6 in the middle of a contest is unacceptable. According to
the official terms and conditions:

a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the
Challenge consists of an original application that is written using a
version of the Android Software Development Kit (SDK) (available 
athttp://developer.android.com) that validly executes on Android version
1.5. The SDK contains instructions, documentation, and all necessary
tools to enable a Participant to build an Android application.

My App as well as many other ADC2 apps worked fine on 1.5 but started
force closing after the 1.6 update. Programmers were told to develop
an application for 1.5, not 1.6, and were not given the tools or
opportunity to test our apps with 1.6. In my case, I have had 95
people test my app for Round 1 judging, but 27 of those were force
closes due to the 1.6 update. This is because of an issue with a
Google API that was updated with 1.6. Here are links to other people
discussing the 1.6 issue:

   http://groups.google.com/group/android-discuss/browse_thread/thread/7...

   http://groups.google.com/group/android-discuss/browse_thread/thread/a...

   http://groups.google.com/group/android-discuss/browse_thread/thread/5...

   http://groups.google.com/group/android-developers/browse_thread/threa...

   http://www.google.com/support/forum/p/Android+Market/thread?tid=5d754...

   http://androidandme.com/2009/10/news/did-google-fumble-the-android-1-...

   http://polyclefsoftware.blogspot.com/

One suggestion would be to remove the last 25% of reviews of every app
in the contest (the ones most likely to have been affected by 1.6
upgrades) to reduce the negative effects of the 1.6 release.

How many others were affected? Any solutions to fix the problem?

Shelby- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: ADC2 First Round Complete?

2009-10-06 Thread Rud

Well, my game appears to work okay under 1.6. But I do have a bug that
I would like to fix before it goes into round 2, assuming it does. I'd
not like to see someone get a chance to slip in bug fixes with a 1.6
fix when I don't have the opportunity to fix my bug.

Rud
http://www.mysticlakesoftware.com

On Oct 6, 4:33 pm, CraigsRace craig...@gmail.com wrote:
 Allowing an app update would go against their own rules, so it would
 be very controversial.  Having said that, IMO, I wouldn't mind if they
 did allow it for broken apps only (which I imagine are only a select
 few).

 On Oct 7, 5:40 am, Hong lordh...@gmail.com wrote:



  I agree it's due to the Donut update that broke quite  a few apps there.
  Wouldn't surprise me if they allow an app update for the next round.- Hide 
  quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 does Android compute yaw,pitch,roll???

2009-10-04 Thread Rud

See my blog for code to do the processing: 
http://mysticlakesoftware.blogspot.com/

Rud


On Oct 4, 7:57 am, DD daviddiaofri...@gmail.com wrote:
 Hi,

 It seems that for onSensorChanged(), the orientation readings
 (yaw,pitch,roll) are not detected directly, but computed from the
 acceleration readings. Does anybody know how they do this calculation?
 is it by rotationmatrix..? May I know exactly the calculation process?

 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: Get frequency of audio input

2009-09-30 Thread Rud

To get the frequency of a tone you need to do a Fast Fourier Transform
(FFT). You can probably find many examples of Java code that do this.
A straight FFT might not get you what you want though as you'll find
once you learn more about them. It is tricky getting an exact
frequency reading from an FFT. But there are other related techniques
that will do this. You can find them with web searches.

Rud


On Sep 30, 4:39 pm, sixfoottallrabbit sixfoottallrab...@gmail.com
wrote:
 Hey,

 I'm not really sure how this would work and I can't find any way of
 doing it in the Android reference. I've been looking at the classes in
 the android.media package.

 I'd like to be able to find out the frequency (in hertz preferably) of
 input from the microphone as it is being input. Is this possible?

 I'm just looking for some pointers in the right direction if anybody
 has any. :)

 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: ADC2: Low volume of judges

2009-09-27 Thread Rud

I agree. I wish the judging app allowed something like 5 apps to be
queued on the phone. There are some I skipped because I didn't have
time to explore them right now but did want to see what else is being
offered. I'm hoping some of the skipped ones will reappear at some
point.

Rud


On Sep 27, 9:03 pm, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
  I wonder how many of the users judging the applications have submitted
  their own applications and are just voting other applications down to
  improve their own chances of winning...

 That's a rather cynical view, however, one that's probably close to
 the mark in a lot of cases.

 I've been testing apps since the judging began and frankly, the
 judging app is slanted toward apps that can produce the desired result
 with little or no user interaction or understanding of what the app
 does. If you require the user to actually understand what you're
 offering, with registration and other details, you're in for a bad
 time in ADC2. I think it was probably less than ideal that the judging
 app can only work one article at a time. It might have been more fair
 and even if it could have held a universe of apps the user would like
 to try out.

 -John Coryat

 Radar Now!

 What Zip Code?
--~--~-~--~~~---~--~~
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 split a screen into two? One running with an application and the other with another application?

2009-09-21 Thread Rud

Just speculating but maybe using SurfaceView with a transparent
region? The background app might show through the transparent area of
the foreground app.

Rud


On Sep 21, 7:43 am, Karthik P karthi...@gmail.com wrote:
 Does anyone has an idea of how to split the screen into two? Is it possible
 for me to run an application in one screen and another app in other screen?
 Any help in this regard will be of great help.
 Karthik
--~--~-~--~~~---~--~~
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: SensorEvent value array ownership

2009-09-18 Thread Rud

Hi,

I found the same thing working with the sensors. My comments are at
http://mysticlakesoftware.blogspot.com/. Its something I need to
revisit because I am not sure I have retained a copy or references to
the underlying value. Still adjusting to some of the Java way of doing
things.

Rud
http://mysticlakesoftware.com/

On Sep 18, 1:06 pm, Daber m.a.dabrow...@gmail.com wrote:
 Hi,

 I've been experimenting with gsensors on dev phone and I think i found
 something that needs explanation.

 The appliaction was comparing g readings with previously read values
 in following manner
 float[] mPrevious;

 float[] v  = event.values;

 // .. compare //

 mPrevious = v;

 but after while all comparisions were  equal.

 It seems that event reuses float array object to provide new data in
 the old array after some time (mPrevious and event.values is the same
 object).

 Now here is The question:
  Who has object ownership  -the gsensor framework and i have to make
 a copy
  Me - and this is a bug

 BR,

 Michał Dąbrowski
--~--~-~--~~~---~--~~
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: SensorEvent value array ownership

2009-09-18 Thread Rud

I can understand the reasoning. My Galactic Guardian game breaks a lot
of OO rules with many more static fields and no get/set methods than I
would ever use normally. Another area I really want to revisit to see
how these impact performance. But I followed the guidelines in the
developers web site.

One the sensor data issue, would it be safe to assume that the
values arrays always contain valid data for all 3 sensors? At least
after each sensor has been received once?

In order to use the rotation routines you need the magnetic and
accelerometer data. This requires keeping one of them locally while
waiting for the other to be updated. But if it is valid to use the
reference to the underlying array making a copy would not be
necessary.

I suspect the real answer is not to depend on the behavior since it
might change in the future.



Rud
http://mysticlakesoftware.com/

On Sep 18, 5:21 pm, Dianne Hackborn hack...@android.com wrote:
 This is actually an anti-Java way of doing things, but useful for
 performance. :}





 On Fri, Sep 18, 2009 at 2:21 PM, Rud rudmerr...@gmail.com wrote:

  Hi,

  I found the same thing working with the sensors. My comments are at
 http://mysticlakesoftware.blogspot.com/. Its something I need to
  revisit because I am not sure I have retained a copy or references to
  the underlying value. Still adjusting to some of the Java way of doing
  things.

  Rud
 http://mysticlakesoftware.com/

  On Sep 18, 1:06 pm, Daber m.a.dabrow...@gmail.com wrote:
   Hi,

   I've been experimenting with gsensors on dev phone and I think i found
   something that needs explanation.

   The appliaction was comparing g readings with previously read values
   in following manner
   float[] mPrevious;

   float[] v  = event.values;

   // .. compare //

   mPrevious = v;

   but after while all comparisions were  equal.

   It seems that event reuses float array object to provide new data in
   the old array after some time (mPrevious and event.values is the same
   object).

   Now here is The question:
    Who has object ownership  -the gsensor framework and i have to make
   a copy
    Me - and this is a bug

   BR,

   Michał Dąbrowski

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Text with different FILL and STROKE colours

2009-09-15 Thread Rud

I can't think of a way to do it in one step. You would need to set the
fill and color, draw the text, change the color and fill, and draw the
text again.

Rud
mysticlakesoftware.com

On Sep 15, 7:38 am, LambergaR martin.s...@gmail.com wrote:
 Hi all!

 Is there a simple way to draw some text with different fill and stroke
 colours?

 Thanx!

 Martin
--~--~-~--~~~---~--~~
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: Microphone signal ..source

2009-09-09 Thread Rud

What you are asking for is a non-trivial problem. To determine the
frequency of a signal you have to capture a number of samples. Whether
they go to a memory buffer or SD is a detail. You then need to perform
a Fast Fourier Transform (or similar transform for the pedantic ones)
to determine the frequency. The more samples you collect the more
accurate the result. You need more samples to (1) make a more fine
grade determination of the frequency and (2) to increase the signal to
noise ratio.

Rud


On Aug 31, 3:08 pm, guruk ilovesi...@gmail.com wrote:
 Hi,
 i look for a very simple example what signal arrives at my mic in
 realtime.
 It does not need to be saved to sd-card or anything.

 Just a $vol=GetVolume   (0-)
 $frequ=Getfrequ (0-28000)

 something like that.

 The Examples I found are just overloaded and mostly to record some
 seconds to sd-card. I dont need that at all, just whats the signal
 right
 now arriving :)

 thanks i advance

 any snippet can help

 chris
--~--~-~--~~~---~--~~
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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-02 Thread Rud

Just wait until next year. I'm going to do something that will use as
much of the Google web structure as possible. Just didn't have enough
time this year to learn all of it and do an Android app.

Rud  laffin'


On Sep 2, 12:57 am, Chi Kit Leung michaelchi...@gmail.com wrote:
 The games only?
 Did any person submit any business type apps?





 On Wed, Sep 2, 2009 at 3:23 PM, -v- vishal.changr...@gmail.com wrote:

  I uploaded an app called TennisNow! Sleepless night, you bet! We were
  a team of 3 ..me and 2 more from India (freind and his wife). We
  started just 1 month back..I work in Java so I thought writing apps in
  Android SDK will be a cake walk :). Couldnt be more wrong.
  What I didnt like is this redefiniton of concepts like events etc. I
  wonder why they keep reinventing the wheel. Which also makes me wonder
  why Android why not just improve J2ME.
  Yes I do feel there will be many many more submissions this time.
  Competition is going to be much tougher..I suspect lot of apps related
  to blogging, facebook twitter etc..
  About the time limit, I had to remove almost 70% of the orignal
  feature set that I had in mind to make the deadline. I had in mind a
  BMW 7 but I think I just managed to squeeze in a toyota corolla with a
  dirty paint job ;)

  Thanks,
  Vishal

  On Sep 1, 7:41 am, Lout lout.r...@googlemail.com wrote:
   While you developers relax... would you mind sharing what apps to
   expect through this challenge.. and anything else you wish to share
   about ADC2 submissions... well anything including the fact: 'thank
   God, no more sleep less nights'!

   Am collecting information about the challenge (ADC2) for a news
   article as am with cnet (and AP). Pitch your app if you have already
   published or would soon publish on the market too.

   Your app name and description, web link if any, experience with
   ADC2, ... anything would be useful for our article(s).

   And do you feel that there would have been more submissions than in
   ADC1?
   Is the competition going to be tougher or less profound as you were
   allowed to put up apps not published before 1st Aug only?

   Do you think that all apps that didn't try for ADC1 should have had a
   chance?

   Congratulations on your submissions while you wait for the next
   phase.
   Thanks,
   Lout Reilly
   ps: Moderators we request you to let this through so that you too get
   some feedback.

 --
 Regards,
 Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info- Hide quoted 
 text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-02 Thread Rud

Simon,

No, I agree with you about the calm. My game is into ADC2 and I'll see
what happens with it. I do look forward to hearing people's reactions
and what they find. I will put it on the market Real Soon Now. I'm a
pro-developer having started in 1968 but since I am retired there is
not a lot of pressure behind this effort. I was able to have fun doing
the work. If more comes then so be it.

Rud


On Sep 2, 5:26 am, longhairedsi longhaire...@googlemail.com wrote:
 Hi,


 I think i may be alone in this but I like the fact that I can't
 make any more changes to the app now it's submitted. I can move on and
 view any mods as the next version of my app which the maket users can
 appreciate.

 MicroJam will apear on the market sometime soon.

 Simon


--~--~-~--~~~---~--~~
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: 5 mins to ADC II submission deadline - so what is your submission?

2009-09-01 Thread Rud

I actually submitted mine about 6 hours before the deadling. Amazing!
g

It is Galactic Guardian: Zap GPS. It uses the sensors to shoot GPS
satellites. I challenge you to clean the sky when Command and
Control and Cloaking are both active.

See more at http://sites.google.com/site/mysticlakesoftware/. That is
just a quick and dirty page derived from the Info in the game. I'll
put more information in the next couple days. Also add some more code
and development discussion on my blog.

No expiration on the ADC version. I have not submitted it to the
Market...to busy catching up on other things to day to change the
package name. I may hold off to get feedback from ADC and think about
more features.

Rud
http://mysticlakesoftware.blogspot.com/
--~--~-~--~~~---~--~~
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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-01 Thread Rud

I actually submitted mine about 6 hours before the deadling. Amazing!
g Biggest hassle I had was fighting a cold/flu that started last
Tuesday. Fortunately I am retired so could work as I could and sleep
at odd hours.

My application is the arcade game Galactic Guardian: Zap GPS. It
uses the sensors to target and shoot GPS satellites, i.e. Galactic
Patrol Sentinels. I challenge you to clean the sky when Command and
Control and Cloaking are both active.

See more at http://sites.google.com/site/mysticlakesoftware/. That is
just a quick and dirty page derived from the Info in the game. I'll
put more information in the next couple days. Also add some more code
and development discussion on my blog.

It has not been published. I think I'll wait for some ADC feedback and
work on additional features before publishing.

I really don't know how it will do in the ADC 2 and how the
competition will stack up. I think the game will be compelling to
some. Its main feature is the augmented reality aspect which includes
physically moving around to aim and shoot the Sentinels. There is a
keypad mode so someone could play it in a car or airplane. If you
can't get the GPS signals there is a training mode which simulates
satellite positions.

I don't have a problem with the rules, as given. They were published
early enough that developers knew the deadlines and restrictions.

Rud
http://mysticlakesoftware.blogspot.com/


--~--~-~--~~~---~--~~
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] TextView Line Breaks

2009-08-28 Thread Rud

I am trying to insert line breaks into a string resource so they
appear in a TextView. I put in \\n but all I get is \n appearing.
Is there a setting I'm missing?

Rud

--~--~-~--~~~---~--~~
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] Full Screen in sub-Preference Screen

2009-08-28 Thread Rud

I am using a PreferenceScreen with some subPreference Screens. In the
Activity I programmatically set FULL_SCREEN. This works for the main
PreferenceScreen but not for the sub-PreferenceScreens.

Is there any way to set the FULL_SCREEN for the sub-
PreferenceScreens?

Rud

--~--~-~--~~~---~--~~
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 use the RotationMatrix, actually how to get it

2009-08-26 Thread Rud

Sorry for the confusion. I have another place in the application where
I am copying an array of objects. That is what I used for testing.

Rud


On Aug 26, 6:05 am, Peli peli0...@googlemail.com wrote:
 You confuse me:
 I thought a and b are float vectors - that is, vectors containing
 actual numbers, not pointers (for example to a Float class). As such,
 you can not .clone() them.

 Did you use Float (with capital F) instead of float (with lower case
 f)?
 Floats are classes surrounding float.

 If you want to work time-critical, you should use the simple float:
 float[] a = new float[3];
 float[] b = new float[3];
 a[0] = 1.2f;
 a[1] = 2.3f;
 ...

 and NOT
 Float[] a = new Float[3];
 a[0] = new Float(1.2f);
 a[1] = new Float(2.3f);
 ...

 Peli

 On Aug 26, 2:28 am, Rud rudmerr...@gmail.com wrote:



  System.arraycopy does not do a deep copy. I just tried it. But it is
  very fast. grin

  I setup the timing test. I did 5000 passes over the copy loops;

    522 ms    for (i=0; i3; i++) a[i] = b[i].clone();
    453 ms    for(i=3; i--0;) a[i] = b[i].clone();
    447 ms    int pos = 0; for(type x; b) a[pos++] = x.clone();

  I had written a type.clone() to make the deep copy for each array
  element. I was surprised that the for_each version did so well. I
  won't put much faith in the timing differences between it and the
  subtraction version.

  Rudhttp://mysticlakesoftware.blogspot.com/

  On Aug 25, 8:00 am, Peli peli0...@googlemail.com wrote:

   To deep copy an array, you can use 
   System.arraycopy(..)http://developer.android.com/reference/java/lang/System.html#arraycop...

   System.arraycopy(b, 0, a, 0, 3);

   but for a float array of length 3, you can simply write
   a[0]=b[0];
   a[1]=b[1];
   a[2]=b[2];

   or
   for (i=0; i3; i++) a[i] = b[i];

   I've never tried to profile which of the 3 ways is actually the
   fastest on a real Android device. If someone has the time, please try
   all 3 in a tight loop and report back :-)

   (there is also
   for(i=3; i--0;) a[i] = b[i];
   which may be even faster?)

   Note: all assume that you have initialized a already beforehand,
   a = new float[3];

   Peli

   On Aug 25, 8:24 am, Rud rudmerr...@gmail.com wrote:

Hi,

The code is originally from my Blog. The reason for the clone is
explained there.

I admit to not having worked with Java enough to have the deep
understanding of how containers deal with objects. In my application I
ran into a problem trying to make a copy of an array and had to write
my own copy.

I had a set of data that gets consumed while the app runs. I wanted to
reset that data at times. I put the data in an array and then cloned
it to the working array. I was surprised when the original data got
changed when the cloned data was changed. I also realized that the
sensor code wasn't doing what I thought it was but haven't taken the
time to adjust it.

How in Java do you actually make a deep copy of an array?

Rudhttp://mysticlakesoftware.blogspot.com/

On Aug 21, 7:07 am, Peli peli0...@googlemail.com wrote:

   = event.values.clone();

 Note that this creates new objects constantly that have to be garbage
 collected later. Depending on the kind of application, it may be
 better to just copy the values into a persisting array.

 Peliwww.openintents.org

 On Aug 21, 4:06 am, mscwd01 mscw...@gmail.com wrote:

  Heres my code, which works:

  public void onSensorChanged(SensorEvent event) {

          Sensor sensor = event.sensor;
          int type = sensor.getType();
          switch (type) {
                  case Sensor.TYPE_MAGNETIC_FIELD:
                          mags = event.values.clone();
                          isReady = true;
                      break;
                  case Sensor.TYPE_ACCELEROMETER:
                      accels = event.values.clone();
                      break;
                  case Sensor.TYPE_ORIENTATION:
                      orients = event.values.clone();
                      break;
              }

              if (mags != null  accels != null  isReady) {
                  isReady = false;

                      SensorManager.getRotationMatrix(R, I, accels, 
  mags);
                      SensorManager.remapCoordinateSystem(R,
  SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X, outR);
                      SensorManager.getOrientation(outR, values);

                                  azimuth = 
  getAzimuth(-convert.radToDeg(values[0]));
                                  pitch= convert.radToDeg(values[1]);
                                  roll = -convert.radToDeg(values[2]);

              }

          }

  On Aug 21, 2:39 am, Mike Collins mike.d.coll...@gmail.com wrote:

   I have a sensor event handler that gets fired and I have no 
   problem
   getting

[android-developers] Re: How to use the RotationMatrix, actually how to get it

2009-08-25 Thread Rud

Hi,

The code is originally from my Blog. The reason for the clone is
explained there.

I admit to not having worked with Java enough to have the deep
understanding of how containers deal with objects. In my application I
ran into a problem trying to make a copy of an array and had to write
my own copy.

I had a set of data that gets consumed while the app runs. I wanted to
reset that data at times. I put the data in an array and then cloned
it to the working array. I was surprised when the original data got
changed when the cloned data was changed. I also realized that the
sensor code wasn't doing what I thought it was but haven't taken the
time to adjust it.

How in Java do you actually make a deep copy of an array?

Rud
http://mysticlakesoftware.blogspot.com/


On Aug 21, 7:07 am, Peli peli0...@googlemail.com wrote:
   = event.values.clone();

 Note that this creates new objects constantly that have to be garbage
 collected later. Depending on the kind of application, it may be
 better to just copy the values into a persisting array.

 Peliwww.openintents.org

 On Aug 21, 4:06 am, mscwd01 mscw...@gmail.com wrote:



  Heres my code, which works:

  public void onSensorChanged(SensorEvent event) {

          Sensor sensor = event.sensor;
          int type = sensor.getType();
          switch (type) {
                  case Sensor.TYPE_MAGNETIC_FIELD:
                          mags = event.values.clone();
                          isReady = true;
                      break;
                  case Sensor.TYPE_ACCELEROMETER:
                      accels = event.values.clone();
                      break;
                  case Sensor.TYPE_ORIENTATION:
                      orients = event.values.clone();
                      break;
              }

              if (mags != null  accels != null  isReady) {
                  isReady = false;

                      SensorManager.getRotationMatrix(R, I, accels, mags);
                      SensorManager.remapCoordinateSystem(R,
  SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X, outR);
                      SensorManager.getOrientation(outR, values);

                                  azimuth = 
  getAzimuth(-convert.radToDeg(values[0]));
                                  pitch= convert.radToDeg(values[1]);
                                  roll = -convert.radToDeg(values[2]);

              }

          }

  On Aug 21, 2:39 am, Mike Collins mike.d.coll...@gmail.com wrote:

   I have a sensor event handler that gets fired and I have no problem
   getting and processing acceleration readings. However this code
   always fails.

                   if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER)
                   {
                           float[] geomagnetic = new float[3];
                           geomagnetic[0] = geomagnetic[1] = geomagnetic[2] 
   = 0;

                           float[] r = new float[9];
                           float[] I = new float[9];
                           boolean b = SensorManager.getRotationMatrix(r, I, 
   event.values.clone
   (), event.values.clone());
                           if ( ! b)
                           {
                                   Log.e(LOG_TAG, getRotationMatrix 
   failed);
                                   return;
                           }
   ...

   tia,
     mike- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 use the RotationMatrix, actually how to get it

2009-08-25 Thread Rud

System.arraycopy does not do a deep copy. I just tried it. But it is
very fast. grin

I setup the timing test. I did 5000 passes over the copy loops;

  522 msfor (i=0; i3; i++) a[i] = b[i].clone();
  453 msfor(i=3; i--0;) a[i] = b[i].clone();
  447 msint pos = 0; for(type x; b) a[pos++] = x.clone();

I had written a type.clone() to make the deep copy for each array
element. I was surprised that the for_each version did so well. I
won't put much faith in the timing differences between it and the
subtraction version.

Rud
http://mysticlakesoftware.blogspot.com/


On Aug 25, 8:00 am, Peli peli0...@googlemail.com wrote:
 To deep copy an array, you can use 
 System.arraycopy(..)http://developer.android.com/reference/java/lang/System.html#arraycop...

 System.arraycopy(b, 0, a, 0, 3);

 but for a float array of length 3, you can simply write
 a[0]=b[0];
 a[1]=b[1];
 a[2]=b[2];

 or
 for (i=0; i3; i++) a[i] = b[i];

 I've never tried to profile which of the 3 ways is actually the
 fastest on a real Android device. If someone has the time, please try
 all 3 in a tight loop and report back :-)

 (there is also
 for(i=3; i--0;) a[i] = b[i];
 which may be even faster?)

 Note: all assume that you have initialized a already beforehand,
 a = new float[3];

 Peli

 On Aug 25, 8:24 am, Rud rudmerr...@gmail.com wrote:



  Hi,

  The code is originally from my Blog. The reason for the clone is
  explained there.

  I admit to not having worked with Java enough to have the deep
  understanding of how containers deal with objects. In my application I
  ran into a problem trying to make a copy of an array and had to write
  my own copy.

  I had a set of data that gets consumed while the app runs. I wanted to
  reset that data at times. I put the data in an array and then cloned
  it to the working array. I was surprised when the original data got
  changed when the cloned data was changed. I also realized that the
  sensor code wasn't doing what I thought it was but haven't taken the
  time to adjust it.

  How in Java do you actually make a deep copy of an array?

  Rudhttp://mysticlakesoftware.blogspot.com/

  On Aug 21, 7:07 am, Peli peli0...@googlemail.com wrote:

 = event.values.clone();

   Note that this creates new objects constantly that have to be garbage
   collected later. Depending on the kind of application, it may be
   better to just copy the values into a persisting array.

   Peliwww.openintents.org

   On Aug 21, 4:06 am, mscwd01 mscw...@gmail.com wrote:

Heres my code, which works:

public void onSensorChanged(SensorEvent event) {

        Sensor sensor = event.sensor;
        int type = sensor.getType();
        switch (type) {
                case Sensor.TYPE_MAGNETIC_FIELD:
                        mags = event.values.clone();
                        isReady = true;
                    break;
                case Sensor.TYPE_ACCELEROMETER:
                    accels = event.values.clone();
                    break;
                case Sensor.TYPE_ORIENTATION:
                    orients = event.values.clone();
                    break;
            }

            if (mags != null  accels != null  isReady) {
                isReady = false;

                    SensorManager.getRotationMatrix(R, I, accels, mags);
                    SensorManager.remapCoordinateSystem(R,
SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X, outR);
                    SensorManager.getOrientation(outR, values);

                                azimuth = 
getAzimuth(-convert.radToDeg(values[0]));
                                pitch= convert.radToDeg(values[1]);
                                roll = -convert.radToDeg(values[2]);

            }

        }

On Aug 21, 2:39 am, Mike Collins mike.d.coll...@gmail.com wrote:

 I have a sensor event handler that gets fired and I have no problem
 getting and processing acceleration readings. However this code
 always fails.

                 if (event.sensor.getType() == 
 Sensor.TYPE_ACCELEROMETER)
                 {
                         float[] geomagnetic = new float[3];
                         geomagnetic[0] = geomagnetic[1] = 
 geomagnetic[2] = 0;

                         float[] r = new float[9];
                         float[] I = new float[9];
                         boolean b = 
 SensorManager.getRotationMatrix(r, I, event.values.clone
 (), event.values.clone());
                         if ( ! b)
                         {
                                 Log.e(LOG_TAG, getRotationMatrix 
 failed);
                                 return;
                         }
 ...

 tia,
   mike- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You

[android-developers] Re: Simple Java Question

2009-08-24 Thread Rud

I changed the code to use the StringBuilder and then made the
StringBuilder and Formatter static final private fields, instead of
local variables.

My garbage collection went from once every 6 seconds to once every 27
seconds.

That is what I thought might happen and why I considered the code I
posted as wasteful.

I did not try using a String. There was another post on the group that
said a String would be more costly than a Formatter which is why I
took the Formatter route.

Rud

--~--~-~--~~~---~--~~
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] Simple Java Question

2009-08-22 Thread Rud

The is (maybe) a simple Java question but I can't find the anwer
searching.

The code is:

final Formatter f = new Formatter();

for (Sentinel s : Sentinel.mSentinels) {
if (s.mIsLive) {
pos++;
f.format(%4d%5d, s.mPos.x, s.mPos.y);
canvas.drawText(f.toString(), x_pos, (pos *
mHalfHeight), mPaint);
}

The problem is Formatter appends the output rather than clearing the
underlying buffer for each 'format'. Okay, my bad. I looked for
something to clear the underlying buffer but can't find anything.

Suggestions?

Rud

--~--~-~--~~~---~--~~
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: Simple Java Question

2009-08-22 Thread Rud

Rather wasteful on a platform like Android. Are there any other
options other than Formatter?

Rud


On Aug 22, 10:28 am, Mark Murphy mmur...@commonsware.com wrote:
 Rud wrote:
  The is (maybe) a simple Java question but I can't find the anwer
  searching.

  The code is:

          final Formatter f = new Formatter();

          for (Sentinel s : Sentinel.mSentinels) {
              if (s.mIsLive) {
                  pos++;
                  f.format(%4d%5d, s.mPos.x, s.mPos.y);
                  canvas.drawText(f.toString(), x_pos, (pos *
  mHalfHeight), mPaint);
              }

  The problem is Formatter appends the output rather than clearing the
  underlying buffer for each 'format'. Okay, my bad. I looked for
  something to clear the underlying buffer but can't find anything.

  Suggestions?

 Create a new Formatter.

 If you look at the constructors for Formatter, you will see that its
 mission in life is to dump data to some stream-like object, be that a
 literal stream, or a File, or any sort of Appendable object. As such, it
  is aimed at calling format() multiple times to dump more data to the
 same output stream, then closing up the stream (via flush() and close()).

 If you want to dump data to some new stream (in your case, a new
 String), you need to create a new Formatter.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Android App Developer Books:http://commonsware.com/books.html- Hide quoted 
 text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Memory management issues - stop crashing the party!

2009-07-30 Thread Rud

Are you running on the emulator or a device? There are some reports
that on the emulator, espeically in debug mode, memory is not GC'd
because the debugger is holding a refernece. I haven't experimented to
see if this is true but it is worth checking into.

You might try calling the GC prior to reallocating your variables.

I'm also wondering if you are following the activity model with proper
handling of onStart, onRestart, onPause, onResumer, etc. You may need
to be saving your large arrays to a file during onPause and reloading
them with onResume. (Or onStop and onRestart.)

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 29, 2:15 pm, choff choff_2...@hotmail.com wrote:
 Hi I'm also a programmer on this project.

 These arrays are class variables of our Activity class.  When we
 change these from instance variables to static class variables it
 seems that the problem goes away in relation to these arrays ( we then
 start bumping into problems with other instance variables)  This would
 suggest that ANDROID itself is not letting go of the Activity
 instances.  That some how they are being queued up or hung on to... It
 also seems every time the app is relaunched a new Activity class is
 created.

 Does this have any merit?

 If so is there away to flush out the Activity between starts?

 On Jul 29, 2:10 pm, fadden fad...@android.com wrote:



  On Jul 29, 9:42 am, RM rick.manc...@gmail.com wrote:

   1.  Is memory saved in the Dalvik VM by using a short or byte vs. an
   integer?  I've read some conflicting things on how this works.  i.e.
   -- is the memory occupation as follows:

   Byte = 8bits
   Short = 16bits
   Int = 32bits

  For arrays, yes.  Fields in objects are always 32 or 64 bits.

   2.  Garbage collection strategies.  Specifically, I'm allocating a
   couple of large integer arrays in my main activity class.  My program
   runs fine once.  When I press the HOME button, however, and then re-
   launch the application it crashes when (re)allocating the arrays.

  Catch the OOM and call the API we added in 1.5 that saves an HPROF
  dump.  Examine the heap dump to see where your memory went.
  Instructions are in dalvik/docs/heap-profiling.html:

   http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=d...

  In particular, make sure there isn't something keeping your large
  arrays around after you believe you're no longer referencing them.

  While your application runs, it may be useful to keep an eye on the GC
  stats being written to the event log.  dalvik/tools/gclog.py can help:

   http://bigflake.com/gclog.py.txt- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: bad compass and sensor data (stuck data).

2009-07-23 Thread Rud

I was working on an application I've dubbed Calibrator. The main point
of it is to turn the vibrator on when the sensor accuracy is not
SENSOR_STATUS_ACCURACY_HIGH. That was easy to do.

I'm adding some graphics so it can be used as yet another compass
but with a totally different display than a compass.

When I started working on it a couple hours ago my first download
started the G1 vibrating. I juggled it until it stopped. Hurray! That
part worked.

But just a few minutes ago I downloaded a new version and it starts
vibrating again. I wasn't even handling it. It was just propped up
against a book so I could see the display. Very strange.

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 22, 3:00 pm, Richard Schilling richard.rootwirel...@gmail.com
wrote:
 Am researching a problem with compass and sensor values returned by
 the phone.
 I found this thread:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 Which seems related, but it's old so I'm starting a new one.

 I'm getting stuck values from both the compass and orientation
 sensors.  It was fine yesterday, but today, I'm only getting values in
 a limited range (e.g. compass headings from 240 - 290), no matter how
 I orient the device.

 What's even more odd is that the radians returned from the call to
 SensorManager.getOrientation(), which returns radians, is giving
 consistently out of range values.

 Anyone see this same behavior, and if so, any fixes?

 Here's some sample sensor data.  Format is heading, pitch, roll.  The
 first set contains raw values, the second set contains values after
 I've applied the orientation matrix generated by the Sensor Manager.
 The third set contains values after I've smoothed the data with my own
 algorithm.

 07-22 12:50:00.655: INFO/MainActivity.Sensor(367): 284.0, -21.0, 62.0
 -- -7.545175, 17.423908, 21.598564 -- -7.545175, 17.423908,
 21.598564
 07-22 12:50:00.795: INFO/MainActivity.Sensor(367): 284.0, -21.0, 63.0
 -- -7.3785577, 17.477526, 22.036232 -- -7.3785577, 17.477526,
 22.036232
 07-22 12:50:00.965: INFO/MainActivity.Sensor(367): 284.0, -20.0, 63.0
 -- -7.628744, 17.423908, 21.598564 -- -7.628744, 17.423908,
 21.598564
 07-22 12:50:01.075: INFO/MainActivity.Sensor(367): 283.0, -20.0, 63.0
 -- -7.596131, 17.311737, 21.458878 -- -7.596131, 17.311737,
 21.458878
 07-22 12:50:01.255: INFO/MainActivity.Sensor(367): 284.0, -20.0, 63.0
 -- -7.4315057, 17.527277, 21.33686 -- -7.4315057, 17.527277,
 21.33686
 07-22 12:50:01.395: INFO/MainActivity.Sensor(367): 283.0, -20.0, 63.0
 -- -7.847195, 17.804707, 20.847076 -- -7.847195, 17.804707,
 20.847076
 07-22 12:50:01.495: INFO/MainActivity.Sensor(367): 283.0, -20.0, 63.0
 -- -8.424827, 17.770178, 21.15628 -- -8.424827, 17.770178, 21.15628
 07-22 12:50:01.705: INFO/MainActivity.Sensor(367): 282.0, -20.0, 63.0
 -- -27.349527, -63.69813, 21.50518 -- -7.901176, 17.70072, 21.50518
 07-22 12:50:01.765: INFO/MainActivity.Sensor(367): 282.0, -20.0, 63.0
 -- -28.0857, -63.69813, 21.50518 -- -7.901176, 17.70072, 21.50518
--~--~-~--~~~---~--~~
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: Please assist with sensors.

2009-07-22 Thread Rud

Thanks, Richard for the pointer to my blog. That makes it all worth
the effort.


Rud
http://mysticlakesoftware.blogspot.com/

On Jul 22, 6:03 pm, Richard Schilling richard.rootwirel...@gmail.com
wrote:
 Here is a really good 
 example:http://mysticlakesoftware.blogspot.com/2009/07/sensor-accelerometer-m...

 This will get you pointed in the right direction.

 Richard Schilling
 Root Wireless

 On Jul 22, 2:54 pm, Mike internet...@hotmail.com wrote:



  Hello,
  i am in dire need of some assistance.
  Assume the device is held in landscape position, the display facing to
  the user, what i'd like to detect is if the device is rotated clock
  wise or counter clock wise.
  Sounds pretty simple, but i am trying for two days now without
  success.
  Could you please teach me how to archive it.

  Thanks in advance,
  Mike- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Differentiate emulator instances and real device instances.

2009-07-22 Thread Rud

The code on my blog at 
http://mysticlakesoftware.blogspot.com/2009/07/differentiate-emulator-from-device.html
might give you some ideas.

From my limited testing with the emulator and a G1 the call to
Settings.Secure.getString(this.getContentResolver(),
Settings.Secure.ANDROID_ID); always returns null on the emulator and a
value on the device.

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 22, 3:05 pm, Mathieu Plourde mat.plou...@gmail.com wrote:
 Hello devs,

 I need to correctly be able to differentiate between emulator
 instances. I know it's easily done with real devices. With real
 devices, you can use getDeviceId or getLine1Number from
 TelephonyManager. With emulators, all the instances have the same
 device id, same subscriber id, and same line1 number. Is there a way
 to differentiate them? Using NetworkInfo, I can call the toString
 method and I get my ip and the port on the computer. The problem with
 that is that the port is always different. I would like something more
 stable. Like when you use adb devices in command line. Emulator #1
 is almost always emulator-5556 and emulator#2 is almost always
 emulator-5554. Is there a way to get the same info I get from adb
 devices in my code? If not, is it possible to use a command line
 parameter to force the emulator to use a certain phone number?

 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: bad compass and sensor data (stuck data).

2009-07-22 Thread Rud

Are you checking the sensor accuracy field? I've found the sensors
need calibration more frequently than one would expect. I have no idea
why they get out of calibration, either.

My approach to calibration is to disconnect the cables (!) and flip,
twist, and turn the device every which way for 30 or so seconds.

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 22, 3:00 pm, Richard Schilling richard.rootwirel...@gmail.com
wrote:
 Am researching a problem with compass and sensor values returned by
 the phone.
 I found this thread:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 Which seems related, but it's old so I'm starting a new one.

 I'm getting stuck values from both the compass and orientation
 sensors.  It was fine yesterday, but today, I'm only getting values in
 a limited range (e.g. compass headings from 240 - 290), no matter how
 I orient the device.

 What's even more odd is that the radians returned from the call to
 SensorManager.getOrientation(), which returns radians, is giving
 consistently out of range values.

 Anyone see this same behavior, and if so, any fixes?

 Here's some sample sensor data.  Format is heading, pitch, roll.  The
 first set contains raw values, the second set contains values after
 I've applied the orientation matrix generated by the Sensor Manager.
 The third set contains values after I've smoothed the data with my own
 algorithm.

 07-22 12:50:00.655: INFO/MainActivity.Sensor(367): 284.0, -21.0, 62.0
 -- -7.545175, 17.423908, 21.598564 -- -7.545175, 17.423908,
 21.598564
 07-22 12:50:00.795: INFO/MainActivity.Sensor(367): 284.0, -21.0, 63.0
 -- -7.3785577, 17.477526, 22.036232 -- -7.3785577, 17.477526,
 22.036232
 07-22 12:50:00.965: INFO/MainActivity.Sensor(367): 284.0, -20.0, 63.0
 -- -7.628744, 17.423908, 21.598564 -- -7.628744, 17.423908,
 21.598564
 07-22 12:50:01.075: INFO/MainActivity.Sensor(367): 283.0, -20.0, 63.0
 -- -7.596131, 17.311737, 21.458878 -- -7.596131, 17.311737,
 21.458878
 07-22 12:50:01.255: INFO/MainActivity.Sensor(367): 284.0, -20.0, 63.0
 -- -7.4315057, 17.527277, 21.33686 -- -7.4315057, 17.527277,
 21.33686
 07-22 12:50:01.395: INFO/MainActivity.Sensor(367): 283.0, -20.0, 63.0
 -- -7.847195, 17.804707, 20.847076 -- -7.847195, 17.804707,
 20.847076
 07-22 12:50:01.495: INFO/MainActivity.Sensor(367): 283.0, -20.0, 63.0
 -- -8.424827, 17.770178, 21.15628 -- -8.424827, 17.770178, 21.15628
 07-22 12:50:01.705: INFO/MainActivity.Sensor(367): 282.0, -20.0, 63.0
 -- -27.349527, -63.69813, 21.50518 -- -7.901176, 17.70072, 21.50518
 07-22 12:50:01.765: INFO/MainActivity.Sensor(367): 282.0, -20.0, 63.0
 -- -28.0857, -63.69813, 21.50518 -- -7.901176, 17.70072, 21.50518
--~--~-~--~~~---~--~~
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: What is android.database.sqlite.SQLiteProgram ?

2009-07-22 Thread Rud

Google for SQLite and you'll find a lot of documentation. I have not
worked with it on the Android but used SQLite on the PC using C++ a
couple years ago. It is a nice SQL database.

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 22, 3:00 pm, gnugu rho...@gmail.com wrote:
 There is not much in the documentation.

 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 remap the android coordinate system ??

2009-07-22 Thread Rud

That happens automatically unless you have locked your application
into portrait or landscape mode.

When you are looking at a display the top left corner is always (0,0)
in regular drawing modes. This is true whether the phone is in
portrait or landscape mode.

Rud
http://mysticlakesoftware.blogspot.com/


--~--~-~--~~~---~--~~
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: Is Zoom in And Zoom out is Possible for Image View In android............

2009-07-20 Thread Rud

I'm doing a quick and dirty zoom using the following:

  if (mIsZoomed) {
canvas.translate(-mCenter.x * (mZoomScale - 1), 20);
canvas.scale(mZoomScale, mZoomScale);
}

It shifts my image with the translate and zooms in with the scale.

I set mIsZoomed by:

@Override
public boolean onTouchEvent(MotionEvent event) {
mIsZoomed = !mIsZoomed;
return super.onTouchEvent(event);
}

which responds to the screen being touched.

Rud
http://mysticlakesoftware.blogspot.com/



On Jul 14, 12:20 am, android.vinny vinny.s...@gmail.com wrote:
 Hi

 Is Zooming is possible to do in android for Image view .
 I have a images in full screen view, i need to zoom in and zoom out
 for that images present in image view .
 Can any body give me suggestions regarding this

 Thanks in advance.
--~--~-~--~~~---~--~~
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: Why does DDMS sometimes only show one line of logs?

2009-07-16 Thread Rud

You can get the LogCat to start again by doing a clear. Click on the
icon that looks like a page of paper with an X in the corner.

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 16, 5:09 pm, Roman roman.baumgaert...@t-mobile.com wrote:
 I noticed the same after doing testing for a longer time. Normally I
 connect and disconnect my test phones and after a certain time the
 DDMS shows only one line.

 I assume that this is a bug in DDMS. So far the only way to get this
 resolved is to restart Eclipse and have the device connected. Then
 DDMS is able to pickup correctly the logcat again.

 --
 Roman Baumgaertner
 Sr. SW Engineer-OSDC
 ·T· · ·Mobile· stick together
 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.

 On Jul 16, 8:53 am, Anna PS annapowellsm...@googlemail.com wrote:



  ... usually happens after a force close. Instead of showing the usual
  30 lines or so of logs + scrollable history, it only shows a single
  line or a couple of lines. Very annoying!

  The only fix that I can find is to restart DDMS.

  Anyone have any ideas?

  Thanks
  Anna- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: What SensorManager.getOrientation returns?

2009-07-13 Thread Rud

It works fine on my G1. I'll be posting more info on my blog tonight
(hopefully). Here is a code snippet...

final int matrix_size = 16;
float[] R = new float[matrix_size];
float[] outR = new float[matrix_size];
float[] I = new float[matrix_size];
float[] values = new float[3];

if (mags != null  accels != null  isA) {
isA = false;

SensorManager.getRotationMatrix(R, I, accels, mags);

SensorManager.remapCoordinateSystem(R,
SensorManager.AXIS_X, SensorManager.AXIS_Z, outR);
SensorManager.getOrientation(outR, values);


I'm displaying the three output values and they are commensurate with
the positioning of the phone. This is mapped into camera mode. Also
see the acceleramtere thread (http://groups.google.com/group/android-
developers/browse_frm/thread/2e14272d72b7ab4f#).

Rud
http://mysticlakesoftware.blogspot.com/

--~--~-~--~~~---~--~~
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: Varied accelerometer sample rate

2009-07-12 Thread Rud

You might try writing your data to the LogCat and then capturing it
from there. Writing to a file might be introducing some of the delays
your are seeing.

Another option is to just write to LogCat when the time between
samples exceeds a certain amount.

I've seen file and other I/O impact results on other resource limited
systems when trying to capture real-time data. At least eliminate that
possibility before proceeding.

Rud
http://mysticlakesoftware.blogspot.com/

On Jul 9, 8:52 am, House n @ MIT to...@mit.edu wrote:
 Hello,

 Has anyone been able to get the accelerometer on the G1 to sample
 consistently for long periods of time?

 We’ve been doing some testing of the G1 accelerometer on Android, and
 wanted to see if others have gotten the same result.  Our test uses a
 partial wake lock to keep the CPU alive.  It stores the xyz values and
 time to local storage and then writes them to a file on the SD card
 once a second.  The code below produces a csv file.

 The xyz values we’re getting are within the expected range, but the
 sample rate of the accelerometer varies greatly.  To determine that
 using the file produced, for each sample, we found the difference
 between the sample’s timestamp (taken from the SensorEvent) and the
 timestamp from the previous sample.  The test results showed the time
 between samples ranging from 30 milliseconds up to 4.6 second
 spikes.

 We’re interested to know if other people are seeing similar behavior
 from their phones.  If you have the time and means, please run the
 code below and post your results.

 Thanks

 package edu.acceltest;

 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.PrintWriter;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;

 import android.app.Activity;
 import android.content.Context;
 import android.hardware.Sensor;
 import android.hardware.SensorEvent;
 import android.hardware.SensorEventListener;
 import android.hardware.SensorManager;
 import android.os.Bundle;
 import android.os.PowerManager;

 public class AccelTest extends Activity {

         private SensorManager mSensorManager;
         private PowerManager.WakeLock mWakelock;
     private PowerManager mPowerMgr;

     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

                 // Set up the accelerometer reading
       mSensorManager = (SensorManager)getSystemService
 (Context.SENSOR_SERVICE);
       // Get the list of all sensors, and find the accelerometer
 within
       ListSensor sensorList = mSensorManager.getSensorList
 (Sensor.TYPE_ACCELEROMETER);

       mSensorManager.registerListener(mSensorListener,
                   sensorList.get(0),
                   SensorManager.SENSOR_DELAY_GAME);

       mPowerMgr = (PowerManager)getSystemService(POWER_SERVICE);
                 if (mWakelock == null)
                 {
                         mWakelock = 
 mPowerMgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK
                                                                           , 
 Test);
                         mWakelock.acquire();
                 }

     }

     @Override
     public void onDestroy() {
         if (mWakelock.isHeld())
                 mWakelock.release();

     }

   //Accelerometer
         private final SensorEventListener mSensorListener = new
 SensorEventListener() {

                 private PrintWriter mCurrentFile;
             private Timer second = null;
                 boolean never = true;
                 String comma = new String(,);
                 volatile int index = 0;
                 float zam[] = new float[2000];

                 public void runOnce()
                 {

                         //Creating a file to print the data into

                 String nameStr = new String(/sdcard/Activity - game
 cached.csv);
                         File outputFile = new File(nameStr);
                         mCurrentFile = null;
                         try {
                                 mCurrentFile = new PrintWriter(new 
 FileOutputStream(outputFile));
                         } catch (FileNotFoundException e) {
                                 // TODO Auto-generated catch block
                                 e.printStackTrace();
                         }

                         // Create a 1-second timer to check the sample rate
                         second = new Timer();
                 second.scheduleAtFixedRate(new TimerTask() {

                                 @Override
                                 public void run() {

                                                 // dump to file and reset 
 index, eventually overwriting all the
 data
                                                 System.out.println(Sending);
                                                 int a = 0

[android-developers] Layout with custom View

2009-07-12 Thread Rud

I vaguely recall seeing the use of a custom view class in the layout
XML that was something like:

us.k5rud.experiment.ExpView __something__ View
android:id=@+id/expView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toRightOf=@+id/TextView01

where _something_ was like the Java extends View. It was an
indicator that the custom view was a subclass of an existing View.

Is my memory wrong or just garbage collected?

Rud
http://mysticlakesoftware.blogspot.com/
--~--~-~--~~~---~--~~
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: Varied accelerometer sample rate

2009-07-12 Thread Rud

I did some exploration of sensor data. I setup to sample magnetic
(Ms), accelerometer (As) and orientation (Os). I wrote the time since
the last sample for each sensor to the LogCat and did a cut  paste to
a spreadsheet (after some minor edits in a text processor).

I have 737 total samples with 201 Os, 301 Ms, and 235 As. So the first
comment is that they do not allways appear together. Typical interval
between samples is 220 msecs with a setting of SENSOR_DELAY_NORMAL.
This appears to be a fairly consistent sampling interval or slot.

If a sample is missed during a slot it appears in another slot later.
If an A is missed typically another M appears and then the A in the
slot. In other words, the time interval for the two Ms when added is
the time interval between the As.

In the samples only twice did Ms miss their slot. It may be that this
is the more reliable sensor to use for calculations.

I reran everything with GAMES and FAST rates. The results were similar
as far as the number of each sensor with again Ms appearing as the
most reliable. Os and As varied among the tests.  Typical sample
period is 20 msec for fast and 40 msec for GAMES.

I will probably put more information on my blog in the next day or so.

Rud
http://mysticlakesoftware.blogspot.com/

--~--~-~--~~~---~--~~
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: sensor event and augmented reality

2009-07-11 Thread Rud

I've been looking at all of this the last couple days.

I have an application that puts the three numeric values on the
display. The code is below and I _think_ it is working okay.

My test is to hold the phone against a wooden(!) door so I have a
nearly vertical, steady surface. Say I put the back of the phone
against the wall. I then rotate it through 360 degrees. The bearing
(compass reading -  (outR[0])) remains steady. The third value (value
[2]) rotates through 0 to 180, -180 to -1. If I put the end of the
phone against the door the second value (value[1]) rotates through 0
(right side pointing up) to 80 (laying flat, screen up) to 0 (left
side up) to -80 (-81) when upside down. {It goes 0 to 80 to 0 to -80
to -1, in short).

So basically the numbers look good for determing the position on a
sphere similar to that used in the Google SkyMap application. I
haven't looked at the scaling etc. The only conversion, as you see, is
from raidians to degrees. This is my first result that looked
approximetly correct so there maybe some fine adjustments needed on
conversions, etc and the code needs clean up.

I'm doing the calculation only after receiving an update from the
accelerometer, skipping the magnetic update. I figured doing it each
time was to fast.

Hope this helps. I now need to determine if the three results do
actually give the spherical position. I don't think it is given
directly but needs to be interpolated. Once I get it figured out I'll
put it on my blog.

A word of caution - being near a computer or monitor can distort the
magnetic field. As can being by a metal door. Make sure you are away
from these when testing.

Any comments appreciated.

Rud
http://mysticlakesoftware.blogspot.com/

// make sure there are values from magnetic field,
accelerometer, and only calc after an accerlometer reading.
//
if (mags != null  accels != null  isA) {
boolean b = SensorManager.getRotationMatrix(R, I,
accels, mags);

// remap to camera mode - right side up, screen
facing me
SensorManager.remapCoordinateSystem(R,
SensorManager.AXIS_X, SensorManager.AXIS_Z, outR);
SensorManager.getOrientation(outR, values);
int[] v = new int[3];

v[0] = (int) (values[0] * 57.2957795);   // radians to
degrees
v[1] = (int) (values[1] * 57.2957795);
v[2] = (int) (values[2] * 57.2957795);

isA = false;

// update display
Exp.mText01.setText( + v[0]);
Exp.mText02.setText( + v[1]);
Exp.mText03.setText( + v[2]);
}

On Jul 10, 4:53 am, RS rajeshs...@gmail.com wrote:
 Anybody using sensors and changing orientation  90deg?

 On Jun 30, 4:31 pm, RS rajeshs...@gmail.com wrote:



--~--~-~--~~~---~--~~
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: sensor event and augmented reality

2009-07-11 Thread Rud

I did some testing on the compass direction and the results are, eh,
interesting.

I compared the readings I was getting with the Google Sky Map and they
were basically the same. Here is what I did.

With both my app and SkyMap I had the phone in camera position. I
positioned the phone on a piece of paper and drew a line on along the
side in contact with the paper. I did this for N, E, W,  S. As I
said, the lines from my app agreed with the ones from Sky Map.

I drew a N/S line using a physical compass. The lines for N  S were
rotated a bit clockwise from being right angles to the N/S line. The E/
W lines were both skewed even more clockwise from the N/S line. [Yeah,
I've calibrated the phone doing figure 8's and flipping it while
rotating it, etc.] It also appears that the sensors expect the phone
to be in camera position, i.e. left side down, because when the right
side is down all the compass points are even worse.

I'd be curious to see if other phones get similar results.

Rud
http://mysticlakesoftware.blogspot.com/

--~--~-~--~~~---~--~~
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: I got syntax error of files of svn under eclipse

2009-07-08 Thread Rud

I see the same. Also, somehow the .svn directories are being created
under \bin even though my SVN is setup to ignore \bin.

Rud

On Jul 8, 8:20 am, Victor Lin borns...@gmail.com wrote:
 Hi,

 I am developing android program under eplicse environment. I use svn
 to store all my files. But it seems that svn files cause some problem.

 I got some errors like this:

 Description     Resource        Path    Location        Type
 syntax error    entries /PowerGrid/src/com/ez2learn/android/
 powergrid/.svn  line 1  Android AIDL Problem

 It seems android system wallk all directories under src, and try to
 parse files under .svn folder. Is that bug? how can I fix it?

 Thanks.
 Victor Lin.
--~--~-~--~~~---~--~~
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] Activity Analysis

2009-07-02 Thread Rud

For what it is worth, I have an analysis of the Activity life cycle at
http://sites.google.com/site/mysticlakesoftware/android-surfaceview-template
which includes some skeleton code for an application. I know there are
a lot of other sites that present this information but I may have a
slightly different approach some might find interesting. This will be
an ongoing effort to present Android information on my part.
--~--~-~--~~~---~--~~
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] Strange Situation Debugging on G1

2009-06-29 Thread Rud

I'm playing with an application based on the Professional Android
Developers book Compass example. Since is uses the compass with
the 1.5 SDK it has to debug on the G1.

The application loads and goes through onCreate, onResume, etc. A
worker thread which does the drawing is created in the SurfaceHolder
surfaceCreated call back.

If the G1 is active (display on) this works fine. If the G1 is idle
(screen dark) it gets weird because the thread starts but the various
Paints it needs are null. The way it is written it just loops waiting
for a non-null paint. The subroutines that created the Paints did run,
however.

Justa another tidbit: The LogCat shows AKMD Application OPEN and
then AKMD Application CLOSE intermixed with my Log statements about
the application progress.

Once I activate the display the thread finds the Paints and start to
run. Then it operates properly.

I did check and surfaceDestroyed is _not_ called. There is a call to
surfaceChanged.

I'm just posting this for information or discussion since I don't like
the thread being started in the surfaceCreated call back so will be
changing the overall structure of the application. This weirdness
should only appear in this debug situation because only then is the
screen dark when an application starts.


--~--~-~--~~~---~--~~
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: Sensor and Compass APIDemo failing on emulator 1.5

2009-06-26 Thread Rud

There is a considerable amount of development that can be done, even
without actual sensor hardward. Having to comment out all sensor
related code to get graphics, keystrokes and all the other minutia
working is not productive. The emulator really needs to get fixed.

Rud


On Jun 25, 8:32 pm, Dianne Hackborn hack...@android.com wrote:
 But also, there is no way you are going to be able to implement a
 working app like this without doing it on real hardware.  It would be
 kind-of like trying to implement a touch user interface without a
 touch screen. :)





 On Thu, Jun 25, 2009 at 10:05 AM, Mark Murphymmur...@commonsware.com wrote:

  Is there any update on this?
  I need to build a compuss application but the API Demo doesn't work in
  the emulator.

  You will need actual hardware to test sensor-related applications. Partly,
  this is due to the emulator bug.

  --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
  Android App Developer Books:http://commonsware.com/books.html

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support, and so won't reply to such e-mails.  All
 such questions should be posted on public forums, where I and others
 can see and answer them.- Hide quoted text -

 - Show quoted text -

--~--~-~--~~~---~--~~
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: Sensor and Compass APIDemo failing on emulator 1.5

2009-06-26 Thread Rud

I just tried to run a Compass example in r2 and it hung on getting the
sensor manager. I don't think the bug is fixed and isn't just a
compass bug.

But if you have any suggestions I am open to trying them.

@L!TH!UM - I also am a long time embedded developer. Yes, you have to
get onto the real hardware eventually. I don't know how many times I
had to write special code to prove to the hardware guys that their
design had something wrong.

But it is still very productive to work in an emulator for a lot of
development. It is one thing to have the emulator be incomplete or
something missing. But to hang trying to get the sensor manager is a
major hindarence.

Rud


On Jun 26, 6:47 am, Shang Hao sahilz...@gmail.com wrote:
 Firstly, openIntents sensor simulator is a very good tool for compass
 applications. I have used it without any breakage..

 Further,, the compass bug in 1.5 r1 is FIXED in SDK 1.5 r2. Go
 ahead, there's no breakage now.

 Cheers.



 Peli wrote:
  Unless of course one has a sensor simulator :-)
 http://code.google.com/p/openintents/wiki/SensorSimulator

  (I should mention that we did not have time yet to upgrade it to SDK
  1.5, but some people already got this to work in the 1.5 emulator).

  I'd say simulating the sensors in this way can be quite useful if one
  wants to work out the basic trigonometric relations (which vectors
  correspond to which orientation, etc.), just as it is useful to test
  touch interfaces in the emulator with the mouse, or to think through a
  user interface with pen and pencil.

  Of course, nothing replaces testing on the real device in the end.

  Peli
 www.openintents.org

  On Jun 26, 9:19 am, David Turner di...@android.com wrote:
   On Wed, May 27, 2009 at 1:40 PM, sarang sarangd...@gmail.com wrote:

Is this a bug in emulator 1.5 ?

   Yes, it's a known bug in the 1.5 emulator which will be fixed in the next
   SDK release.

   However, what others have mentioned is true, there is little you will be
   able to do in the emulator anyway; this is the kind of thing that 
   requires a
   real device for proper testing.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---