[android-developers] Re: INSTALL_REFERRER not sent to custom receivers - New Market App

2011-11-02 Thread mscwd01
Also if anyone from Google could let us know if this will be fixed in
a future release of the Market app, it'd be great.

I'm hoping this bug wasn't intended and that install tracking will
be fixed.

On Nov 1, 9:48 am, mscwd01 mscw...@gmail.com wrote:
 Hey

 I used to be able to track installs of apps by placing the
 INSTALL_REFERRER action in my manifest and pointing it to a custom
 receiver. However, it seems the newest version of the Android Market
 app has changed the way it handles the referrer string included in
 market URLs, this means I can no longer track installs.

 An issue was raised back in August but Google hasn't acknowledged it
 and it's not clear if this vital feature is going to be fixed.

 Does anyone know of a workaround that DOES NOT require extra
 permissions that'll enable tracking of installs?

 You can star the issue 
 here:http://code.google.com/p/android/issues/detail?id=19247

 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] INSTALL_REFERRER not sent to custom receivers - New Market App

2011-11-01 Thread mscwd01
Hey

I used to be able to track installs of apps by placing the
INSTALL_REFERRER action in my manifest and pointing it to a custom
receiver. However, it seems the newest version of the Android Market
app has changed the way it handles the referrer string included in
market URLs, this means I can no longer track installs.

An issue was raised back in August but Google hasn't acknowledged it
and it's not clear if this vital feature is going to be fixed.

Does anyone know of a workaround that DOES NOT require extra
permissions that'll enable tracking of installs?

You can star the issue here: 
http://code.google.com/p/android/issues/detail?id=19247

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: Cannot have more than one INSTALL_REFFERER receiver in Android Manifest?

2011-02-28 Thread mscwd01
If no one can offer a solution, the only hack I've found is to
forward the INSTALL_REFERRER intent on to the AdMob manually in my
receiver. Not great at all :(

On Feb 27, 11:27 pm, mscwd01 mscw...@gmail.com wrote:
 I am using the AdMob install receiver in my Android Manifest file,
 e.g.

 !-- AdMob Install Receiver --
 receiver
 android:name=com.admob.android.ads.analytics.InstallReceiver
 android:exported=true
     intent-filter
         action android:name=com.android.vending.INSTALL_REFERRER /
     /intent-filter
 /receiver

 However, I also wish to use my own INSTALL_REFFERER receiver. The
 problem is, when I include my own receiver after the AdMob one, it
 never gets called. If I include mine before the AdMob receiver in the
 manifest file, mine gets called but the AdMob one doesn't.

 Is there anyway I can get both to be called?

 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] Cannot have more than one INSTALL_REFFERER receiver in Android Manifest?

2011-02-27 Thread mscwd01
I am using the AdMob install receiver in my Android Manifest file,
e.g.

!-- AdMob Install Receiver --
receiver
android:name=com.admob.android.ads.analytics.InstallReceiver
android:exported=true
intent-filter
action android:name=com.android.vending.INSTALL_REFERRER /
/intent-filter
/receiver

However, I also wish to use my own INSTALL_REFFERER receiver. The
problem is, when I include my own receiver after the AdMob one, it
never gets called. If I include mine before the AdMob receiver in the
manifest file, mine gets called but the AdMob one doesn't.

Is there anyway I can get both to be called?

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: Camera preview - works on all devices apart from the Droid

2010-05-25 Thread mscwd01
Surely I cant be the only one to encounter problems with this?

On May 24, 6:19 pm, mscwd01 mscw...@gmail.com wrote:
 Hey,

 This is my code I use to display a preview from the camera on a
 SurfaceView:

 public void surfaceChanged(SurfaceHolder holder, int format, int w,
 int h) {

         Camera.Parameters parameters = mCamera.getParameters();
         ListSize cameraSizes =
 CameraReflect.getSupportedPreviewSizes(parameters);
         if(cameraSizes != null  cameraSizes.size()  0) {
                 parameters.setPreviewSize(Math.max(cameraSizes.get(0).width,
 cameraSizes.get(0).height), Math.min(cameraSizes.get(0).width,
 cameraSizes.get(0).height));
         }
         else {
                 parameters.setPreviewSize(Math.max(w, h), Math.min(w, h));
         }
         mCamera.setParameters(parameters);
         mCamera.startPreview();

 }

 It's pretty basic stuff; it uses reflection to determine if the
 version of Android the user is running supports the
 getSupportedPreviewSizes() method. If it does it obtains the width and
 height and sets these as the preview size. If the version of Android
 is older it will just set it as the width and height returned by the
 SurfaceView.

 However, it seems the Motorola Droid/Milestone doesn't like this code
 and will instead show a blank screen instead of the camera preview.

 Could someone kindly tell me where i'm going wrong?

 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 
 athttp://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] Camera preview - works on all devices apart from the Droid

2010-05-24 Thread mscwd01
Hey,

This is my code I use to display a preview from the camera on a
SurfaceView:

public void surfaceChanged(SurfaceHolder holder, int format, int w,
int h) {

Camera.Parameters parameters = mCamera.getParameters();
ListSize cameraSizes =
CameraReflect.getSupportedPreviewSizes(parameters);
if(cameraSizes != null  cameraSizes.size()  0) {
parameters.setPreviewSize(Math.max(cameraSizes.get(0).width,
cameraSizes.get(0).height), Math.min(cameraSizes.get(0).width,
cameraSizes.get(0).height));
}
else {
parameters.setPreviewSize(Math.max(w, h), Math.min(w, h));
}
mCamera.setParameters(parameters);
mCamera.startPreview();
}

It's pretty basic stuff; it uses reflection to determine if the
version of Android the user is running supports the
getSupportedPreviewSizes() method. If it does it obtains the width and
height and sets these as the preview size. If the version of Android
is older it will just set it as the width and height returned by the
SurfaceView.

However, it seems the Motorola Droid/Milestone doesn't like this code
and will instead show a blank screen instead of the camera preview.

Could someone kindly tell me where i'm going wrong?

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: Device Seeding Program for Top Android Market Developers

2010-04-29 Thread mscwd01
Yes! Thanks Google.

My Nexus One arrived via FedEx today. I live in the UK and it was
shipped via Brightpoint Netherlands.

Thanks again!


On Apr 29, 9:07 am, cannehal tomasz.l...@gmail.com wrote:
 Here is link to map. You can add your location (not exact of course)
 there when you receive your phone.

 http://maps.google.com/maps/ms?ie=UTFmsa=0msid=
 109593402120975111968.0004855b7d8eefa5f649b

 On Apr 29, 10:02 am, ratson materem...@gmail.com wrote:





  WOW i just got confirmation from local FedEx, my N1 will arrive today
  or by latest tomorrow :)
  i have called them and told the destination address, so they could
  tell me the tracking number.
  thank you google ;)

  On ápr. 29, 09:40, ratson materem...@gmail.com wrote:

   I think this is the time when you shall really post to this forum if
   you have received your N1. :) someone has the time to create a gmaps
   mashup? :)
   patiently waiting for mine in Hungary

   On ápr. 29, 09:35, Benjamin Rosseaux benja...@rosseaux.com wrote:

How long have you waited for it?

On 29 Apr., 09:03, Kevin Gaudin kevin.gau...@gmail.com wrote:

 Nexus One received in France ! No FroYo but a french power adapter :)

 Sent by Brightpoint from netherland via France Express.

 THANK YOU GOOGLE 

 On 29 avr, 07:36, Jompe71 jonas.ahnl...@bostream.nu wrote:

  -The only way to get a free phone from Apple is to go and get a 
  drink
  with Gray
  Powell.

  Hmmm, last time I checked Apple didn't promise one either!

  What Google is up to with this seeding joke (which obviously is
  nothing) it's ignorance, pure and simple.
  Fake promises are far more worse than no promises. I'm off to 
  IPhone!

  On 28 Apr, 09:37, amiuhle timouhlm...@googlemail.com wrote:

   On 27 Apr., 22:25, Olivier Bonal olivier.bo...@gmail.com wrote:

The only way to get a free phone from Apple is to go and get a 
drink with Gray
Powell.

   Haha, great one!

   --
   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 
   athttp://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 
  athttp://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 
 athttp://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 
athttp://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 
   athttp://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 
  athttp://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 
 athttp://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 

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

2010-04-29 Thread mscwd01
Only slight issue is that it comes with a European (American?) wall
socket charger, so you will have to charge it via USB. (My old HTC
Hero charger isn't compatible)
I'm going to buy the dock today though so that will solve that
problem.

Anyway, having used a Hero before the N1 is amazing, I hope everyone
else gets their phone soon!

On Apr 29, 9:21 am, Pieter pie...@gamesquare.nl wrote:
 I got mine also (in the Netherlands, delivered by FedEx). Actually
 this is the second one as we also received one earlier for reaching
 round 2 of ADC2.

 Much obliged Google! We will sure put these devices to good use
 testing.

 --
 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 
 athttp://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: Device Seeding Program for Top Android Market Developers

2010-04-28 Thread mscwd01
I'm just speculating here however, it may have been the case that
Brightpoint (or whoever distributes the N1 to European providers)
needed to stock places like Vodafone before issuing out free handsets.
A report today says they are already experiencing N1 shortages and
need to await more stock before taking more preorders. (http://
phandroid.com/2010/04/27/nexus-one-stock-runs-dry-for-uk-release/)

I cant believe Google would promise us free dev phones and then deny
us this opportunity without any explanation. They'll come i'm sure
however, the longer we wait the less time we'll have to ensure our
apps work well on these new devices consumers are starting to buy.

Someone at Google must know exactly what is going on, it wouldn't take
5 minutes to post here and stop all this speculating/moaning/
anticipation.

On Apr 28, 10:01 am, Thomas Riley tomrile...@googlemail.com wrote:
 Fair point, but, since the devices we get are likely american spec
 (with US chagers) it has nothing todo with vodafone. At the end of the
 day, Brightpoint will have messed up like you say... just a matter of
 playing the waiting game.

 On Apr 28, 6:16 am, dgoemans dgoem...@gmail.com wrote:





  i'd just like to throw a little extra into the mix. ye, fine Google
  promised and failed. But, going to iPhone is just stupid. Apple
  promised a European iPad by now and then delayed it by a month to
  better serve their US customers. Apple don't even offer dev devices,
  and without some fancy import tricks, there's no legal way of getting
  an iPad here. So ye, this is still a free gift, and i'm as filled with
  anticipation about getting a Nexus One as the next dev, but if Google
  screw it up, i don't see them as being bad.

  It's probably just a delay on the distributor side ( probably
  BrightPoint ) because they had to stock up Vodafone first. And it'd be
  nice for Google to tell us this, but they may not be allowed to -
  keeping these sort of distribution contracts in mind. I suggest we
  just suck it up, joke around a bit and be patient. Then report back
  when they arrive. Hopefully before i move house!

  On Apr 27, 11:38 pm, Thomas Riley tomrile...@googlemail.com wrote:

   I can see what your saying, it's a free device... however, if they are
   going to successfully run a program in the US and promise to deliver
   the same scheme in other countries I expect that a company with the
   resources of Google to be able to put it off.

   The other thing I find interesting is a few UK developers had phones
   within the time scale, I can only assume these people qualified under
   the ADC2 Top100 grouping and those who are qualifying under the 3.5*
   grouping have missed out.

   It would be nice if someone could officially tell us what is going on,
   even if it's just a post on here.

   On Apr 27, 10:21 pm, Vladimir vladimir.funti...@gmail.com wrote:

OMG Google lied to me, things will never be the same, ba, moving
to iPhone

Well maybe Google employees have more important things to do than
swimming across the atlantic to deliver free phones to random dudes
who happened to publish 3.5* apps. They're rolling out OS updates
pretty quickly, there are some awesome devices on sale and coming,
market share is growing, etc. Maybe delivering phones to us is not
their top priority. After all, developing and marketing an OS is a bit
more complicated than publishing your edition of Lunar Lander. I think
we can forgive them for not being fully committed to delivering these
freebies :)

On Apr 27, 10:39 pm, Jompe71 jonas.ahnl...@bostream.nu wrote:

 Isn't this a true fact of promises never fulfilled by Google?

 Either you get a free phone within' the expected date or you don't.
 Everything else is just empty promises worth nothing.
 Google can reply to any email they like with any response what so ever
 stating developers have to keep the good faith up, phones are coming.

 Bottom line is... NO!
 Phones are NOT coming. This is a fake promise to get the market going
 again!
 If there was any solid truth beyond this email, Google employees would
 be swimming across the atlantic, daring volcano ashes etc. to get to
 phone to the developers.

 A delay of 100% in time is just plain ignorance, circumstances has
 nothing to do with it!
 Credit to all independent developers who state here that the moved
 over to IPhone.
 I for one received the free phone mail, but have'd stopped hoping,
 and have moved on to the IPhone platform.
 A lie is a lie and without proper explanation trust cannot be
 repaired...

 --
 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 

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

2010-04-22 Thread mscwd01
I received the usual response from Google today saying there were
issues which are now resolved. Again, I was given the your phone
should arrive in 1-2 weeks time frame.

Being stuck with a 1.5 device this wait is not ideal...

On Apr 22, 9:36 am, Lorents iva...@gmail.com wrote:
 No news in Norway either...
 *yawn*

 --
 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 
 athttp://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: Device Seeding Program for Top Android Market Developers

2010-04-19 Thread mscwd01
Has anyone had a reply from Google regarding a potential delivery time-
scale to Europe?
I have been waiting 7 weeks now and cant seem to get a reply to any
emails I send their way.

Thanks

On Apr 17, 9:12 am, Lorents iva...@gmail.com wrote:
 Damn Icelandic people... First they mess with the world economy, and
 now they spew ash around europe!

 (just kidding)

 --
 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 
 athttp://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: Device Seeding Program for Top Android Market Developers

2010-04-19 Thread mscwd01
Many people have said the phones will be shipping not from the US but
from a warehouse in Europe so I agree that the volcano shouldn't have
any effect on delivering the phones. They would be sent over land not
by air - which makes me wonder if there is another issue delaying the
phones?

On Apr 19, 12:25 pm, JDS jesper.d.svens...@gmail.com wrote:
 No news from anybody in europe?

 Since the phones to EU, or at least to us in sweden, are shippen from
 Frankfurt at least people in germany should have received theirs by
 now, with or without any volcano?

 --
 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 
 athttp://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: Getting the url of an http response

2010-04-07 Thread mscwd01
I think your asking for the final URL you are redirected to... right?

If so this should help nicely: 
http://www.example-code.com/java/http_redirect.asp

I think you need to pay attention to this part:

if (http.get_WasRedirected() == true) {
System.out.println(This was a redirect response);

System.out.println(Redirect URL:);
System.out.println(http.finalRedirectUrl());

}

Hope that helps ;)

On Apr 7, 4:01 pm, jw jwilner...@gmail.com wrote:
 Kevin, see my previous reply
 Thanks

 On Apr 7, 4:47 pm, Kevin Duffey andjar...@gmail.com wrote:



  As Mike says, it seems something is missing from your description. From what
  you said in your response earlier, you are being redirected. However,
  because you are making the first request, the only way you could be
  redirected is if the response you got back was a 301 with a Location header
  filled out. THEN, you make a second request using the Location URL that is
  returned. If you're getting a 404, as Mike said, the initial URL you're
  requesting is not being found. I am guessing you are not showing your
  complete code, or being completely descriptive because well, you don't want
  to give away your secret sauce.. which I can understand. But something is
  missing from this that is not allowing us to help you further.

  On Wed, Apr 7, 2010 at 7:15 AM, mike enervat...@gmail.com wrote:
   On 04/07/2010 03:56 AM, jw wrote:

   Well, I'm able to set the response url in the web service, but it's
   the parameters I'm interested in... For now I've just set the response
   URL towww.google.comandthe web service adds my parameter which
   giveswww.google.com/?x=1y=2... Since this page is not available, I
   get the 404 status code, not 3xx...

   Er, um, 404 says that it's not there and that it doesn't know
   where it might be, so it's no surprise there's not a Location:
   header.

   I suspect that you're not describing the entire process
   adequately for us to figure out what's going on. There is
   no such thing as a response url and a web service isn't
   especially well defined. Putting these things in terms of what
   HTTP 1.1 the protocol does would make it easier.

   Mike, you're not conflating xml/json in the content by any chance?

    Any help?

   /J

   On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:

   On 04/07/2010 02:30 AM, jw wrote:

   Hi, thanks for the idea, but it didn't help.

   response.getHeaders(Location)[0] gives me null. I've also tried to
   print all header keys and vaules, and none of them are Location.

   Are you sure you're actually getting a 3xx code back from the
   http response? A 301 without a Location header would be bogus.

   You might try using a network sniffer like ethereal to see the
   actual network traffic going by too.

   Mike

   Any other ideas?

   /J

   On Apr 7, 11:12 am, mikeenervat...@gmail.com    wrote:

   On 04/07/2010 12:40 AM, jw wrote:

   Hi all,

   thanks for your time and sorry that I wasn't clear enough.

   I'm making a http post request to a web page which redirects me to
   different urls depending on the accuracy of my parameters sent in the
   request. This means that if I do it correct, I'll get redirected to
   for examplewww.google.comwithaquerystringthat I need to get
   (www.google.com?x=1y=2). Maybe that's not the response url, but I
   don't now how to describe it. It's not the same as the request url
   anyway.

   I'm able to get the response status code from the repsonse object,
   which is ok, and I'm also able to get the html (content) of the
   response. I just need to know what url I was redirected to. Does this
   help you? I'm very thankful for all help

   sounds like you want to use HttpResponse.getHeaders(Location)

   Mike, it returns an array, but there should only be one if it 
   redirected

   /J

   On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com      wrote:

   There isn't a response URL that is any different than the request URL.
   It's
   not as if the server appends a bunch of stuff to the URL you submit
   the
   request to unless it redirects/forwards to another URL.. in this
   case, the
   server would append to the URL you requested, redirecting you... but
   even if
   it did this, your response would indicate a 3xx redirect and the
   Location
   header, as Frank says above, would contain the new URL you should go
   to. If
   you did get a 301/2 back, you'd have to actually make another 
   request
   yourself.

   So not sure as the other guys say, what URL you are talking about

   On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com
    wrote:

   I don't know what response URL means. The only URLs in an HTTP
   response
   that come to mind are: 1) the Location response header for a
   301/302
   status code, 2) some string in the response data (such as an HTML
   anchor
   element) that you want to interpret as a URL.

   On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com      wrote:

   Hi 

[android-developers] Re: real ip address

2010-03-30 Thread mscwd01
The only way I found to do this was by opening a socket connection and
reading the IP that way. I couldn't find a nice getIP() method.

On Mar 30, 11:32 am, Engin Arslan enginarsla...@gmail.com wrote:
 Hi All ,
 Can I get real ip address of android phone

 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


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

2010-03-25 Thread mscwd01
I'm in the UK too and still waiting. Are you sure FedEx will be used
in the UK? It could be Royal Mail, Parcel Force, DPD etc...

On Mar 25, 2:06 pm, David Horn pga...@gmail.com wrote:
 I was about to say that I'm very grateful to be offered a free Nexus
 One and would suggest that you wait until after the deadline before
 whining- uh, asking where it is.

 Dave.

 On Mar 25, 1:57 pm, Thomas Riley tomrile...@googlemail.com wrote:

  Good point, will send an email their way.

  On Mar 25, 1:45 pm, Arnon arnonse...@gmail.com wrote:

   I think you can contact the Android Market Seeding email and ask about
   it,
   In my opinion, four business days left for your deadline is a
   reasonable time to approach them

   On Mar 25, 3:37 pm, Thomas Riley tomrile...@googlemail.com wrote:

Just spoken to FedEx UK... no sign of any parcel for me in their
system :(

The 4 week estimate is this Tuesday for me.

On Mar 25, 8:35 am, Arnon arnonse...@gmail.com wrote:

 Same here.
 Got online with FedEx Italy, they searched from March 18 till today
 and found no package.
 I hope they will start with Italy distribution soon.
 4 Weeks from form submittion date for me are next friday.

 If anyone from EU recieves the phone, please let us know who shipped
 it and where from

 Thanks!

 On Mar 24, 9:07 pm, Markus tamet...@gmail.com wrote:

  I called them too (Switzerland).
  Guy did the search but told me there's no package on the way for me.
  So either it has not been sent yet or they don't use Fedex over 
  here.

  On Mar 24, 8:02 pm, Thomas Riley tomrile...@googlemail.com wrote:

   I tried live chat (in the UK) and it's not much use (same applies 
   on
   phone actually)

   To be able to track they want to know dispatch date, which I of 
   course
   don't know!

   On Mar 24, 6:40 pm, Bryan Allen browne.al...@gmail.com wrote:

Live chat with FedEx works great. Your address, the shipper 
name, and you're
golden. I spent about 4 minutes on it and found out it's 
arriving today!
Better than a 20 minute hold on the phone.

-Bryan

On Wed, Mar 24, 2010 at 1:14 PM, abowman abow...@gmail.com 
wrote:
 If you trust your neighbors, just leave a note for them to 
 leave the
 package at your door.

 On Mar 24, 1:19 pm, JasonC jcohe...@gmail.com wrote:
  Ya Rocco, they will give you the info even without a 
  tracking number.
  I called FedEx yesterday and waited on hold for 20 minutes. 
  Gave them
  my name address and phone number and I found out that my 
  phone will be
  delivered tomorrow between 8am and 6pm, unfortunately i 
  will be at
  work so I will have to drive out to the hub on friday to 
  pick it up.

  Jason

  On Mar 23, 9:18 pm, Rocco optikalsa...@gmail.com wrote:

   If you're in the US and Google sent you a confirmation 
   number and you
   want to know when you're getting your handset, just give 
   FedEx a call
   from the number you provided Google with when you filled 
   out the form.
   Even without your tracking number, as long as you contact 
   them from
   that number and give the customer service rep your 
   delivery address
   they will be able to tell you when they expect to deliver 
   it. They
   might have you verify the name of the shipper as well 
   which in this
   case is Brightpoint.

   I just did this earlier and found out I should expect my 
   phone between
   the hours of 8am-6pm on Friday March 26th, 2010. Now I no 
   longer have
   to play the guessing game or check this message 8 times a 
   day to see
   if anyone in Oregon got their handset ;)

 --
 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%2Bunsubs
  cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to 
 android-developers+
 unsubscribegooglegroups.com or reply to this email with the 
 words REMOVE
 ME as the subject.- 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 

[android-developers] Re: Need a Nexus One tester with logcat

2010-03-09 Thread mscwd01
I think I may know why your app doesn't work on the Nexus. It's to do
with setting the preferred size of the Camera view on the Surface
View.

I have a similar augmented reality app and had to use a reflection to
solve the issue.

Take a look at the code a developer posted here:
http://groups.google.com/group/android-developers/browse_thread/thread/5e4462d06d6716a7/04159321eb864e51?lnk=gstq=camera+setPreviewSize%2C+on+Nexus+One#04159321eb864e51

The good news is I have a friend who tested my app on a Nexus after
the update and it worked fine; however, I then had someone else
mention it still doesn't work - it's possible they never updated
though...

On Mar 9, 10:51 am, Lance Nanek lna...@gmail.com wrote:
 I was thinking you could test it on an Android 2.1 emulator device at
 least, but it force closes due to not finding a sensor. Maybe if you
 fixed that, just make it show a static view or something when it can't
 get the sensor, you could at least do a little testing there. Might
 catch the issue if it is Android 2.1 related rather than Nexus One
 related.

 On Mar 9, 2:15 am, Funksta geoff.sim...@gmail.com wrote:

  Hello,

  I am trying to figure out why my app forces close immediately on a
  nexus one (recurring comment which is dragging my rating down).

  Ironically, I heard a rumor that if I had just a half star more (up to
  3.5 from 3), I would qualify to get a free nexus one from google.

  If anybody has a nexus one and can connect it up to get the logcat
  dump of the stack trace of the error, I would be very thankful.

  You can find my app by searching for Compass Ball on the market.

  Thanks in advance,
  Geoff

-- 
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: Android Device Seeding Program - Differences in phone for developers?

2010-03-09 Thread mscwd01
I'd be suprised if it didn't have some kind of Device Seeding
inscription on the back of the Nexus, but apart from that it's in
their interest to make it no different to the device the paying public
can buy.

On Mar 9, 12:19 pm, nickthecook nickthec...@gmail.com wrote:
 Does anyone know if the Nexus One that Google is sending developers as
 part of the Device Seeding Program is different from the ones people
 get when they order them from Google's website?

 Different packaging? Different firmware? Different pattern on the
 case?

 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: Supress the native In Call Screen and replace with 3rd party?

2010-03-05 Thread mscwd01
I haven't looked into it but there must be an intent-filter you can
use to launch your Call screen when necessary?

On Mar 5, 9:39 am, draf...@gmail.com draf...@gmail.com wrote:
 Currently creating a VOIP application for Android and I was wondering
 is there any possible way to supress the In Call Dialog when sending a
 call over GSM and use our own 3rd party In Call Dialog or screen
 instead?

 At the minute when we switch from our VOIP call and send it over GSM
 via the ACTION_CALL intent it does everything we want except it brings
 up the native In Call screen whereas we want our own In Call screen to
 display here.

 So I was wondering what kind of options we would have on this?

 What would you reccomend we look into doing?

 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: Google: is this real?

2010-03-03 Thread mscwd01
It's funny how we all automatically assume this is a scam, but from
the thread below it seems it's legitimate:

http://groups.google.com/group/android-developers/browse_thread/thread/49da01a3cb7f8803/d51548090313040e#d51548090313040e

I sincerely hope I do get a Nexus One as my apps dont play well on
Android 2.0+ and I need the device for testing purposes!

On Mar 3, 3:22 pm, social hub shubem...@gmail.com wrote:
 there is already one thread going on there about being real.

 you can check that one from that thread AFAIK it seems real and guy from
 android developer relation mentioned it too.

 Congrats on your achievement

 On Wed, Mar 3, 2010 at 9:16 AM, Ian heads...@gmail.com wrote:
  Can someone from Google answer, and tell me if this is real?

 http://sites.google.com/site/developermarketandroidgiveaway/registrat...

  It looks phishy, but I already got a free phone from HTC (for porting
  my apps to QVGA), so it doesn't look too far-fetched.  OTOH 5,000
  downloads is really small.

  Ian

  --
  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: Device Seeding Program for Top Android Market Developers

2010-03-02 Thread mscwd01
Can I get an idea of how many people have submitted their details?

I am still fairly sure this is not legit but the evidence is starting
to say I am wrong.

And why oh why cant an official Google person post here and confirm/
deny this?

On Mar 3, 12:59 am, Greg Donald gdon...@gmail.com wrote:
 On Tue, Mar 2, 2010 at 6:41 PM, JasonC jcohe...@gmail.com wrote:
  Called Google ... 100% legit !!!

 Google has a phone number?

 --
 Greg Donald
 destiney.com | gregdonald.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: Device Seeding Program for Top Android Market Developers

2010-03-02 Thread mscwd01
I wish I wasn't so pessimistic! I think i'll just submit my details as
I cant see the form asking for anything too sensitive details wise.

On Mar 3, 1:09 am, Rob Franz rob.fr...@gmail.com wrote:
 Ok great. Now that we have this settled -

 Can I please have a Nexus One?  I don't have Verizon - I have T-Mobile.
  That is all.

 Thanks,
 Rob

 On Wed, Mar 3, 2010 at 12:06 PM, Mark Murphy mmur...@commonsware.comwrote:

  Thomas Riley wrote:
   Everyone! You can trust Roman!

  Agreed -- I've met him. He's a real live Googler! Or else he's one hella
  convincing hologram!

  :-)

   Although, the one and only commonsguy
   is the icing on the cake!

  That would be one icky cake, IMHO...

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

  Warescription: Three Android Books, Plus Updates, One Low Price!

  --
  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: Device Seeding Program for Top Android Market Developers

2010-03-02 Thread mscwd01
No its the order number of the Google checkout receipt you got when
you registered as a developer/publisher.

Just one last question. Why would the form have this question:
Future Offers * Can we contact you with offers related to Android or
the Android market going forward? Your information will not be shared
with any third parties.

Google emails us this kind of information anyway...

On Mar 3, 1:17 am, wmhtet g1.wmh...@gmail.com wrote:
 Google Order Number * For verification purposes, please enter the
 order number listed on your receipt when you registered as an Android
 Developer on Checkout. You can look up your Google Order Number in
 your order history when you log into the Checkout account you used to
 register. We cannot verify your authenticity without this
 information.

 Is it an order number for Android Dev phone? If not, I am a bit
 clueless with Google Order Number thing.

 On Mar 2, 4:46 pm, Roman Nurik romannu...@google.com wrote:

  Folks, the email is NOT a fake. We will look into the email issues.

  Roman Nurik
  Android Developer Relations, Google

  NOTE: please do not send me email directly about this.

  On Mar 2, 4:43 pm, Mark Anacker closecr...@gmail.com wrote:

   Well, if nothing else, Google should now be on the lookout for
   potential fraudulent activity involving developer account and order
   numbers.  Especially originating out of China :-)  Although it would
   be nice to think that they would have someone in a Security role who
   could jump on this sort of thing, and provide some official
   information.  But their warehouses full of geniuses are probably much
   too busy for such trivial matters... :-)

-- 
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: Device Seeding Program for Top Android Market Developers

2010-03-02 Thread mscwd01
I went against my better judgement and submitted the form, i'll be
crossing my fingers too.


On Mar 3, 1:31 am, havexz bali.param...@gmail.com wrote:
 I am crossing my fingers and submitting the form...rest we ll C

 On Mar 2, 6:46 pm, Roman Nurik romannu...@google.com wrote:

  Folks, the email is NOT a fake. We will look into the email issues.

  Roman Nurik
  Android Developer Relations, Google

  NOTE: please do not send me email directly about this.

  On Mar 2, 4:43 pm, Mark Anacker closecr...@gmail.com wrote:

   Well, if nothing else, Google should now be on the lookout for
   potential fraudulent activity involving developer account and order
   numbers.  Especially originating out of China :-)  Although it would
   be nice to think that they would have someone in a Security role who
   could jump on this sort of thing, and provide some official
   information.  But their warehouses full of geniuses are probably much
   too busy for such trivial matters... :-)

-- 
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: Device Seeding Program for Top Android Market Developers

2010-03-02 Thread mscwd01
I have no confirmation either, and I made sure I entered my details
correctly ;)

On Mar 3, 1:13 am, Androidz base...@gmail.com wrote:
 Very cool guys, I've been debating on which new phone to buy, but I
 guess you can make the decision for me in this case!

 854x440 devices and larger tablets are going to be the future of
 personal computing.

 I had no hesitation filling out the form due to correct email signage
 from the mother of all domains ;D

 On Mar 2, 5:09 pm, Rob Franz rob.fr...@gmail.com wrote:

  Ok great. Now that we have this settled -

  Can I please have a Nexus One?  I don't have Verizon - I have T-Mobile.
   That is all.

  Thanks,
  Rob

  On Wed, Mar 3, 2010 at 12:06 PM, Mark Murphy mmur...@commonsware.comwrote:

   Thomas Riley wrote:
Everyone! You can trust Roman!

   Agreed -- I've met him. He's a real live Googler! Or else he's one hella
   convincing hologram!

   :-)

Although, the one and only commonsguy
is the icing on the cake!

   That would be one icky cake, IMHO...

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

   Warescription: Three Android Books, Plus Updates, One Low Price!

   --
   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: Device Seeding Program for Top Android Market Developers

2010-03-02 Thread mscwd01
It's official:
http://techcrunch.com/2010/03/02/google-handing-out-free-nexus-ones-and-droids-to-top-android-devs/

On Mar 3, 1:37 am, BeMeCollective bemecollect...@gmail.com wrote:
 Hi All!
 I got it too.
 It's a nice gesture. I wish that in addition Google would let me
 monetize my applications in the market.
 Being Canadian I can only give away free apps, not sell. Please open
 the Market to Canadian Vendors!
 Best regards,
 BeMeCollective

-- 
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] Draw a Bitmap by specifying the x,y locations of the four corners

2010-03-01 Thread mscwd01
Hi,

I want to draw a bitmap on the screen by specifying the x,y locations
of the four corners. I.e. I have a square bitmap and I would like to
draw the:

* Top right corner at pixel x=100,y=100
* Bottom right corner at pixel x=120,y=220
* Bottom left corner at pixel x=50,y=200
* Top left corner at pixel x=5,y=90

I have seen the Canvas method: public void drawBitmap (Bitmap bitmap,
Rect src, RectF dst, Paint paint)

However I believe this takes the top, right, bottom and left
coordinates to draw the Bitmap and not the corner coordinates. I need
to specify the CORNER coordinates to draw the bitmap as I may need to
stretch/distort the Bitmap (I am drawing the Bitmap on a 3D spherical
model).

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: Draw a Bitmap by specifying the x,y locations of the four corners

2010-03-01 Thread mscwd01
Hey,

Thanks for the tip. I have had a look at drawBitmapMesh in the docs
and it has left me slightly confused. Do you know how it is meant to
be used?

Thanks

On Mar 1, 4:04 pm, skink psk...@gmail.com wrote:
 On Mar 1, 2:50 pm, mscwd01 mscw...@gmail.com wrote:



  Hi,

  I want to draw a bitmap on the screen by specifying the x,y locations
  of the four corners. I.e. I have a square bitmap and I would like to
  draw the:

      * Top right corner at pixel x=100,y=100
      * Bottom right corner at pixel x=120,y=220
      * Bottom left corner at pixel x=50,y=200
      * Top left corner at pixel x=5,y=90

  I have seen the Canvas method: public void drawBitmap (Bitmap bitmap,
  Rect src, RectF dst, Paint paint)

  However I believe this takes the top, right, bottom and left
  coordinates to draw the Bitmap and not the corner coordinates. I need
  to specify the CORNER coordinates to draw the bitmap as I may need to
  stretch/distort the Bitmap (I am drawing the Bitmap on a 3D spherical
  model).

  Thanks

 hi,

 try drawBitmapMesh

 pskink

-- 
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: Draw a Bitmap by specifying the x,y locations of the four corners

2010-03-01 Thread mscwd01
I found this in the Demos:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/BitmapMesh.html

However, I cant see how this will help me draw a Bitmap by specifying
the x,y coordinates of each corner though.

If only Android had a drawBitmap(Bitmap, x1,y1, x2,y2, x3,y3, x4,y4)
method!

If I am overlooking the drawBitmapMesh method however, please let me
know.

Thanks

On Mar 1, 5:56 pm, skink psk...@gmail.com wrote:
 On Mar 1, 4:23 pm, mscwd01 mscw...@gmail.com wrote:



  Hey,

  Thanks for the tip. I have had a look at drawBitmapMesh in the docs
  and it has left me slightly confused. Do you know how it is meant to
  be used?

  Thanks

  On Mar 1, 4:04 pm, skink psk...@gmail.com wrote:

   On Mar 1, 2:50 pm, mscwd01 mscw...@gmail.com wrote:

Hi,

I want to draw a bitmap on the screen by specifying the x,y locations
of the four corners. I.e. I have a square bitmap and I would like to
draw the:

    * Top right corner at pixel x=100,y=100
    * Bottom right corner at pixel x=120,y=220
    * Bottom left corner at pixel x=50,y=200
    * Top left corner at pixel x=5,y=90

I have seen the Canvas method: public void drawBitmap (Bitmap bitmap,
Rect src, RectF dst, Paint paint)

However I believe this takes the top, right, bottom and left
coordinates to draw the Bitmap and not the corner coordinates. I need
to specify the CORNER coordinates to draw the bitmap as I may need to
stretch/distort the Bitmap (I am drawing the Bitmap on a 3D spherical
model).

Thanks

   hi,

   try drawBitmapMesh

   pskink

 never used it, but see ApiDemos: there is a demo that uses
 drawBitmapMesh

-- 
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: Draw a Bitmap by specifying the x,y locations of the four corners

2010-03-01 Thread mscwd01
I realise the verts array is what manipulates the Bitmap, however I am
unsure how I construct the verts array.

Basically I have calculated where the four corners of the Bitmap
should be drawn on the screen (I have four x,y pairs), I just need to
work out how to construct a verts array which enables me to draw the
Bitmap where I need it.

I have searched for some documentation on the Mesh object and can find
nothing useful.

Thanks for your help.

On Mar 1, 6:43 pm, skink psk...@gmail.com wrote:
 On Mar 1, 5:21 pm, mscwd01 mscw...@gmail.com wrote:

  I found this in the 
  Demos:http://developer.android.com/resources/samples/ApiDemos/src/com/examp...

  However, I cant see how this will help me draw a Bitmap by specifying
  the x,y coordinates of each corner though.

  If only Android had a drawBitmap(Bitmap, x1,y1, x2,y2, x3,y3, x4,y4)
  method!

  If I am overlooking the drawBitmapMesh method however, please let me
  know.

  Thanks

 i cant test it now, but looking into docs you need verts array with
 eight elements, something like this:

 drawBitmapMesh(bitmap, 1, 1, verts, 0,
 null, 0, null)

 pskink

-- 
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: Draw a Bitmap by specifying the x,y locations of the four corners

2010-03-01 Thread mscwd01
Thanks for your help pskink, this was the solution in the end:

float[] verts = {nwTranslation[0], nwTranslation[1],
neTranslation[0], neTranslation[1],
swTranslation[0], swTranslation[1],
seTranslation[0], seTranslation[1]} ;

canvas.drawBitmapMesh(bitmapImg, 1, 1, verts, 0, null, 0, paint);

On Mar 1, 7:26 pm, skink psk...@gmail.com wrote:
 On Mar 1, 5:54 pm, mscwd01 mscw...@gmail.com wrote:



  I realise the verts array is what manipulates the Bitmap, however I am
  unsure how I construct the verts array.

  Basically I have calculated where the four corners of the Bitmap
  should be drawn on the screen (I have four x,y pairs), I just need to
  work out how to construct a verts array which enables me to draw the
  Bitmap where I need it.

  I have searched for some documentation on the Mesh object and can find
  nothing useful.

  Thanks for your help.

  On Mar 1, 6:43 pm, skink psk...@gmail.com wrote:

   On Mar 1, 5:21 pm, mscwd01 mscw...@gmail.com wrote:

I found this in the 
Demos:http://developer.android.com/resources/samples/ApiDemos/src/com/examp...

However, I cant see how this will help me draw a Bitmap by specifying
the x,y coordinates of each corner though.

If only Android had a drawBitmap(Bitmap, x1,y1, x2,y2, x3,y3, x4,y4)
method!

If I am overlooking the drawBitmapMesh method however, please let me
know.

Thanks

   i cant test it now, but looking into docs you need verts array with
   eight elements, something like this:

   drawBitmapMesh(bitmap, 1, 1, verts, 0,
   null, 0, null)

   pskink

 maybe try this one:

 a - top-left corner
 b - top-right corner
 c - bottom-left corner
 d - bottom-right corner

 verts = {
 ax, ay, bx, by, cx, cy, dx, dy

 }

 just guess...

 pskink

-- 
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] Load image from Jar file

2010-01-15 Thread mscwd01
Hey,

I realise the correct way to load an image is from res/drawable but
imagine that was not a possibility. If you had to load an image from
an attached jar file, how would one achieve it?

Many 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: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-02 Thread mscwd01
Well the user who tested my old version and new version of the
orientation code was running a standard build of Android. I also know
at least one other user was also running standard 1.5 and not any
unofficial ROM.

Can anyone else shed any light on what may be causing this?

I cant believe this issue hasn't caused other people problems, surely
if an app works on one device it should work on all?

On Nov 2, 1:21 am, niko20 nikolatesl...@yahoo.com wrote:
 I wouldn't be surprised if these people are running Cyanogen mods.
 People also had problems with my app when they did that. In my opinion
 custom ROMS are trouble for developers.

 -niko

 On Nov 1, 6:31 pm, mscwd01 mscw...@gmail.com wrote:



  Hey Mark,

  I have had one user contact me by email and he had the same issues
  using the older version and the new version (using the orientation
  code you supplied), so I can rule out that being the cause *I think*.

  I *presume* it isn't a ROM issue as I have had 8-10 users leave
  comments saying it doesn't work, in each comment they say recent
  update doesn't solve the issue. I guess for most people it may work
  and they dont bother leaving a message which says hey it works
  instead its only the people having problems who post negative
  comments.

  I have tried every test case such as holding the phone in different
  orientations when starting the activity and had no luck finding a bug
  there, in fact I have wasted far too many hours on this.

  On Nov 2, 12:17 am, Mark Murphy mmur...@commonsware.com wrote:

   Phy wrote:
I have confirmation from five users who either have a HTC G1 or HTC
Magic who say my application works fine. However, I have had numerous
recent comments on the Market that the orientation of my applications
interface is rotated 90 degrees on G1/Magic devices.

   Do you have any confirmation from any users who are seeing the rotation
   problem? (i.e., direct email, not Market comments)

I use this method to get the screen orientation:
getResources().getConfiguration().orientation;

   That's not what you used to do, by your own admission. Are you sure that
   the comments are from people who are using your newer version?

   And, again, do you have any confirmation from any users who are seeing
   the rotation problem?

How can this work fine on some phones and completely break on other
peoples phones which are the same make and model?

   It could be they are running the older version of your application. Or,
   it could be a ROM version difference, with a bug in some ROMs. Or, it
   could be something about the way some users are using your app that
   differs from your expectations and test cases (e.g., they open the app
   starting in landscape mode, and you expect them to be starting in
   portrait mode).

   Please bear in mind that, across a 13-post thread, you have not once
   actually indicated what app this is, AFAICT.

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

   Android App Developer Books:http://commonsware.com/books- 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: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread mscwd01
Well Niko that may be true but it doesn't change the fact that it
works fine on an HTC Hero and some G1  Magic phones.

It should either work or not, having your application work fine on
some devices and break on other devices is rediculous and its getting
annoying now.

iPhone here I come :(

On Nov 1, 3:18 am, niko20 nikolatesl...@yahoo.com wrote:
 Wait-

 YOu are remapping the coords after rotation? Well then that's where
 the problem has to be, since clearly Mark has shown that the
 getOrientation() works correctly

 -niko

 On Oct 31, 1:25 pm, mscwd01 mscw...@gmail.com wrote:

  Well then this is extremely confusing!

  Firstly, thanks Mark for taking the time to test it.

  The only other thing which could be wrong is how the coordinate system
  is represented in each device. I draw to the screen once I have
  remapped the coordinate system i.e.:

  if(screenOrientation == 1) {  // Portrait
    SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
  SensorManager.AXIS_X, outR);}

  else { // All other send to Landscape
    SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
  SensorManager.AXIS_Z, outR);

  }

  However, this shouldn't be an issue should it?

  On Oct 31, 6:19 pm, Mark Murphy mmur...@commonsware.com wrote:

   mscwd01 wrote:
Okay this is getting really rather annoying now.

I have used both of the following methods of getting the screen
orientation and both do not work properly on different devices.

Method 1:
Display display = ((WindowManager) getSystemService
(WINDOW_SERVICE)).getDefaultDisplay();
int screenOrientation = display.getOrientation();

Method 2:
int screenOrientation = getResources().getConfiguration().orientation;

Both methods work fine on the HTC Hero; however, they both fail on the
G1 and G2 devices (according to the users of my app).

How can we be expected to make high quality applications if the API is
not supported on all devices???

I would be very greatful if someone could offer a solution to this,
its just not acceptable.

   I just tested this on a G1, and
   getResources().getConfiguration().orientation is 2 in landscape and 1 in
   portrait, just like it should be.

   I also tested it on an HTC Magic, and it works just fine.

   Heck, it even works on an ARCHOS 5 Android tablet.

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

   Android Development Wiki:http://wiki.andmob.org

-- 
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: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread mscwd01
Okay can I just summarise my problem as I believe it is an issue which
NEEDS to be addressed...

I have confirmation from five users who either have a HTC G1 or HTC
Magic who say my application works fine. However, I have had numerous
recent comments on the Market that the orientation of my applications
interface is rotated 90 degrees on G1/Magic devices.

I use this method to get the screen orientation:
getResources().getConfiguration().orientation;

and remap the coordinate system as follows before drawing the
application interface:

if(screenOrientation == 1) {  // Portrait
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
SensorManager.AXIS_X, outR);
}

else { // All other send to Landscape
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
  SensorManager.AXIS_Z, outR);

}

How can this work fine on some phones and completely break on other
peoples phones which are the same make and model?

This is really disconcerting, and needs to be explained.

On Nov 1, 11:06 pm, mscwd01 mscw...@gmail.com wrote:
 Well Niko that may be true but it doesn't change the fact that it
 works fine on an HTC Hero and some G1  Magic phones.

 It should either work or not, having your application work fine on
 some devices and break on other devices is rediculous and its getting
 annoying now.

 iPhone here I come :(

 On Nov 1, 3:18 am, niko20 nikolatesl...@yahoo.com wrote:

  Wait-

  YOu are remapping the coords after rotation? Well then that's where
  the problem has to be, since clearly Mark has shown that the
  getOrientation() works correctly

  -niko

  On Oct 31, 1:25 pm, mscwd01 mscw...@gmail.com wrote:

   Well then this is extremely confusing!

   Firstly, thanks Mark for taking the time to test it.

   The only other thing which could be wrong is how the coordinate system
   is represented in each device. I draw to the screen once I have
   remapped the coordinate system i.e.:

   if(screenOrientation == 1) {  // Portrait
     SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
   SensorManager.AXIS_X, outR);}

   else { // All other send to Landscape
     SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
   SensorManager.AXIS_Z, outR);

   }

   However, this shouldn't be an issue should it?

   On Oct 31, 6:19 pm, Mark Murphy mmur...@commonsware.com wrote:

mscwd01 wrote:
 Okay this is getting really rather annoying now.

 I have used both of the following methods of getting the screen
 orientation and both do not work properly on different devices.

 Method 1:
 Display display = ((WindowManager) getSystemService
 (WINDOW_SERVICE)).getDefaultDisplay();
 int screenOrientation = display.getOrientation();

 Method 2:
 int screenOrientation = getResources().getConfiguration().orientation;

 Both methods work fine on the HTC Hero; however, they both fail on the
 G1 and G2 devices (according to the users of my app).

 How can we be expected to make high quality applications if the API is
 not supported on all devices???

 I would be very greatful if someone could offer a solution to this,
 its just not acceptable.

I just tested this on a G1, and
getResources().getConfiguration().orientation is 2 in landscape and 1 in
portrait, just like it should be.

I also tested it on an HTC Magic, and it works just fine.

Heck, it even works on an ARCHOS 5 Android tablet.

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

Android Development Wiki:http://wiki.andmob.org

-- 
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: IMPORTANT - display.getOrientation() does not work on all devices

2009-11-01 Thread mscwd01
Hey Mark,

I have had one user contact me by email and he had the same issues
using the older version and the new version (using the orientation
code you supplied), so I can rule out that being the cause *I think*.

I *presume* it isn't a ROM issue as I have had 8-10 users leave
comments saying it doesn't work, in each comment they say recent
update doesn't solve the issue. I guess for most people it may work
and they dont bother leaving a message which says hey it works
instead its only the people having problems who post negative
comments.

I have tried every test case such as holding the phone in different
orientations when starting the activity and had no luck finding a bug
there, in fact I have wasted far too many hours on this.


On Nov 2, 12:17 am, Mark Murphy mmur...@commonsware.com wrote:
 Phy wrote:
  I have confirmation from five users who either have a HTC G1 or HTC
  Magic who say my application works fine. However, I have had numerous
  recent comments on the Market that the orientation of my applications
  interface is rotated 90 degrees on G1/Magic devices.

 Do you have any confirmation from any users who are seeing the rotation
 problem? (i.e., direct email, not Market comments)

  I use this method to get the screen orientation:
  getResources().getConfiguration().orientation;

 That's not what you used to do, by your own admission. Are you sure that
 the comments are from people who are using your newer version?

 And, again, do you have any confirmation from any users who are seeing
 the rotation problem?

  How can this work fine on some phones and completely break on other
  peoples phones which are the same make and model?

 It could be they are running the older version of your application. Or,
 it could be a ROM version difference, with a bug in some ROMs. Or, it
 could be something about the way some users are using your app that
 differs from your expectations and test cases (e.g., they open the app
 starting in landscape mode, and you expect them to be starting in
 portrait mode).

 Please bear in mind that, across a 13-post thread, you have not once
 actually indicated what app this is, AFAICT.

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

 Android App Developer Books:http://commonsware.com/books

-- 
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: App name/icon problems on Hero after reboot

2009-11-01 Thread mscwd01
I have an HTC Hero, have used many of the above apps and have never
seen these problems...

On Nov 1, 11:47 pm, rooster 808 rich.al...@gmail.com wrote:
 I'm seeing this frequently on my HERO HTC, but not my G1 Google Dev
 phone.

 Almost every power off, I lose the Desktop Icon on the App I'm
 developing, just on the Hero.

 Rich

 On Oct 30, 10:36 pm, James W jpbwebs...@gmail.com wrote:

  For what its worth, I cannot reproduce this on a non-Sprint Hero. I
  have had mine for a couple of months now, a European version, and has
  been out in Asia for a while with no reported similar errors. I am a
  close follower of the XDA Developers board, and it has not been seen
  there either. Perhaps it is now coming to light as more people are
  getting the Sprint version?

  I have never seen this issue on my own app, but never used raw strings
  for the name.

  I installed the Coin Toss app, tried it, put a shortcut on the home
  screen, rebooted, and it was fine. I will be happy to try any other
  apps to see if this is still the case, but as I live in Hong Kong, I
  cannot try paid for apps, as it is not supported.

  My Hero is stock European, running Android 1.5, build 2.73.405.5
  146733 CL#61267 release-keys
  Software version: 1.0.0.A6288
  Kernel: 2.6.27-8dd6deee htc-ker...@and18-2)

  Hope this helps!

  On Oct 31, 3:52 am, Justin Giles jtgi...@gmail.com wrote:

   From a user standpoint, I ran across this thread on the Hero
   phandroids.comforum:

  http://androidforums.com/sprint-htc-hero/12549-handcent-shortcut-icon...

   Basically you wipe the phone  sd card, reinitialize the phone, then
   IMMEDIATELY turn off HTC Sense UI in favor of the standard Android UI.  
   The
   user that gave these instructions seems to not have any problems after 
   they
   do this.

   Just a FYI and further evidence that HTC has some issues they may or may 
   not
   be ignoring.

   On Fri, Oct 30, 2009 at 10:14 AM, Greg Donald gdon...@gmail.com wrote:

On Fri, Oct 30, 2009 at 9:41 AM, Justin Giles jtgi...@gmail.com wrote:
 I'm not entirely sure the raw string vs resource string is the full 
 issue
 here though.  It might be part of the problem, but not the whole
 explanation.  As Greg mentioned earlier, he never had his app name 
 set as
a
 raw string and he is experiencing the problem.  On one of my 
 applications
 I'm developing, I'm experiencing it as well with the app name always
having
 been a resource.  It's sounding more and more like HTC having done
something
 funky with the package management.  Especially since Dianne has been
saying
 that stock Android doesn't have this problem.  And all of my 
 inquiries to
 HTC  Sprint have resulted in nothing.

I'm considering returning the phone, I still have a few days before my
30 day return option has past.  I mean, who really knows when this
might be fixed?

What other options are there at this point?

--
Greg Donald
   http://destiney.com/-Hidequoted 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] IMPORTANT - display.getOrientation() does not work on all devices

2009-10-31 Thread mscwd01
Hi,

I have had several complaints from people with G1 and MyTouch/G2
devices who say my application does not work correctly. The problem
stems from the following code which gets the orientation of the phone:


// Get Screen Orientation
Display display = ((WindowManager) getSystemService
(WINDOW_SERVICE)).getDefaultDisplay();
int screenOrientation = display.getOrientation();

I manually rotate the interface if the phone is in portrait
(screenOrientation = 0) or landscape (screenOrientation = 1).

On my HTC Hero the code works fine and the correct orientation is
determined, however on G1 and MyTouch devices it apparently never
returns the correct orientation. As I do not have either of those
phones to test this problem I am guessing they may return the opposite
values to the HTC Hero?

Can anyone possibly explain this problem or let me know how to
determine the screen orientation on ALL devices?

Many 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: IMPORTANT - display.getOrientation() does not work on all devices

2009-10-31 Thread mscwd01
Hi Mark,

I added this to the activity tag in the manifest:
android:screenOrientation=sensor

Would that make any difference?

If I get it still doesn't work emails, i'll try your code.

Thanks

On Oct 31, 11:54 am, Mark Murphy mmur...@commonsware.com wrote:
 mscwd01 wrote:
  Hi,

  I have had several complaints from people with G1 and MyTouch/G2
  devices who say my application does not work correctly. The problem
  stems from the following code which gets the orientation of the phone:

  // Get Screen Orientation
  Display display = ((WindowManager) getSystemService
  (WINDOW_SERVICE)).getDefaultDisplay();
  int screenOrientation = display.getOrientation();

  I manually rotate the interface if the phone is in portrait
  (screenOrientation = 0) or landscape (screenOrientation = 1).

  On my HTC Hero the code works fine and the correct orientation is
  determined, however on G1 and MyTouch devices it apparently never
  returns the correct orientation. As I do not have either of those
  phones to test this problem I am guessing they may return the opposite
  values to the HTC Hero?

  Can anyone possibly explain this problem or let me know how to
  determine the screen orientation on ALL devices?

 You can try getConfiguration().orientation, which will be one of a
 series of constants on the Configuration class.

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

 _Beginning Android_ from Apress Now Available!

-- 
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: IMPORTANT - display.getOrientation() does not work on all devices

2009-10-31 Thread mscwd01
Okay this is getting really rather annoying now.

I have used both of the following methods of getting the screen
orientation and both do not work properly on different devices.

Method 1:
Display display = ((WindowManager) getSystemService
(WINDOW_SERVICE)).getDefaultDisplay();
int screenOrientation = display.getOrientation();

Method 2:
int screenOrientation = getResources().getConfiguration().orientation;

Both methods work fine on the HTC Hero; however, they both fail on the
G1 and G2 devices (according to the users of my app).

How can we be expected to make high quality applications if the API is
not supported on all devices???

I would be very greatful if someone could offer a solution to this,
its just not acceptable.



On Oct 31, 12:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 mscwd01 wrote:
  I added this to the activity tag in the manifest:
  android:screenOrientation=sensor

  Would that make any difference?

 That changes the trigger. For devices with a keyboard (e.g., G1), by
 default, an orientation change is triggered by sliding the keyboard, not
 the accelerometer. android:screenOrientation=sensor forces it to be
 the sensor (a.k.a., accelerometer) like the Magic, Hero, and other
 keyboard-less devices.

 Since you are experiencing your problem with both the G1 (with keyboard)
 and the Magic (sans keyboard), I doubt this will help, but I could
 easily be wrong.

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

 Warescription: Three Android Books, Plus Updates, $35/Year

-- 
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: IMPORTANT - display.getOrientation() does not work on all devices

2009-10-31 Thread mscwd01
Dianne, I have used the configuration to try and determine orientation
(see Method 2); however, this still fails on G1 and G2 devices. It
works on the HTC magic though.

If you could offer some other solution i'd be very appreciative
indeed ;)


On Oct 31, 6:00 pm, Dianne Hackborn hack...@android.com wrote:
 I'll make this a little stronger -- the Display object is LOW LEVEL access
 to the display.  Trying to use this in an application is almost guaranteed
 to not do what you want.  The current orientation should be retrieved from
 Configuration.  The width and height should be retrieved from the view
 hierarchy.

 I believe that Display.getOrientation actually returns the physical rotation
 applied to the display...  I also notice that the documentation says nothing
 about what it actually returns, so  how can you use it correctly? :)  (The
 Display object clearly needs a lot more documentation...  but this is a
 pretty low priority because, again, it really shouldn't be used by
 applications.)

 On Sat, Oct 31, 2009 at 5:08 AM, Mark Murphy mmur...@commonsware.comwrote:



  mscwd01 wrote:
   I added this to the activity tag in the manifest:
   android:screenOrientation=sensor

   Would that make any difference?

  That changes the trigger. For devices with a keyboard (e.g., G1), by
  default, an orientation change is triggered by sliding the keyboard, not
  the accelerometer. android:screenOrientation=sensor forces it to be
  the sensor (a.k.a., accelerometer) like the Magic, Hero, and other
  keyboard-less devices.

  Since you are experiencing your problem with both the G1 (with keyboard)
  and the Magic (sans keyboard), I doubt this will help, but I could
  easily be wrong.

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

  Warescription: Three Android Books, Plus Updates, $35/Year

  --
  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

 --
 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.

-- 
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: IMPORTANT - display.getOrientation() does not work on all devices

2009-10-31 Thread mscwd01
Sorry I meant works on the HTC Hero NOT magic ;)

On Oct 31, 6:11 pm, mscwd01 mscw...@gmail.com wrote:
 Dianne, I have used the configuration to try and determine orientation
 (see Method 2); however, this still fails on G1 and G2 devices. It
 works on the HTC magic though.

 If you could offer some other solution i'd be very appreciative
 indeed ;)

 On Oct 31, 6:00 pm, Dianne Hackborn hack...@android.com wrote:

  I'll make this a little stronger -- the Display object is LOW LEVEL access
  to the display.  Trying to use this in an application is almost guaranteed
  to not do what you want.  The current orientation should be retrieved from
  Configuration.  The width and height should be retrieved from the view
  hierarchy.

  I believe that Display.getOrientation actually returns the physical rotation
  applied to the display...  I also notice that the documentation says nothing
  about what it actually returns, so  how can you use it correctly? :)  (The
  Display object clearly needs a lot more documentation...  but this is a
  pretty low priority because, again, it really shouldn't be used by
  applications.)

  On Sat, Oct 31, 2009 at 5:08 AM, Mark Murphy mmur...@commonsware.comwrote:

   mscwd01 wrote:
I added this to the activity tag in the manifest:
android:screenOrientation=sensor

Would that make any difference?

   That changes the trigger. For devices with a keyboard (e.g., G1), by
   default, an orientation change is triggered by sliding the keyboard, not
   the accelerometer. android:screenOrientation=sensor forces it to be
   the sensor (a.k.a., accelerometer) like the Magic, Hero, and other
   keyboard-less devices.

   Since you are experiencing your problem with both the G1 (with keyboard)
   and the Magic (sans keyboard), I doubt this will help, but I could
   easily be wrong.

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

   Warescription: Three Android Books, Plus Updates, $35/Year

   --
   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

  --
  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.

-- 
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: IMPORTANT - display.getOrientation() does not work on all devices

2009-10-31 Thread mscwd01
Well then this is extremely confusing!

Firstly, thanks Mark for taking the time to test it.

The only other thing which could be wrong is how the coordinate system
is represented in each device. I draw to the screen once I have
remapped the coordinate system i.e.:

if(screenOrientation == 1) {  // Portrait
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
SensorManager.AXIS_X, outR);
}
else { // All other send to Landscape
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
SensorManager.AXIS_Z, outR);
}

However, this shouldn't be an issue should it?

On Oct 31, 6:19 pm, Mark Murphy mmur...@commonsware.com wrote:
 mscwd01 wrote:
  Okay this is getting really rather annoying now.

  I have used both of the following methods of getting the screen
  orientation and both do not work properly on different devices.

  Method 1:
  Display display = ((WindowManager) getSystemService
  (WINDOW_SERVICE)).getDefaultDisplay();
  int screenOrientation = display.getOrientation();

  Method 2:
  int screenOrientation = getResources().getConfiguration().orientation;

  Both methods work fine on the HTC Hero; however, they both fail on the
  G1 and G2 devices (according to the users of my app).

  How can we be expected to make high quality applications if the API is
  not supported on all devices???

  I would be very greatful if someone could offer a solution to this,
  its just not acceptable.

 I just tested this on a G1, and
 getResources().getConfiguration().orientation is 2 in landscape and 1 in
 portrait, just like it should be.

 I also tested it on an HTC Magic, and it works just fine.

 Heck, it even works on an ARCHOS 5 Android tablet.

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

 Android Development Wiki:http://wiki.andmob.org

-- 
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] Paint (fill) a Path with a texture

2009-10-30 Thread mscwd01

Hey,

I currently draw Paths to the screen and fill them with a simple
color; however, is it possible to take a bitmap and fill the path with
this texture?

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] Supporting Smaller Screen Sizes supports-screens

2009-10-30 Thread mscwd01
I have had several emails from people with HTC Tattoo devices who say
they cannot find my app in the Market.

After reading this page (http://d.android.com/guide/practices/
screens_support.html) I believe I have to add the supports-screens
tag to my manifest file. However, when I try to do this I am
confronted with Error no resource identifier found for attriute
support-screens in package 'android' messages. What does one have to
do to update their manifest to tell the market an app supports all
screen sizes?

Furthermore, if I need to change the android:minSdkVersion from 3 to
something higher or add the android:targetSdkVersion tag, will this
prevent people with older versions of Android from using my
application?

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] 3D MapView - Is it possible?

2009-10-20 Thread mscwd01

Is there a way to manipulate a MapView so it is given perspective?
I.e. the Tiles at the bottom of the view are wider than those drawn at
the top of the view?

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] Create always running app

2009-09-26 Thread mscwd01

Is it possible to create an app which always runs in the background
and can listen to user input?
To be more specific, is it possible to open your app by performing a
gesture or long pressing selected text on any screen in any other
running 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: Create always running app

2009-09-26 Thread mscwd01

Hmm pity, I can see it being abused by unscrupulous developers - but
it'd be a powerful feature nonetheless.

On Sep 27, 12:28 am, Dianne Hackborn hack...@android.com wrote:
 No it is not, sorry.

 On Sat, Sep 26, 2009 at 3:02 PM, mscwd01 mscw...@gmail.com wrote:

  Is it possible to create an app which always runs in the background
  and can listen to user input?
  To be more specific, is it possible to open your app by performing a
  gesture or long pressing selected text on any screen in any other
  running app?

 --
 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.
--~--~-~--~~~---~--~~
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: Now ADC2 judging has begun.

2009-09-24 Thread mscwd01

The judging app is rubbish. I just keep getting a notification to
download a single app mystic maggie which is 11mb to download...
Cant I skip it?

On Sep 24, 10:52 pm, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 How the devil are regular users going to be to:

 1. Know ADC2 exists.
 2. Find the judging app.

 I will bet that the majority of judges will be developers! Talk about
 a tainted jury!

 -John Coryat

 What Zip Code?

 Radar Now!
--~--~-~--~~~---~--~~
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] Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

Hi,

I want to find the screen coordinates (X,Y) where a point represented
by a latitude/longitude value would appear on the screen if you
pointed your phone at it (much in the same way as Wikitude does).

Here is my code from my onSensorChanged() method:

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_X, SensorManager.AXIS_Z, outR);
SensorManager.getOrientation(outR, values);

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

}
}

I convert the points I wish to project from their lat/lon spherical
coordinates to Cartesian coordinates and perform a perspective
projection using the roll, pitch and azimuth values returned by the
sensor, however, I can never seem to get accurate screen coordinates
of the points.

The matrices for roll, pitch and azimuth I use are:

// pan
double[][] azimuthMat = {
{Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
{Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
{0, 0, 1},
};
// tilt
double[][] pitchMat = {
{Math.cos(pitchValue), 0, Math.sin(pitchValue)},
{0, 1, 0},
{-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
};
// roll
double[][] rollMat = {
{1, 0, 0},
{0, Math.cos(rollValue), -Math.sin(rollValue)},
{0, Math.sin(rollValue), Math.cos(rollValue)},
};

I also perform the necessary translation of the projection cener and
the point to project e.g:

// Translate the point
subtract(pointToProject, projectionCenter);
... where 'pointToProject' and 'projectionCenter' are double arrays
holding the Cartesian coordinates of each location (i.e. camera lat/
lon and the point to project lat/lon)

I realise this is quite a complicated question to ask and I haven't
provided all my projection code etc, however if someone feels they can
help me out and may know how to achieve what i'm after - i'll post the
whole code.

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: Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

The main problem is when I use the values returned by the sensor
manager as is i.e. not modifying them in any way, the points are no
where near where they should be. For example, say the point I wish to
project is due north of my current location and at the same elevation.
I shouldn't need to tilt (pitch) the phone up or down and when I hold
the phone in the direction of north it should appear somewhere near
the center of the phone screen. However, this is not the case, in
reality for the point to appear on the center of the screen I need to
do something like tilt the phone at the ground and orient it in a
easterly direction for example.

I have made a nasty fix which means I subtract 90 from the roll or add
45 degrees to the pitch etc. However while this now projects the point
on the center of the screen it ruins the projections of any other
points (as I have fundamentally altered the sensor values). In my
current implementation a point north of me may work but any points to
the south do not work.

My problem is probably something to do with the coordinates of the
phone differing from my projected coordinates, but making the two
work together is causing me some serious headaches.

I can send you my projection code if it helps, I have really exhausted
all ideas to solve my issue!

Thanks for the reply

On Aug 20, 5:15 pm, Peli peli0...@googlemail.com wrote:
  however, I can never seem to get accurate screen coordinates
  of the points.

 Could you specify what exactly your problem is?
 Does it not work *at all*, or does it work basically, but points are
 off by a few degrees? Or does it only work in one orientation of the
 device (like in landscape mode), and fails in other orientations?

 Peliwww.openintents.orghttp://code.google.com/p/openintents/wiki/SensorSimulator

 On Aug 20, 4:55 pm, mscwd01 mscw...@gmail.com wrote:

  Hi,

  I want to find the screen coordinates (X,Y) where a point represented
  by a latitude/longitude value would appear on the screen if you
  pointed your phone at it (much in the same way as Wikitude does).

  Here is my code from my onSensorChanged() method:

  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_X, SensorManager.AXIS_Z, outR);
                      SensorManager.getOrientation(outR, values);

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

              }

  }

  I convert the points I wish to project from their lat/lon spherical
  coordinates to Cartesian coordinates and perform a perspective
  projection using the roll, pitch and azimuth values returned by the
  sensor, however, I can never seem to get accurate screen coordinates
  of the points.

  The matrices for roll, pitch and azimuth I use are:

  // pan
  double[][] azimuthMat = {
                  {Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
                  {Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
                  {0, 0, 1},};

  // tilt
  double[][] pitchMat = {
                  {Math.cos(pitchValue), 0, Math.sin(pitchValue)},
                  {0, 1, 0},
                  {-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
          };
  // roll
  double[][] rollMat = {
                  {1, 0, 0},
                  {0, Math.cos(rollValue), -Math.sin(rollValue)},
                  {0, Math.sin(rollValue), Math.cos(rollValue)},
          };

  I also perform the necessary translation of the projection cener and
  the point to project e.g:

  // Translate the point
  subtract(pointToProject, projectionCenter);
  ... where 'pointToProject' and 'projectionCenter' are double arrays
  holding the Cartesian coordinates of each location (i.e. camera lat/
  lon and the point to project lat/lon)

  I realise this is quite a complicated question to ask and I haven't
  provided all my projection code etc, however if someone feels they can
  help me out and may know how to achieve what i'm after - i'll post the
  whole code.

  Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups

[android-developers] Re: Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

I should add I am holding the phone horizontally (as you would when
taking a photo).

As such I modify the sensor values like:

SensorManager.getRotationMatrix(R, I, accels, mags);
SensorManager.remapCoordinateSystem(R,SensorManager.AXIS_X,
SensorManager.AXIS_Z, outR);
SensorManager.getOrientation(outR, values);

I'm assuming thats the correct way to do it.

On Aug 20, 6:00 pm, mscwd01 mscw...@gmail.com wrote:
 The main problem is when I use the values returned by the sensor
 manager as is i.e. not modifying them in any way, the points are no
 where near where they should be. For example, say the point I wish to
 project is due north of my current location and at the same elevation.
 I shouldn't need to tilt (pitch) the phone up or down and when I hold
 the phone in the direction of north it should appear somewhere near
 the center of the phone screen. However, this is not the case, in
 reality for the point to appear on the center of the screen I need to
 do something like tilt the phone at the ground and orient it in a
 easterly direction for example.

 I have made a nasty fix which means I subtract 90 from the roll or add
 45 degrees to the pitch etc. However while this now projects the point
 on the center of the screen it ruins the projections of any other
 points (as I have fundamentally altered the sensor values). In my
 current implementation a point north of me may work but any points to
 the south do not work.

 My problem is probably something to do with the coordinates of the
 phone differing from my projected coordinates, but making the two
 work together is causing me some serious headaches.

 I can send you my projection code if it helps, I have really exhausted
 all ideas to solve my issue!

 Thanks for the reply

 On Aug 20, 5:15 pm, Peli peli0...@googlemail.com wrote:

   however, I can never seem to get accurate screen coordinates
   of the points.

  Could you specify what exactly your problem is?
  Does it not work *at all*, or does it work basically, but points are
  off by a few degrees? Or does it only work in one orientation of the
  device (like in landscape mode), and fails in other orientations?

  Peliwww.openintents.orghttp://code.google.com/p/openintents/wiki/SensorSi...

  On Aug 20, 4:55 pm, mscwd01 mscw...@gmail.com wrote:

   Hi,

   I want to find the screen coordinates (X,Y) where a point represented
   by a latitude/longitude value would appear on the screen if you
   pointed your phone at it (much in the same way as Wikitude does).

   Here is my code from my onSensorChanged() method:

   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_X, SensorManager.AXIS_Z, outR);
                       SensorManager.getOrientation(outR, values);

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

               }

   }

   I convert the points I wish to project from their lat/lon spherical
   coordinates to Cartesian coordinates and perform a perspective
   projection using the roll, pitch and azimuth values returned by the
   sensor, however, I can never seem to get accurate screen coordinates
   of the points.

   The matrices for roll, pitch and azimuth I use are:

   // pan
   double[][] azimuthMat = {
                   {Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
                   {Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
                   {0, 0, 1},};

   // tilt
   double[][] pitchMat = {
                   {Math.cos(pitchValue), 0, Math.sin(pitchValue)},
                   {0, 1, 0},
                   {-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
           };
   // roll
   double[][] rollMat = {
                   {1, 0, 0},
                   {0, Math.cos(rollValue), -Math.sin(rollValue)},
                   {0, Math.sin(rollValue), Math.cos(rollValue)},
           };

   I also perform the necessary translation of the projection cener and
   the point to project e.g:

   // Translate the point
   subtract(pointToProject, projectionCenter);
   ... where 'pointToProject' and 'projectionCenter

[android-developers] Re: Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

Peli, I think I love you :)

No seriously, I changed:

SensorManager.AXIS_X,SensorManager.AXIS_Z,

To

SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X

and it basically works, its slightly out but I am almost sure its down
to my projection code being slightly wrong ;)

Three days of bother and one line of code solved it...

I'll reply again if I run into any more problems (so please check
back :D).

Thanks again!

On Aug 20, 7:17 pm, Peli peli0...@googlemail.com wrote:
 A couple of possible issues come to my mind:

 * Did you make sure that your compass is calibrated? (figure 8 in the
 air with the phone several times in various directions)
 * Are you far enough away from computers, steel, loudspeakers, or
 other objects that may deflect magnetic field lines (and thus alter
 the compass readings)?
 * For a change portrait - landscape, it would make more sense to
 remap x and y coordinates by 90 degrees, rather than swap x and z
 coordinates, like SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X,

 If all of these don't help, it is more efficient to print out (logcat)
 the sensor values, and try to solve one problem at a time (like, first
 get the correct orientation values from the compass, and if that
 works, then look into your projection routine), rather than solving
 the whole stack of possible error sources at once.

 Good luck :-)
 Peli

 On Aug 20, 7:02 pm, mscwd01 mscw...@gmail.com wrote:

  I should add I am holding the phone horizontally (as you would when
  taking a photo).

  As such I modify the sensor values like:

  SensorManager.getRotationMatrix(R, I, accels, mags);
  SensorManager.remapCoordinateSystem(R,SensorManager.AXIS_X,
  SensorManager.AXIS_Z, outR);
  SensorManager.getOrientation(outR, values);

  I'm assuming thats the correct way to do it.

  On Aug 20, 6:00 pm, mscwd01 mscw...@gmail.com wrote:

   The main problem is when I use the values returned by the sensor
   manager as is i.e. not modifying them in any way, the points are no
   where near where they should be. For example, say the point I wish to
   project is due north of my current location and at the same elevation.
   I shouldn't need to tilt (pitch) the phone up or down and when I hold
   the phone in the direction of north it should appear somewhere near
   the center of the phone screen. However, this is not the case, in
   reality for the point to appear on the center of the screen I need to
   do something like tilt the phone at the ground and orient it in a
   easterly direction for example.

   I have made a nasty fix which means I subtract 90 from the roll or add
   45 degrees to the pitch etc. However while this now projects the point
   on the center of the screen it ruins the projections of any other
   points (as I have fundamentally altered the sensor values). In my
   current implementation a point north of me may work but any points to
   the south do not work.

   My problem is probably something to do with the coordinates of the
   phone differing from my projected coordinates, but making the two
   work together is causing me some serious headaches.

   I can send you my projection code if it helps, I have really exhausted
   all ideas to solve my issue!

   Thanks for the reply

   On Aug 20, 5:15 pm, Peli peli0...@googlemail.com wrote:

 however, I can never seem to get accurate screen coordinates
 of the points.

Could you specify what exactly your problem is?
Does it not work *at all*, or does it work basically, but points are
off by a few degrees? Or does it only work in one orientation of the
device (like in landscape mode), and fails in other orientations?

Peliwww.openintents.orghttp://code.google.com/p/openintents/wiki/SensorSi...

On Aug 20, 4:55 pm, mscwd01 mscw...@gmail.com wrote:

 Hi,

 I want to find the screen coordinates (X,Y) where a point represented
 by a latitude/longitude value would appear on the screen if you
 pointed your phone at it (much in the same way as Wikitude does).

 Here is my code from my onSensorChanged() method:

 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

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

2009-08-20 Thread mscwd01

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
--~--~-~--~~~---~--~~
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-20 Thread mscwd01

Oh and you'll need these:

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];

On Aug 21, 3: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
--~--~-~--~~~---~--~~
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 submission site

2009-08-19 Thread mscwd01

I'd like it postponed a month please ;)

It would be good to know either way though...

On Aug 17, 7:43 pm, cindy ypu01...@yahoo.com wrote:
 I have question too. Google should update the ADC official site to
 tell us what happends.

 On Aug 16, 11:11 am, siuying siu.y...@gmail.com wrote:

  Glad to hear that I'm not the only one having this question!

  On 8月15日, 下午12時36分, sleith raysle...@gmail.com wrote:

   Hi, i've just purchased to be an android developer
   when i visithttp://market.android.com/publish, i don't see anything
   about publish foradc2
   how to submit app foradc2 ?
   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] Android sensors - Correct when held vertically, incorrect in the horizontal

2009-08-14 Thread mscwd01

Forgive me if I am missing the obvious here but is there an easy way
to get the coorect azimuth/roll/pitch values when the phone is
oriented to the horizontal position?

When you hold a device certically, the compass and roll/pitch values
are correct but if you hold the phobe horizontally the compass values
get screwed up and the roll/pitch values seem to swap and im not
sure if they are correct.

Can someone maybe explain how to solve 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: Android sensors - Correct when held vertically, incorrect in the horizontal

2009-08-14 Thread mscwd01

Sorry about that poorly spelt question - I was in a hurry earlier. ;)

Basically is there a way to tell the sensors what orientation your
activity is in, so if the phone is held horizontally the compass works
correctly?

On Aug 14, 5:51 pm, mscwd01 mscw...@gmail.com wrote:
 Forgive me if I am missing the obvious here but is there an easy way
 to get the coorect azimuth/roll/pitch values when the phone is
 oriented to the horizontal position?

 When you hold a device certically, the compass and roll/pitch values
 are correct but if you hold the phobe horizontally the compass values
 get screwed up and the roll/pitch values seem to swap and im not
 sure if they are correct.

 Can someone maybe explain how to solve 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] Detecting Long Press on a Map Overlay

2009-08-13 Thread mscwd01

Hey,

I want to be able to detect where a user has long pressed on my Map
Overlay.

The idea being to get the GeoPoint of the location the user pressed.

I can detect where a user taps, but cannot find how to detect a long
press.

Any ideas?

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: Detecting Long Press on a Map Overlay

2009-08-13 Thread mscwd01

That sounds like a hacky way of doing things, isn't there a proper
way of implementing this?

On Aug 13, 4:49 pm, Pugnap00 shanenelso...@gmail.com wrote:
 What about setting up a time for when the screen is being pressed. You
 could use a while loop, and after a certain amount of ticks you execue
 your code.

 On Aug 13, 7:47 am, mscwd01 mscw...@gmail.com wrote:

  Hey,

  I want to be able to detect where a user has long pressed on my Map
  Overlay.

  The idea being to get the GeoPoint of the location the user pressed.

  I can detect where a user taps, but cannot find how to detect a long
  press.

  Any ideas?

  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: SensorManager Query

2009-08-08 Thread mscwd01

I'm still struggling with this, its thr roation matrix I need to
supply which i'm not sure with...

On Aug 7, 6:12 pm, mscwd01 mscw...@gmail.com wrote:
 Hi,

 I would like to get the orientation of the phone i.e. its compass
 bearing (azimuth), pitch (around X axis) and roll (around Y axis).

 I have found the method 'getOrientation(float[] R, float[] values)'
 which seems to serve this purpose, however I am unsure what I need to
 pass to it as a parameter.

 Apparently the two parameters are:
 R               rotation matrix see getRotationMatrix(float[], float[],
 float[], float[]).
 values  an array of 3 floats to hold the result.

 What is this rotation matrix and how do I create it?
 Also the float array 'values' - is this just an empty array which it
 uses to store the results of the method call, or does it need
 populating with specific values?

 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] SensorManager Query

2009-08-07 Thread mscwd01

Hi,

I would like to get the orientation of the phone i.e. its compass
bearing (azimuth), pitch (around X axis) and roll (around Y axis).

I have found the method 'getOrientation(float[] R, float[] values)'
which seems to serve this purpose, however I am unsure what I need to
pass to it as a parameter.

Apparently the two parameters are:
R   rotation matrix see getRotationMatrix(float[], float[],
float[], float[]).
values  an array of 3 floats to hold the result.

What is this rotation matrix and how do I create it?
Also the float array 'values' - is this just an empty array which it
uses to store the results of the method call, or does it need
populating with specific values?

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] Getting the email address of the Google Account tied to the handset

2009-07-07 Thread mscwd01

Hey,

Simple question - but i'm finding it difficult finding the answer.

I want to get the email address of the Google account tied to the
phone (the one the user enters upon setup).

I need it to uniquely identify the user of my app - however I do not
want their password as it would, understandably, scare most users away
from using the app. So I need a way of getting the email address
without having to include permissions that suggest I am accessing
account info etc...

Is there a simple way of doing this?

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] Camera View = Regular out of memory exceptions

2009-06-16 Thread mscwd01

Just a quick question...

Using the emulator has anyone experienced regular out of memory
exceptions if you open and close a few times an activity which uses
the Camera / Surface Holder (as demonstrated in the API Demos)?

If I start the activity for the first time since the application was
opened it works fine, however if I close the activity then open it
again an out of memory exception always occurs.

I used the example code used in the Camera API demo, so I am not sure
why this should be happening.

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] Get latitude longitude of center of MapView

2009-06-05 Thread mscwd01

Hi

How would one get the latitude/longitude of the point which resides in
the center of a MapView?

I want to obtain the lat/lon each time the user pans/moves the map.

Ideally, I want to find the lat/lon of the points on the map in the
bottom left and top right of the screen.

Thanks for your help!
--~--~-~--~~~---~--~~
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: MapView balloon box, is it possible??

2009-06-05 Thread mscwd01

I believe you have to create your own balloon box and draw it to the
screen above the tapped marker. I am not aware of an in-built
mechanism to achieve this.

It shouldn't be too hard to create one though, just use a .9.png for
the background etc, so the marker expands automatically to contain the
desired text.

On Jun 5, 10:51 am, k_zoltan zoltan.kisgyo...@gmail.com wrote:
 Hi,

 I want to build an ap based on the Google Map API's MapView
 Everyting works fine but I cant find a control thing
 I saw this example, and I'm wondering, isn't this possible somehow in
 the Android MapView too.

 http://code.google.com/apis/maps/documentation/examples/marker-drag.html

 I'm interested not in the moveable drawable, but in that  balloon box
 whit the Just bouncing along... text

 Appreciate your help,

 Zoltan
--~--~-~--~~~---~--~~
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: Tut (SDK 1.5) Get google account of user

2009-06-05 Thread mscwd01

Does this code allow you to get the email address of the phones owner,
used when setting up the phone? I.e. the email address of the google
account tied to to the phone?

On Jun 5, 7:54 am, Sujay Krishna Suresh sujay.coold...@gmail.com
wrote:
 hi guys i finally got a simple method to get the google accounts in SDK
 1.5...
 i'm attaching the code for everyone who needs this piece of code...
 This piece of code prints all methods in the class  invokes the static
 method getAccount...
 try {
   for (Method ele :
 Class.forName(com.google.android.googlelogin.GoogleLoginServiceHelper).getMethods())
 {
   System.out.println(ele.toString());
   try {
   if(ele.getName().equals(getAccount))
   ele.invoke(null, this, 123, true);
   } catch (IllegalArgumentException e) {
   e.printStackTrace();
   } catch (IllegalAccessException e) {
   e.printStackTrace();
   } catch (InvocationTargetException e) {
   e.printStackTrace();
   }
   }
   } catch (ClassNotFoundException e) {
   e.printStackTrace();
   }

   } catch (ClassNotFoundException e) {
   e.printStackTrace();
   }

  jus place the foll code in ur onactivityresult
 if (requestCode == 123) {
   System.out.println(resultCode);
   String key = accounts;
   System.out.println(key + : +
 Arrays.toString(data.getExtras().getStringArray(key)));
   String accounts[] = data.getExtras().getStringArray(key);
   if (accounts[0] != null)
   usernameText.setText(You are :  + accounts[0].replace(@gmail.com,
 ));
  }
 in the logcat/ddms o/p u'll be able to see that there are other useful
 methods...
 public static void
 com.google.android.googlelogin.GoogleLoginServiceHelper.getCredentials(android.app.Activity,int,android.os.Bundle,java.lang.String,java.lang.String,boolean)
 public static void
 com.google.android.googlelogin.GoogleLoginServiceHelper.getCredentials(android.app.Activity,int,android.os.Bundle,boolean,java.lang.String,boolean)
 public static void
 com.google.android.googlelogin.GoogleLoginServiceHelper.invalidateAuthToken(android.app.Activity,int,java.lang.String)

 --
 Regards,
 Sujay
 Mark Twain http://www.brainyquote.com/quotes/authors/m/mark_twain.html  -
 There is no sadder sight than a young pessimist.
--~--~-~--~~~---~--~~
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 latitude longitude of center of MapView

2009-06-05 Thread mscwd01

Ok that sounds great but how would one do this? ;) What projection
functions do you speak of?

On Jun 5, 1:00 pm, Saurav Mukherjee to.saurav.mukher...@gmail.com
wrote:
 if u r using the google api, then jus project the point
 screenwidth/2,screenHeight/2 using the projection functions.
 if u r doin a tile download and display on screen then do the maths... ;)

 On Fri, Jun 5, 2009 at 5:21 PM, mscwd01 mscw...@gmail.com wrote:

  Hi

  How would one get the latitude/longitude of the point which resides in
  the center of a MapView?

  I want to obtain the lat/lon each time the user pans/moves the map.

  Ideally, I want to find the lat/lon of the points on the map in the
  bottom left and top right of the screen.

  Thanks for your help!
--~--~-~--~~~---~--~~
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 latitude longitude of center of MapView

2009-06-05 Thread mscwd01

Great, thanks for the help. I'll try it later.

On Jun 5, 1:07 pm, Sujay Krishna Suresh sujay.coold...@gmail.com
wrote:
 mymap.getProjection().fromPixels(x, y)



 On Fri, Jun 5, 2009 at 5:33 PM, mscwd01 mscw...@gmail.com wrote:

  Ok that sounds great but how would one do this? ;) What projection
  functions do you speak of?

  On Jun 5, 1:00 pm, Saurav Mukherjee to.saurav.mukher...@gmail.com
  wrote:
   if u r using the google api, then jus project the point
   screenwidth/2,screenHeight/2 using the projection functions.
   if u r doin a tile download and display on screen then do the maths...
  ;)

   On Fri, Jun 5, 2009 at 5:21 PM, mscwd01 mscw...@gmail.com wrote:

Hi

How would one get the latitude/longitude of the point which resides in
the center of a MapView?

I want to obtain the lat/lon each time the user pans/moves the map.

Ideally, I want to find the lat/lon of the points on the map in the
bottom left and top right of the screen.

Thanks for your help!

 --
 Regards,
 Sujay
 H. L. Mencken http://www.brainyquote.com/quotes/authors/h/h_l_mencken.html
 - Nobody ever went broke underestimating the taste of the American
 public.
--~--~-~--~~~---~--~~
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] Detecting when a MapView is changed (panned or zoomed)

2009-06-05 Thread mscwd01

Hi,

I thought this would have an easy answer but I cant seem to find one.

Does MapView have a mechanism such as an onChange listener which is
fired when the MapView is either panned or zoomed?

I have expermiented with onClick, motion events etc, all are not
really what i'm after.

I just need to know when the state of the MapView is changed by the
user zooming or moving it.

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: Detecting when a MapView is changed (panned or zoomed)

2009-06-05 Thread mscwd01

Im still struggling with this...

I create an overlay and add it to the MapView, then i override the
onTouchEvent to capture all the panning movements made. However, while
this reads all panning movements the map no longer pans. Its as if, I
have replaced the defualt MapView onTouchEvent with my own. How can i
fix this?

On Jun 5, 3:21 pm, mscwd01 mscw...@gmail.com wrote:
 Hi,

 I thought this would have an easy answer but I cant seem to find one.

 Does MapView have a mechanism such as an onChange listener which is
 fired when the MapView is either panned or zoomed?

 I have expermiented with onClick, motion events etc, all are not
 really what i'm after.

 I just need to know when the state of the MapView is changed by the
 user zooming or moving it.

 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] Seekbar - Snap to value

2009-05-30 Thread mscwd01

Hey,

Quick question...

Is there a way to define set values (i.e. 0%, 25%, 50%, 75%, 100%) for
the seekbar widget that enables the slider to snap to the nearest
set value? For example instead of allowing the user to position the
slider at an percentage through 0-100, instead the slider can only
ever be positioned at one of the five set values?

Oh and while were on the subject is there an easy solution for
positioning the seekbar vertically, i'd rather not hack through the
seekbar source code - but I fear I may have to!

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: Seekbar - Snap to value

2009-05-30 Thread mscwd01

Thanks for the quick reply. I shall do as you suggested.

Pity there isn't support for a vertical seekbar though :(

On May 30, 4:26 pm, Marco Nelissen marc...@android.com wrote:
 On Sat, May 30, 2009 at 8:19 AM, mscwd01 mscw...@gmail.com wrote:

  Hey,

  Quick question...

  Is there a way to define set values (i.e. 0%, 25%, 50%, 75%, 100%) for
  the seekbar widget that enables the slider to snap to the nearest
  set value? For example instead of allowing the user to position the
  slider at an percentage through 0-100, instead the slider can only
  ever be positioned at one of the five set values?

 Does setting the range from 0-4 work? If not, you could add an
 OnSeekBarChangeListener and reset the value to the nearest one yourself.

 Oh and while were on the subject is there an easy solution for

  positioning the seekbar vertically, i'd rather not hack through the
  seekbar source code - but I fear I may have to!

 SeekBar does not work vertically.
--~--~-~--~~~---~--~~
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: TextView Highlight/Select Issue

2009-05-29 Thread mscwd01

Please, this is getting so frustrating now. I have tried setting the
TextView highlight colour to transparent but that doesn't work. If I
set the ListView selector to draw on top, it covers the ImageView I
have on the row but the textView remains on top.

If I apply a normal style to the TextView it doesn't highlight when
tapped but as soon as I apply a selector drawable to it, it causes
thos highlight on tap issue.

This is my last plea for help ;)

On May 29, 1:14 am, mscwd01 mscw...@gmail.com wrote:
 It seems the problem only occurs when the selector drawable is applied
 to the TextView. Can anyone explain why this would allow the TextView
 to be selected/highlighted when tapped?

 On May 28, 11:00 am,mscwd01mscw...@gmail.com wrote:

  Hey,

  I have a ListView where each row is a layout inflated from an xml
  file. Within each layout I have a TextView which is defined by the
  following:
  TextView  style=@style/MenuItem android:paddingLeft=10sp
  android:textColor=@drawable/menu_item /

  The style attribute sets the font size and style, the textColor
  attribute is a selector drawable which changes the TextView font
  colour depending on whether it is currently selected or not. This is
  defined by the following:
  selector xmlns:android=http://schemas.android.com/apk/res/android;
      item android:state_selected=true android:color=#FF /
      item android:state_pressed=true android:color=#FF /
      item android:color=#00 /
  /selector

  However, when I use this selector drawable to set the font colour it
  results in a weird issue where the TextView gets highlighted when the
  row is tapped, or tapped and dragged. See this screenshot for a better
  idea:

 http://i39.tinypic.com/v4q90n.jpg

  Is there anyway I can disable the TextView so it cannot be
  highlighted when tapped?

  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] TextView Highlight/Select Issue

2009-05-28 Thread mscwd01

Hey,

I have a ListView where each row is a layout inflated from an xml
file. Within each layout I have a TextView which is defined by the
following:
TextView  style=@style/MenuItem android:paddingLeft=10sp
android:textColor=@drawable/menu_item /

The style attribute sets the font size and style, the textColor
attribute is a selector drawable which changes the TextView font
colour depending on whether it is currently selected or not. This is
defined by the following:
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:color=#FF /
item android:state_pressed=true android:color=#FF /
item android:color=#00 /
/selector

However, when I use this selector drawable to set the font colour it
results in a weird issue where the TextView gets highlighted when the
row is tapped, or tapped and dragged. See this screenshot for a better
idea:

http://i39.tinypic.com/v4q90n.jpg

Is there anyway I can disable the TextView so it cannot be
highlighted when tapped?

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: Is there any chance that there will be ADP2?

2009-05-28 Thread mscwd01

http://code.google.com/android/adc/

On May 28, 12:47 pm, szeldon szeldon@gmail.com wrote:
 Hi,

 I've 
 read:http://groups.google.com/group/android-developers/browse_thread/threa...http://www.google.com/support/forum/p/Android%20Market/thread?tid=55c...
 but both discussions seem a little outdated. At Google IO there were
 free HTC Magic phones (unlocked as ADP1?). So, basing on all this, I
 wonder if there's something official about ADP2.

 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: Is there any chance that there will be ADP2?

2009-05-28 Thread mscwd01

^ In that link it mentions phones were given out to aid people for ADC
2 so I guess these would be configured as such. I guess it wont be
long before they're updated.

On May 28, 1:08 pm, mscwd01 mscw...@gmail.com wrote:
 http://code.google.com/android/adc/

 On May 28, 12:47 pm, szeldon szeldon@gmail.com wrote:

  Hi,

  I've 
  read:http://groups.google.com/group/android-developers/browse_thread/threa..
  but both discussions seem a little outdated. At Google IO there were
  free HTC Magic phones (unlocked as ADP1?). So, basing on all this, I
  wonder if there's something official about ADP2.

  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: TextView Highlight/Select Issue

2009-05-28 Thread mscwd01

It seems the problem only occurs when the selector drawable is applied
to the TextView. Can anyone explain why this would allow the TextView
to be selected/highlighted when tapped?

On May 28, 11:00 am, mscwd01 mscw...@gmail.com wrote:
 Hey,

 I have a ListView where each row is a layout inflated from an xml
 file. Within each layout I have a TextView which is defined by the
 following:
 TextView  style=@style/MenuItem android:paddingLeft=10sp
 android:textColor=@drawable/menu_item /

 The style attribute sets the font size and style, the textColor
 attribute is a selector drawable which changes the TextView font
 colour depending on whether it is currently selected or not. This is
 defined by the following:
 selector xmlns:android=http://schemas.android.com/apk/res/android;
     item android:state_selected=true android:color=#FF /
     item android:state_pressed=true android:color=#FF /
     item android:color=#00 /
 /selector

 However, when I use this selector drawable to set the font colour it
 results in a weird issue where the TextView gets highlighted when the
 row is tapped, or tapped and dragged. See this screenshot for a better
 idea:

 http://i39.tinypic.com/v4q90n.jpg

 Is there anyway I can disable the TextView so it cannot be
 highlighted when tapped?

 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] Determine which row of ListView is highlighted

2009-05-25 Thread mscwd01

Hey,

I would like to change the font colour of text in each ListView row
when the row is highlighted. I.e. when the row is not highlighted
leave the font black, however when it is highlighted change the font
colour to white.

Is there a method which allows one to get the ID of the currently
selected row?

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: Determine which row of ListView is highlighted

2009-05-25 Thread mscwd01

Great thanks Mark, I hoped you'd be the one to reply... and you didn't
disappoint!

Thanks again

On May 25, 6:22 pm, Mark Murphy mmur...@commonsware.com wrote:
 mscwd01 wrote:
  Hey,

  I would like to change the font colour of text in each ListView row
  when the row is highlighted. I.e. when the row is not highlighted
  leave the font black, however when it is highlighted change the font
  colour to white.

  Is there a method which allows one to get the ID of the currently
  selected row?

 getSelectedItem(), getSelectedItemId(), and getSelectedView() should all
 work. For your case, getSelectedView() may be the best of the three.

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

 Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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: startActivity from subclass - strange problem

2009-05-16 Thread mscwd01

This problem is baffling me, I cannot work out why a call to
startActivity() from the subclass of the running Activity causes this
error. If I call startActivity() from the Activity itself, not the
subclass of the Activity, it works fine.

Any ideas? I've spent too long on this problem now ;)

On May 15, 11:54 pm, mscwd01 mscw...@gmail.com wrote:
 Here's the complete stack trace:

 05-15 23:51:58.278: ERROR/AndroidRuntime(731): Uncaught handler:
 thread main exiting due to uncaught exception
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):
 java.lang.NullPointerException
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.content.ComponentName.init(ComponentName.java:74)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.content.Intent.init(Intent.java:2093)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 org.geotact.util.MenuListFactory.menuItemClicked(MenuListFactory.java:
 52)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 org.geotact.util.MenuListFactory.access$1(MenuListFactory.java:48)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 org.geotact.util.MenuListFactory$MenuClickListener.onItemClick
 (MenuListFactory.java:69)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.widget.AdapterView.performItemClick(AdapterView.java:283)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.widget.ListView.performItemClick(ListView.java:3132)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.widget.AbsListView$PerformClick.run(AbsListView.java:1620)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.os.Handler.handleCallback(Handler.java:587)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.os.Handler.dispatchMessage(Handler.java:92)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.os.Looper.loop(Looper.java:123)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 android.app.ActivityThread.main(ActivityThread.java:3948)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 java.lang.reflect.Method.invoke(Method.java:521)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
 (ZygoteInit.java:782)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
 05-15 23:51:58.340: ERROR/AndroidRuntime(731):     at
 dalvik.system.NativeStart.main(Native Method)

 On May 15, 6:12 pm, Dianne Hackborn hack...@android.com wrote:

  Please include the complete stack crawl.

  On Fri, May 15, 2009 at 9:14 AM, mscwd01 mscw...@gmail.com wrote:

   Hey,

   I have a Activity and I have a class which extends this Activity. In
   this subclass I call:

   startActivity(new Intent(this, CameraView.class))

   Which should start the CameraView Activity. However, I always get
   this error:

   ERROR/AndroidRuntime(876): java.lang.NullPointerException
   ERROR/AndroidRuntime(876):     at
   android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
   ERROR/AndroidRuntime(876):     at android.content.ComponentName.init
   (ComponentName.java:74)
   ERROR/AndroidRuntime(876):     at android.content.Intent.init
   (Intent.java:2093)

   If it makes any difference the subclass creates a ListView and when a
   row of the ListView is clicked it calls startActivity();

   Any help is appreciated! Thanks

  --
  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.
--~--~-~--~~~---~--~~
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] startActivity from subclass - strange problem

2009-05-15 Thread mscwd01

Hey,

I have a Activity and I have a class which extends this Activity. In
this subclass I call:

startActivity(new Intent(this, CameraView.class))

Which should start the CameraView Activity. However, I always get
this error:

ERROR/AndroidRuntime(876): java.lang.NullPointerException
ERROR/AndroidRuntime(876): at
android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
ERROR/AndroidRuntime(876): at android.content.ComponentName.init
(ComponentName.java:74)
ERROR/AndroidRuntime(876): at android.content.Intent.init
(Intent.java:2093)

If it makes any difference the subclass creates a ListView and when a
row of the ListView is clicked it calls startActivity();

Any help is appreciated! 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: startActivity from subclass - strange problem

2009-05-15 Thread mscwd01

Here's the complete stack trace:

05-15 23:51:58.278: ERROR/AndroidRuntime(731): Uncaught handler:
thread main exiting due to uncaught exception
05-15 23:51:58.340: ERROR/AndroidRuntime(731):
java.lang.NullPointerException
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.content.ComponentName.init(ComponentName.java:74)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.content.Intent.init(Intent.java:2093)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
org.geotact.util.MenuListFactory.menuItemClicked(MenuListFactory.java:
52)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
org.geotact.util.MenuListFactory.access$1(MenuListFactory.java:48)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
org.geotact.util.MenuListFactory$MenuClickListener.onItemClick
(MenuListFactory.java:69)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.widget.AdapterView.performItemClick(AdapterView.java:283)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.widget.ListView.performItemClick(ListView.java:3132)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.widget.AbsListView$PerformClick.run(AbsListView.java:1620)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.os.Handler.handleCallback(Handler.java:587)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.os.Handler.dispatchMessage(Handler.java:92)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.os.Looper.loop(Looper.java:123)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
android.app.ActivityThread.main(ActivityThread.java:3948)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
java.lang.reflect.Method.invokeNative(Native Method)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
java.lang.reflect.Method.invoke(Method.java:521)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-15 23:51:58.340: ERROR/AndroidRuntime(731): at
dalvik.system.NativeStart.main(Native Method)


On May 15, 6:12 pm, Dianne Hackborn hack...@android.com wrote:
 Please include the complete stack crawl.



 On Fri, May 15, 2009 at 9:14 AM, mscwd01 mscw...@gmail.com wrote:

  Hey,

  I have a Activity and I have a class which extends this Activity. In
  this subclass I call:

  startActivity(new Intent(this, CameraView.class))

  Which should start the CameraView Activity. However, I always get
  this error:

  ERROR/AndroidRuntime(876): java.lang.NullPointerException
  ERROR/AndroidRuntime(876):     at
  android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
  ERROR/AndroidRuntime(876):     at android.content.ComponentName.init
  (ComponentName.java:74)
  ERROR/AndroidRuntime(876):     at android.content.Intent.init
  (Intent.java:2093)

  If it makes any difference the subclass creates a ListView and when a
  row of the ListView is clicked it calls startActivity();

  Any help is appreciated! Thanks

 --
 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.
--~--~-~--~~~---~--~~
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] Obtaining field of view of camera

2009-05-14 Thread mscwd01

Hey,

Quick question:
Is there a method of obtaining the field of view for a phones camera
(horizontal and vertical)?

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] Change ListView Row Font Colour on Highlight

2009-05-10 Thread mscwd01

Hey, quick question...

How could one change the font colour of a TextView in a ListView row
when the row is highlighted?

I load each row of the ListView from a given row.xml file. I would
like to have a black font colour when NOT highlighted and a white font
colour when the row IS highlighted.

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] ViewFlipper - showView(2) functionality rather than just showNext()

2009-05-09 Thread mscwd01

Hey,

Quick question, is there a straightforward way to flip to a desired
view in a list of view, rather than just flipping to the next or
previous view?

I would like to specifically detail which view to flip to. I.e. If you
are on view 2 I would like to be able to flip to view 4, without
calling showNext() twice.

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: ViewFlipper - showView(2) functionality rather than just showNext()

2009-05-09 Thread mscwd01

Hmm, I just found the setDisplayedChild(int whichChild) of the
ViewAnimator class. I haven't got the SDK on this pc to test if it
works, can someone confirm?

Thanks

On May 9, 11:43 am, mscwd01 mscw...@gmail.com wrote:
 Hey,

 Quick question, is there a straightforward way to flip to a desired
 view in a list of view, rather than just flipping to the next or
 previous view?

 I would like to specifically detail which view to flip to. I.e. If you
 are on view 2 I would like to be able to flip to view 4, without
 calling showNext() twice.

 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: ViewFlipper - showView(2) functionality rather than just showNext()

2009-05-09 Thread mscwd01

Thanks Mark, I posted to soon and found the answer it seems straight
after posting the question! Oh well it may help some folks out ;)

On May 9, 11:45 am, Mark Murphy mmur...@commonsware.com wrote:
 mscwd01 wrote:
  Hey,

  Quick question, is there a straightforward way to flip to a desired
  view in a list of view, rather than just flipping to the next or
  previous view?

  I would like to specifically detail which view to flip to. I.e. If you
  are on view 2 I would like to be able to flip to view 4, without
  calling showNext() twice.

 Try setDisplayedChild() (defined on ViewAnimator, the superclass of
 ViewFlipper).

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

 Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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: A Gesture Recognition Library

2009-04-11 Thread mscwd01

That's really impressive and i'd guess a whole lot more intuitive to
use than the virtual keyboard for quick text entry.

I'll definately have a play around with it when I get a spare minute
or two; when I do i'll try and provide some feedback.

Thanks for sharing!

On Apr 11, 11:56 am, sydnal soydan.u...@gmail.com wrote:
 Hi; back around ADC 1; I had developed a simple gesture recognition
 library for Android (not for accelerometer; I mean touchscreen -
 finger gestures). I had to abandon it for quite a while, but recently
 I was able to clean it a bit and port it to 1.0 SDK. It is released
 under GPL. Here are some sample videos:

 http://www.youtube.com/watch?v=C7A6OHWfSOE

 http://www.youtube.com/watch?v=JxwGMtNS_YA

 You can download it here 
 :http://blog.caffeine-driven.com/posts/dkn-a-gesture-recognition-libra...
 (Yeah the site sucks, i know)
--~--~-~--~~~---~--~~
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] Animating a Layout

2009-04-08 Thread mscwd01

How do I animate a Layout?

I have a RelativeLayout which sits in a certain position within my
Activity; I want to glide it in and out from the bottom of the screen
when a certain button is pressed.

I have found examples of animating the children of lists etc but this
is not what I want. I simply want to animate the whole layout and the
views within it together.

I am guessing this is simple to do  but the solution is proving
somewhat elusive!

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: Animating a Layout

2009-04-08 Thread mscwd01

I having trouble understanding how to apply and then run an animation
with a view though.

I create the animation:

Animation identityOverlayAnimationIn = new AlphaAnimation(0.0f, 1.0f);
identityOverlayAnimationIn.setDuration(5000);
identityOverlayAnimationIn = new TranslateAnimation(
Animation.RELATIVE_TO_SELF,
-0.0f,Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF,
-1.0f,Animation.RELATIVE_TO_SELF, 0.0f
);

Than apply it to the RelativeLayout:

theLayout.setAnimation(identityOverlayAnimationIn);

Then run it like this:

identityOverlayAnimationIn.start();

But it doesn't seem to work...

On Apr 8, 4:53 pm, Mark Murphy mmur...@commonsware.com wrote:
 mscwd01 wrote:
  How do I animate a Layout?

  I have a RelativeLayout which sits in a certain position within my
  Activity; I want to glide it in and out from the bottom of the screen
  when a certain button is pressed.

  I have found examples of animating the children of lists etc but this
  is not what I want. I simply want to animate the whole layout and the
  views within it together.

  I am guessing this is simple to do  but the solution is proving
  somewhat elusive!

 Look at android.view.animation. It works on any View -- RelativeLayout
 inherits from View.

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

 Android App Developer Training:http://commonsware.com/training.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: Android Physics Engine

2009-04-03 Thread mscwd01
 to Android as well.  This demo was
 more of a calibration for myself to see how much computation I can
 do,
 and what optimizations lead to the largest improvements.  I'll
 probably turn it into a fun toy for the Market and then look into
 rewriting my rigid body engine for Android.

    Reading through Simpull I noticed that you allocate a new
 Vector3f
 in your Verlet update routine.  I think that will be a killer on
 the
 Android platform because of it's rudimentary garbage collector and
 limited RAM.  My solution was to allocate an array of fixed point
 numbers, four per ball.  Effectively a vector pool that didn't
 require
 any management because the number of balls never changed.

 On Apr 2, 6:31 am, shaun shashepp...@gmail.com wrote:
  I took a look at Anton's demo on a G1 device, and I was glad to
  see
  the integration of accelerometer as it really added value.  I
  assume
  the calculations for collision detection and response are fairly
  basic, which allows for that performance.

  Simpull will also provide good performance for a scene of that
  nature
  (all verlet, no joints).  At least I believe it will.  The point
  where
  simpull becomes slow is when a more complex scene is in play with
  10s
  of objects with many joints connecting some of them.  Since the
  engine
  is all verlet and no rigid body dynamics, joints are one way to
  acheive a similar result, but with a very bad performance hit due
  to
  all the new temporary objects and new calculations.

  I would be super impressed to see a demo like Anton's with rigid
  body
  dynamics involved with at least some rectangles, if not other
  polygons
  and perhaps a joint or two.  That is where the performance
  degrades
  quickly in my experience.

  On Apr 1, 2:45 pm, mscwd01 mscw...@gmail.com wrote:

   Thanks Lajos for pointing APE out, I hadn't heard of it until
   now.

   Unfortunately your link to your Android port is broken, can you
   mend
   it as I dont fancy spending another hour porting another
   library
   to
   Android :D

   Thanks

   On Mar 31, 9:50 pm, lkelemen tridc...@gmail.com wrote:

Hello everyone,

I was also disappointed with jbox2d's performance so I
checked
APE
(Actionscript Physics Engine) fromhttp://www.cove.org/ape/.
It was converted to java
(http://www.cove.org/ape/java_ape.zip)
so I
started to convert the java version to Android.

The performance is quite OK for 10-20 objects at the first
start
of
the app but if you exit with the back key and restart it form
the
installed copy
(either in the emulator or on the dev phone) then it gets
slower
and
slower with each start. If you restart it from the emulator
(by
reinstalling it) then it is faster again.
Neither the pressed keys are not working (probably it is
because
of
 my
poor Android programming knowledge).

Here is a zipped Android project of it. Please experiment
with
it and
send results to here i.e. is it slow for you also after
re-re-re-..
staring?www.kotiposti.net/lkelemen/android/testape2d.zip

thanks
Lajos Kelemen

On Mar 31, 9:26 pm, shaun shashepp...@gmail.com wrote:

 I started going down the path of Object pooling.  It seemed
 the
 only
 solution when taking an existing engine and making work on
 a
 resource
 constrained system like Android on a phone.  Determining
 the
 strategy
 for returning objects to the pool proved quite tough for
 me.
  I
 have
 no doubt there are some experts on embedded systems
 programming
 with
 tons of experience with object pooling.  We just would be
 too
 lucky
 if
 that person(s) was also experienced with Java, physics
 engines
 and
 had
 a passion for open source and games!  Is that too much to
 ask?
  LOL!!

 On Mar 31, 12:17 pm, mscwd01 mscw...@gmail.com wrote:

  Thanks for your feedback Shaun, I too unfortunately think
  a
 bespoke
  engine will need to be written for Android, which is a
  real
  pity
 as
  the iPhone has

 ...

 read more »
--~--~-~--~~~---~--~~
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

[android-developers] Re: Android Physics Engine

2009-04-03 Thread mscwd01

I was saying in terms of the other physics engines we have tested,
15fps for 30+ objects is a lot more acceptable than 1-2fps! But yes of
course if you were to create a game which relied heavily on a physics
engine it would be less than ideal ;)

On Apr 3, 4:31 pm, Stoyan Damov stoyan.da...@gmail.com wrote:
 On Fri, Apr 3, 2009 at 6:24 PM, mscwd01 mscw...@gmail.com wrote:

  I have thrown together a quick example of the APE Physics engine
  (www.cove.org/ape/) running on Android.

  As you can see, simulating 30 or so circles results in a solid 15fps,
  which looks acceptable.

 :( 15 fps? IMO it's not that acceptable for action/arcade games
 especially ones with fast-moving objects, but I have to try it before
 I can be sure.

 Cheers
--~--~-~--~~~---~--~~
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: Android Physics Engine

2009-04-01 Thread mscwd01

Thanks for the demo Anton,

It certainly runs much smoother than the Phys2D and JBox2D engines I
have tried and you have more objects being simulated - so you must
have done something right ;)

I would expect it to run 2-3 times faster on an actual device too from
what I have read.

Once you have finished off the improvements do you have any plans to
release it?

Thanks

On Apr 1, 7:44 am, Anton socialhac...@gmail.com wrote:
     OK, for anyone interested in my simple physics demo, check out:

    http://www.antonstoys.com/android/BallPit.apk

     It's pretty basic, but it shows that you can do some amount of
 physics on the G-phone at a reasonable rate.  And as always, there are
 many improvements to be made.  :)

     -Anton

 On Mar 31, 2:12 pm, Anton socialhac...@gmail.com wrote:

      I'll definitely post the app tonight for you guys to check out (at
  work now).  I am an embedded systems programmer by trade.  But I do
  physics toys for fun and am just getting into Java/Android
  optimizations.  I will point out that optimizing for Java and
  optimizing for Android are very different.  As people have pointed out
  before, the key things to be careful with on Android are memory
  allocation and floating point math.  I've removed both of these from
  my physics loop.  I also found that function call overhead was quite
  large and had to manually inline all of my fixed point math code.  I
  think that with the correct spatial data structures I can get a couple
  hundred objects interacting.  I have a 2D rigid body physics engine
  that is currently all C++ (no exceptions or templates or RTTI or
  multiple inheritance) that I may port over as well.

      However, having said all of that, I think it may be the case that
  we will just have to wait until a native SDK is available to really
  write a top notch physics engine.  It's sort of the perfect example of
  a piece of code that doesn't need anything more than libc and JNI
  bindings.  And since you only call it a couple times per frame the JNI
  overhead would be well amortized.

      Anton

  On Mar 31, 9:17 am, mscwd01 mscw...@gmail.com wrote:

   Thanks for your feedback Shaun, I too unfortunately think a bespoke
   engine will need to be written for Android, which is a real pity as
   the iPhone has several physics engines which can easily handle
   hundreds of objects.

   Having said that Anton (2nd reply) has said he has an engine running,
   it would be nice to see a demo of this if that'd be possible?

   Clark, i'd definately host any .apk's on my own site, I wouldn't put
   it on the marketplace if it wasn't a finished app - do people
   actually do that?!

   I think i'll stay away from developing games with physics for the time
   being and concentrate on something else, I cant see it being feasible
   to include it any time soon which is a real pity.

   On Mar 31, 3:28 pm, shaun shashepp...@gmail.com wrote:

I am the author of simpull.

Sorry guys for the demo being out of whack for Simpull to the Core.
The version of PulpCore that I integrated simpull with did not support
Chrome, but you should be able to see it in IE, FF Safari.  It is nice
to take a look at that demo to get a feel for what the engine is
capable of, but the performance does not translate over to the fixed
point branch/version of simpull when running on Android.

I ran tests on both the emulator and the actual device and there was a
significant increase in performance because of the fixed point
implementation, but I got very frustrated that it still did not
support the amount of objects in a scene that I considered good for a
physics-based game.  It seemed to handle ~10 objects moving and
colliding OK.  It has been a while since I was playing with it, so I
do not really remember the exact number of objects or the frame rate.
I mostly remember being upset with it.

I am leaving the physics ideas for games out of the picture when
thinking Android for now.  Someone would have to write a ground up
engine with all the performance and memory concerns of Android in
mind, which was not the case with Simpull.I created it for
applets, then thought to port over to fixed-point for Android.  It
works well with small scenes, but certainly not the staple engine to
use in my opinion.

Also, Phys2D will not run worth a damn on Android.  I tried it and I
even went through some heavy performance tuning.  Garbage collection
is the major issue even after all I did.  I seriously doubt JBox2D
will run well either.  I'll stick to what I said earlier, a ground-up
solution by someone smarter than me is probably required.

On Mar 31, 9:49 am, admin.androidsl...@googlemail.com

admin.androidsl...@googlemail.com wrote:
 Not tried but if you can provide us with some example source code or
 put something on the market, I'm sure we could take a look.

 G1

[android-developers] Re: Android Physics Engine

2009-04-01 Thread mscwd01

Thanks Lajos for pointing APE out, I hadn't heard of it until now.

Unfortunately your link to your Android port is broken, can you mend
it as I dont fancy spending another hour porting another library to
Android :D

Thanks

On Mar 31, 9:50 pm, lkelemen tridc...@gmail.com wrote:
 Hello everyone,

 I was also disappointed with jbox2d's performance so I checked APE
 (Actionscript Physics Engine) fromhttp://www.cove.org/ape/.
 It was converted to java (http://www.cove.org/ape/java_ape.zip) so I
 started to convert the java version to Android.

 The performance is quite OK for 10-20 objects at the first start of
 the app but if you exit with the back key and restart it form the
 installed copy
 (either in the emulator or on the dev phone) then it gets slower and
 slower with each start. If you restart it from the emulator (by
 reinstalling it) then it is faster again.
 Neither the pressed keys are not working (probably it is because of my
 poor Android programming knowledge).

 Here is a zipped Android project of it. Please experiment with it and
 send results to here i.e. is it slow for you also after re-re-re-..
 staring?www.kotiposti.net/lkelemen/android/testape2d.zip

 thanks
 Lajos Kelemen

 On Mar 31, 9:26 pm, shaun shashepp...@gmail.com wrote:

  I started going down the path of Object pooling.  It seemed the only
  solution when taking an existing engine and making work on a resource
  constrained system like Android on a phone.  Determining the strategy
  for returning objects to the pool proved quite tough for me.  I have
  no doubt there are some experts on embedded systems programming with
  tons of experience with object pooling.  We just would be too lucky if
  that person(s) was also experienced with Java, physics engines and had
  a passion for open source and games!  Is that too much to ask?  LOL!!

  On Mar 31, 12:17 pm, mscwd01 mscw...@gmail.com wrote:

   Thanks for your feedback Shaun, I too unfortunately think a bespoke
   engine will need to be written for Android, which is a real pity as
   the iPhone has several physics engines which can easily handle
   hundreds of objects.

   Having said that Anton (2nd reply) has said he has an engine running,
   it would be nice to see a demo of this if that'd be possible?

   Clark, i'd definately host any .apk's on my own site, I wouldn't put
   it on the marketplace if it wasn't a finished app - do people
   actually do that?!

   I think i'll stay away from developing games with physics for the time
   being and concentrate on something else, I cant see it being feasible
   to include it any time soon which is a real pity.

   On Mar 31, 3:28 pm, shaun shashepp...@gmail.com wrote:

I am the author ofsimpull.

Sorry guys for the demo being out of whack forSimpullto the Core.
The version of PulpCore that I integratedsimpullwith did not support
Chrome, but you should be able to see it in IE, FF Safari.  It is nice
to take a look at that demo to get a feel for what the engine is
capable of, but the performance does not translate over to the fixed
point branch/version ofsimpullwhen running on Android.

I ran tests on both the emulator and the actual device and there was a
significant increase in performance because of the fixed point
implementation, but I got very frustrated that it still did not
support the amount of objects in a scene that I considered good for a
physics-based game.  It seemed to handle ~10 objects moving and
colliding OK.  It has been a while since I was playing with it, so I
do not really remember the exact number of objects or the frame rate.
I mostly remember being upset with it.

I am leaving the physics ideas for games out of the picture when
thinking Android for now.  Someone would have to write a ground up
engine with all the performance and memory concerns of Android in
mind, which was not the case withSimpull.I created it for
applets, then thought to port over to fixed-point for Android.  It
works well with small scenes, but certainly not the staple engine to
use in my opinion.

Also, Phys2D will not run worth a damn on Android.  I tried it and I
even went through some heavy performance tuning.  Garbage collection
is the major issue even after all I did.  I seriously doubt JBox2D
will run well either.  I'll stick to what I said earlier, a ground-up
solution by someone smarter than me is probably required.

On Mar 31, 9:49 am, admin.androidsl...@googlemail.com

admin.androidsl...@googlemail.com wrote:
 Not tried but if you can provide us with some example source code or
 put something on the market, I'm sure we could take a look.

 G1 performance is significantly faster than emulator, but there are
 limitations.

 Particularly with garbage collection and memory allocation on code
 that gets run continuously in loops, so I don't know how optimised
 these physics engines

[android-developers] Re: Android Physics Engine

2009-04-01 Thread mscwd01

I have some good news too, I have successfully ported APE (http://
www.cove.org/ape/) to Android and have a simulation of 50 objects
running extremely smoothly.

Considering I have only spent an hour or so converting everything to
Android and making minimal optimisations this is really good news
indeed. One thing I have noticed with APE is how lightweight it is;
compared to the other engines I have tested this is 5-10 times smaller
at least.

I'll have a demo for you guys within a day or two, if your interested.

On Apr 2, 2:12 am, Streets Of Boston flyingdutc...@gmail.com wrote:
 About open-sourcing it:

 Thanks! That would be great and i'll be happy to do some work on it to
 make it even better (if i *can* do this; you already did a great job).

 Let us know when your api is ready to be put on open-source. :-)

 On Apr 1, 8:48 pm, Anton socialhac...@gmail.com wrote:

      I've done some more profile based hand optimization and I now have
  it running superfast.  :)  I've put the new version in the same
  location as the previous one.  I still had some floating point code
  that was slowing me down.  The difference between floating point and
  fixed point is not to be underestimated is what I'm taking away from
  that work.  It reminds me of writing optimized 3D graphics for the
  486.  :)  I loved that.

      Daniel, you're right about the ghosting.  I hadn't really noticed
  it until you pointed it out, and now it's really obvious.  :)  The
  green balls were just a quick rendering with my raytracer.  I'll
  definitely change them out for something better.  :)

      Mscwd, I think I will open source the resulting engine.  Though
  It'll be a little while before it's actually useful.  Right now it's
  more of a proof of abilities.  Something to show that with enough
  optimization, you can do decent physics on Android.

      Thanks all,
          Anton

  On Apr 1, 6:55 am, Streets Of Boston flyingdutc...@gmail.com wrote:

   Two thumbs up!

   It's fast, not superfast, but there are quite a number of balls in the
   pit. I'm impressed.
   If this code could get into the native system, into the firmware...

   On Apr 1, 2:44 am, Anton socialhac...@gmail.com wrote:

    OK, for anyone interested in my simple physics demo, check out:

   http://www.antonstoys.com/android/BallPit.apk

    It's pretty basic, but it shows that you can do some amount of
physics on the G-phone at a reasonable rate.  And as always, there are
many improvements to be made.  :)

    -Anton

On Mar 31, 2:12 pm, Anton socialhac...@gmail.com wrote:

     I'll definitely post the app tonight for you guys to check out (at
 work now).  I am an embedded systems programmer by trade.  But I do
 physics toys for fun and am just getting into Java/Android
 optimizations.  I will point out that optimizing for Java and
 optimizing for Android are very different.  As people have pointed out
 before, the key things to be careful with on Android are memory
 allocation and floating point math.  I've removed both of these from
 my physics loop.  I also found that function call overhead was quite
 large and had to manually inline all of my fixed point math code.  I
 think that with the correct spatial data structures I can get a couple
 hundred objects interacting.  I have a 2D rigid body physics engine
 that is currently all C++ (no exceptions or templates or RTTI or
 multiple inheritance) that I may port over as well.

     However, having said all of that, I think it may be the case that
 we will just have to wait until a native SDK is available to really
 write a top notch physics engine.  It's sort of the perfect example of
 a piece of code that doesn't need anything more than libc and JNI
 bindings.  And since you only call it a couple times per frame the JNI
 overhead would be well amortized.

     Anton

 On Mar 31, 9:17 am, mscwd01 mscw...@gmail.com wrote:

  Thanks for your feedback Shaun, I too unfortunately think a bespoke
  engine will need to be written for Android, which is a real pity as
  the iPhone has several physics engines which can easily handle
  hundreds of objects.

  Having said that Anton (2nd reply) has said he has an engine 
  running,
  it would be nice to see a demo of this if that'd be possible?

  Clark, i'd definately host any .apk's on my own site, I wouldn't put
  it on the marketplace if it wasn't a finished app - do people
  actually do that?!

  I think i'll stay away from developing games with physics for the 
  time
  being and concentrate on something else, I cant see it being 
  feasible
  to include it any time soon which is a real pity.

  On Mar 31, 3:28 pm, shaun shashepp...@gmail.com wrote:

   I am the author of simpull.

   Sorry guys for the demo being out of whack for Simpull to the 
   Core

[android-developers] Re: Android Physics Engine

2009-03-31 Thread mscwd01

I did take a look at Simpull, however the demo application failed to
run as it relied on some library which wasn't supplied or referenced
to - I just got annoyed after spending two days failing to get Phys2D
and JBox2D to work in Android and didn't bother trying to work out the
problems!

I might give it another look though...

On Mar 30, 10:41 pm, Streets Of Boston flyingdutc...@gmail.com
wrote:
 I wonder how well this one works on Android:

  http://code.google.com/p/simpull/

 -- Anton Spaans

 On Mar 30, 4:58 pm, Anton socialhac...@gmail.com wrote:

      I have a simple 2D physics engine written and running.  It uses
  the now famous Jacobson physics tricks (Verlet integration and hard
  constraints).  I can manage 40 balls on the screen, with fill n^2
  interaction between balls.  I am working on spatial data structure
  optimizations now to improve the computational complexity of the
  collision detection code.  I run the constraint update loop five times
  per frame and get 30 frames per second.  Once the engine is up and
  running there are no memory allocations done in my program.  And once
  the system settles down from the app launch there are very few GC
  events from other programs.  Though they do still happen.  Viewing
  LogCat I see a GC every 10 or 20 seconds because of some background
  application.  But between those events I get a consistent frame rate.
  I am using OpenGL for my rendering.

      -Anton

  On Mar 30, 1:14 pm, mscwd01 mscw...@gmail.com wrote:

   Does anyone know of, or have implemented, a physics engine which runs
   smoothly in Android?

   I have spent the last couple of days trying Phys2D and JBox2D, however
   both perform very poorly - I am struggling to get even a few objects
   to simulate smoothly as frequent garbage collection spoils it.

   One question I do have is will these run smoother on an actual G1
   device or is the performance of the emulator accurate?

   Thanks- 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: Android Physics Engine

2009-03-31 Thread mscwd01

Oh I forgot to re-ask...

Has anyone tested Phys2D or JBox2D on an actual device to see if they
run better than on the emulator?

I have a feeling the performance will better on a G1 than the emulator
for some reason!

On Mar 31, 12:51 pm, mscwd01 mscw...@gmail.com wrote:
 I did take a look at Simpull, however the demo application failed to
 run as it relied on some library which wasn't supplied or referenced
 to - I just got annoyed after spending two days failing to get Phys2D
 and JBox2D to work in Android and didn't bother trying to work out the
 problems!

 I might give it another look though...

 On Mar 30, 10:41 pm, Streets Of Boston flyingdutc...@gmail.com
 wrote:

  I wonder how well this one works on Android:

   http://code.google.com/p/simpull/

  -- Anton Spaans

  On Mar 30, 4:58 pm, Anton socialhac...@gmail.com wrote:

       I have a simple 2D physics engine written and running.  It uses
   the now famous Jacobson physics tricks (Verlet integration and hard
   constraints).  I can manage 40 balls on the screen, with fill n^2
   interaction between balls.  I am working on spatial data structure
   optimizations now to improve the computational complexity of the
   collision detection code.  I run the constraint update loop five times
   per frame and get 30 frames per second.  Once the engine is up and
   running there are no memory allocations done in my program.  And once
   the system settles down from the app launch there are very few GC
   events from other programs.  Though they do still happen.  Viewing
   LogCat I see a GC every 10 or 20 seconds because of some background
   application.  But between those events I get a consistent frame rate.
   I am using OpenGL for my rendering.

       -Anton

   On Mar 30, 1:14 pm, mscwd01 mscw...@gmail.com wrote:

Does anyone know of, or have implemented, a physics engine which runs
smoothly in Android?

I have spent the last couple of days trying Phys2D and JBox2D, however
both perform very poorly - I am struggling to get even a few objects
to simulate smoothly as frequent garbage collection spoils it.

One question I do have is will these run smoother on an actual G1
device or is the performance of the emulator accurate?

Thanks- 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: Android Physics Engine

2009-03-31 Thread mscwd01

I'll try and wrap my Phys2D  JBox2D examples into a .apk sometime.
I'm very busy at the moment though so it may be later in the week by
the time I get to do it. I'll provide a link in this thread if I get
to do it.

Other than that, i'll have to wait until the HTC Magic is released
soon ;)

On Mar 31, 2:49 pm, admin.androidsl...@googlemail.com
admin.androidsl...@googlemail.com wrote:
 Not tried but if you can provide us with some example source code or
 put something on the market, I'm sure we could take a look.

 G1 performance is significantly faster than emulator, but there are
 limitations.

 Particularly with garbage collection and memory allocation on code
 that gets run continuously in loops, so I don't know how optimised
 these physics engines are for this purpose.

 Would be interesting to find out though.

 On Mar 31, 12:52 pm, mscwd01 mscw...@gmail.com wrote:

  Oh I forgot to re-ask...

  Has anyone tested Phys2D or JBox2D on an actual device to see if they
  run better than on the emulator?

  I have a feeling the performance will better on a G1 than the emulator
  for some reason!

  On Mar 31, 12:51 pm, mscwd01 mscw...@gmail.com wrote:

   I did take a look at Simpull, however the demo application failed to
   run as it relied on some library which wasn't supplied or referenced
   to - I just got annoyed after spending two days failing to get Phys2D
   and JBox2D to work in Android and didn't bother trying to work out the
   problems!

   I might give it another look though...

   On Mar 30, 10:41 pm, Streets Of Boston flyingdutc...@gmail.com
   wrote:

I wonder how well this one works on Android:

 http://code.google.com/p/simpull/

-- Anton Spaans

On Mar 30, 4:58 pm, Anton socialhac...@gmail.com wrote:

     I have a simple 2D physics engine written and running.  It uses
 the now famous Jacobson physics tricks (Verlet integration and hard
 constraints).  I can manage 40 balls on the screen, with fill n^2
 interaction between balls.  I am working on spatial data structure
 optimizations now to improve the computational complexity of the
 collision detection code.  I run the constraint update loop five times
 per frame and get 30 frames per second.  Once the engine is up and
 running there are no memory allocations done in my program.  And once
 the system settles down from the app launch there are very few GC
 events from other programs.  Though they do still happen.  Viewing
 LogCat I see a GC every 10 or 20 seconds because of some background
 application.  But between those events I get a consistent frame rate.
 I am using OpenGL for my rendering.

     -Anton

 On Mar 30, 1:14 pm, mscwd01 mscw...@gmail.com wrote:

  Does anyone know of, or have implemented, a physics engine which 
  runs
  smoothly in Android?

  I have spent the last couple of days trying Phys2D and JBox2D, 
  however
  both perform very poorly - I am struggling to get even a few objects
  to simulate smoothly as frequent garbage collection spoils it.

  One question I do have is will these run smoother on an actual G1
  device or is the performance of the emulator accurate?

  Thanks- 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] Android Physics Engine

2009-03-30 Thread mscwd01

Does anyone know of, or have implemented, a physics engine which runs
smoothly in Android?

I have spent the last couple of days trying Phys2D and JBox2D, however
both perform very poorly - I am struggling to get even a few objects
to simulate smoothly as frequent garbage collection spoils it.

One question I do have is will these run smoother on an actual G1
device or is the performance of the emulator accurate?

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] Accuracy of sensors such as electronic compass

2009-03-19 Thread mscwd01

Just a quick question...

I am now beginning an app which will use the compass and tilt sensors
to determine a persons heading and line of sight. Can I assume the
sensors on devices such as the G1 are fairly accurate or can I expect
to run into problems such as the compass being 5-10 degress off etc?

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
-~--~~~~--~~--~--~---



  1   2   >