[android-developers] Re: sdk setup.exe and windows 7

2010-01-27 Thread Droidy
Run the SDK from a command line prompt that you have
made yourself or type command in the start box on windows
and CD to your sdk directory.

Then the dos box does not vanish and you can read the error.

On Jan 27, 12:03 am, Andrew Green greenie...@gmail.com wrote:
 Hi
 I have been unable to run the sdk setup.exe on windows 7. A black
 command line box appears for half a second then stops. No error
 message is in the console. I know the requirements do not mention
 windows 7. Though I'm hoping it works.
 So anyone have any idea how to get this to work?

-- 
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: OpenGL Fillrate Issues

2010-01-27 Thread MrChaz
@Kevin
You might want to look at the rokon engine a good basis for doing a 2D
game as it takes care of pretty much all the rendering work.

@Mario
I was hoping to avoid using the build number as that is a temporary
fix only.

@Ralf
The accepted work around for the touch slow down issue is to put a
Thread.sleep() in the event handler to stop it getting spammed with
events.  A delay for 16ms seems to work well for most people.

On Jan 27, 1:00 am, Kevin Duffey andjar...@gmail.com wrote:
 Is there any good resources on tile based games.. like how to construct the
 game loop, keep it time based, update frames every 16ms or so while calling
 your physics, collision detection, movement, and redrawing routines in that
 time? I would love to develop some side scroller/top down tile based games
 with sprites, and yet I can't seem to find a good place to start. I saw this
 one google IO presentation, forget the guys name, that said on each
 iteration you pass the time delta and always keep it time based (as opposed
 to frame based I assume) and that while some basic puzzle games can get away
 with using a canvas (GLSurfaceView??), most games would require open GL to
 some extent. As well, I am interesting in knowing how to play background
 music and yet still play multiple sound FX on time with no delay so that
 when something collides, a sound plays at that exact moment, not a 1/2
 second later. Is there any good resources on this? I don't need to make a
 perfect game my first time out.. just something to play with. I am also
 curious with regards to the 24MB ram limit per app, how you make larger
 levels without any potential delay in the game play. As the game scrolls one
 way or another (especially a top down with a large map), how do you avoid
 the GC while loading in new tiles for the map? One thought I had was the
 game goes online to get a map, storing it on the SD card, so as to avoid
 using precious on-board user/app ram. I've read from various posts from some
 of you about how you try to load everything in first, don't create any
 objects during the game loop, etc, but it seems games on the iPhone are
 quite impressive with smooth framerates, and I am aware that we're a bit
 limited as of yet on Android, especially with regards to the NDK layer being
 able to update video/audio buffers (or maybe I have that wrong?).

 As well, how important will a JIT play into games being better perofmant
 when we finally get a JIT (and anyone know when that might be by chance?).
 Along the same lines, can someone correct me regarding the info I think I
 have pulled from various posts about video/audio buffers/hardware access in
 the NDK layer? Do most of these opengl/better games require NDK C code to
 work well? Or are most of these games using pure Java code? I am thinking
 like Robert Green's game, and the air plane landing game (which seems like
 there are 5 or more on the market now of almost identical game..someone
 lifted the original code I guess?). Are they using NDK and thus I gotta get
 into that lower level to make a viable game... or is it possible to do a
 decent side scroll/top scroller game without going to that level.

 In a nutshell, I don't have the talent to build high end games like
 Assassins Creed, NBA hoops, etc form iPhone. I am not that skilled. However,
 I would love to learn, but think starting with a basic side scroller game
 with tiles and animted sprites is a great place to start. So, any
 references/urls/tutorials anyone can point to with some details on the whole
 game loop, how to scroll/draw tiles, update animations of sprites so they
 look fluid as they move, and how to mix music/sounds in there?

 Thank you. Loving this and other game posts btw.

 On Tue, Jan 26, 2010 at 4:20 PM, Mario Zechner badlogicga...@gmail.comwrote:



  I'm not Robert but I can at least confirm that a depth buffer with 24
  bit is optimal for the Droid. I can also confimg that the
  GLSufraceView choses that depth by default when you don't set your own
  EGLConfigChoser.

  As a side note: from robert's and my experience achieving 60fps on the
  droid is near impossible for any sufficiently complex game. I don't
  know what the N1.sports as a gpu but I suspect it to be near the
  PowerVR in the droid,. Combined with the high res native resolution
  the results should be pretty similar for both the droid and the n1.

  That being said, there shouldn't be any problems with touch events on
  devices running android = 2.0 as they fixed the event flood problem
  in that version. I couldn't see any problem in my projects that make
  heavy use of the touch screen on my droid. There seems to be a small
  memory leak in the onTouch method if you don't call event.recycle
  before exiting the onTouch method.

  Hth
  On 27 Jan., 00:27, Ralf Schneider li...@gestaltgeber.com wrote. :
   Thanks Robert!

   These are good news.

   Since you are testing on a Droid.
   Can you confirm a 24 bit depth buffer is best for the 

[android-developers] Re: adb doesn't see Nexus on XP-64

2010-01-27 Thread DonFrench
No one has any thoughts on this?   Anyone else using XP-64 for Android
development?

On Jan 25, 10:06 pm, DonFrench dcfre...@gmail.com wrote:
 I can't get adb to see my Nexus on XP-64.  That is, when I run adb
 devices it lists only the open emulators and not the Nexus. Likewise,
 Eclipse does not show the Nexus as an available deployment target.
 Yes, I have the latest USB driver for Nexus.  The driver appears to
 have installed correctly.  The device manager shows Android phone 
 Composite Android Interface, as expected.  And yes, USB debugging is
 turned on on the Nexus.  My Windows 7 Netbook does not have this
 problem but I need to use the XP-64 system for development.  Please
 help if you know the solution to this problem.

-- 
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: OpenGL Fillrate Issues

2010-01-27 Thread Robert Green
@Kevin - I've written lots about this and posted code to use.  Check
out the following links:
http://www.rbgrn.net/content/54-getting-started-android-game-development
http://www.rbgrn.net/content/215-light-racer-3d-development-journal

@MrChaz
From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
to adequately fixing the problem.  I have tried ranges from 16-1000
and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
or lower on the G1.  The game suffers no such problems on the Droid
and Nexus One.  I've also taken out everything but the call to sleep
(so onTouchEvent ONLY sleeps and returns) and I STILL see that
slowdown, so it's not my handling code.  Also, I bound keyboard keys
to do the same things and wouldn't you know, it works perfectly, thus
proving that it's simple low-level touch code sucking up the CPU and
killing my framerate.  If you don't use a sleep, it's even worse but
even with one, games will suffer.  The more CPU intense your game is,
the more the frame rate will drop from touching.  Like I said, I
haven't experienced any issues with framerate drop on any 2.0/2.1
device.  Only on 1.5/1.6.

My new game, a FPS, will be requiring 2.0.  It runs in 1.5 but the
user experience is bad because of that touch bug.  Also, I can take
advantage of multitouch and provide a better control system this way,
further enhancing user experience.  I just hope that most or all of
the existing phones get upgraded at some point in the next 2 months.

On Jan 27, 2:26 am, MrChaz mrchazmob...@googlemail.com wrote:
 @Kevin
 You might want to look at the rokon engine a good basis for doing a 2D
 game as it takes care of pretty much all the rendering work.

 @Mario
 I was hoping to avoid using the build number as that is a temporary
 fix only.

 @Ralf
 The accepted work around for the touch slow down issue is to put a
 Thread.sleep() in the event handler to stop it getting spammed with
 events.  A delay for 16ms seems to work well for most people.

 On Jan 27, 1:00 am, Kevin Duffey andjar...@gmail.com wrote:



  Is there any good resources on tile based games.. like how to construct the
  game loop, keep it time based, update frames every 16ms or so while calling
  your physics, collision detection, movement, and redrawing routines in that
  time? I would love to develop some side scroller/top down tile based games
  with sprites, and yet I can't seem to find a good place to start. I saw this
  one google IO presentation, forget the guys name, that said on each
  iteration you pass the time delta and always keep it time based (as opposed
  to frame based I assume) and that while some basic puzzle games can get away
  with using a canvas (GLSurfaceView??), most games would require open GL to
  some extent. As well, I am interesting in knowing how to play background
  music and yet still play multiple sound FX on time with no delay so that
  when something collides, a sound plays at that exact moment, not a 1/2
  second later. Is there any good resources on this? I don't need to make a
  perfect game my first time out.. just something to play with. I am also
  curious with regards to the 24MB ram limit per app, how you make larger
  levels without any potential delay in the game play. As the game scrolls one
  way or another (especially a top down with a large map), how do you avoid
  the GC while loading in new tiles for the map? One thought I had was the
  game goes online to get a map, storing it on the SD card, so as to avoid
  using precious on-board user/app ram. I've read from various posts from some
  of you about how you try to load everything in first, don't create any
  objects during the game loop, etc, but it seems games on the iPhone are
  quite impressive with smooth framerates, and I am aware that we're a bit
  limited as of yet on Android, especially with regards to the NDK layer being
  able to update video/audio buffers (or maybe I have that wrong?).

  As well, how important will a JIT play into games being better perofmant
  when we finally get a JIT (and anyone know when that might be by chance?).
  Along the same lines, can someone correct me regarding the info I think I
  have pulled from various posts about video/audio buffers/hardware access in
  the NDK layer? Do most of these opengl/better games require NDK C code to
  work well? Or are most of these games using pure Java code? I am thinking
  like Robert Green's game, and the air plane landing game (which seems like
  there are 5 or more on the market now of almost identical game..someone
  lifted the original code I guess?). Are they using NDK and thus I gotta get
  into that lower level to make a viable game... or is it possible to do a
  decent side scroll/top scroller game without going to that level.

  In a nutshell, I don't have the talent to build high end games like
  Assassins Creed, NBA hoops, etc form iPhone. I am not that skilled. However,
  I would love to learn, but think starting with a basic 

[android-developers] Re: Android Emulator Stop Working in Eclipse

2010-01-27 Thread Bob Kerns
This looks perfectly normal and correct to me. The application is
already up-to-date on the device, and you already have the activity
running, so it just brings it to the front.

If you kill the task, using some task manager app, or rebooting your
phone, or just wait for Android to get rid of the task, and then try
it, it will then create a completely new activity.

But what I usually do is even simpler -- I insert a space somewhere in
a source file, save it, delete the space, and save again. Now it
doesn't see the version on the phone as up-to-date, and it will
redeploy, and then, necessarily, start a fresh activity.

While sometimes I wish the debugger would automatically restart the
task, that's not what happens when the user invokes your program in
this circumstance, so I don't think it would be a good idea as a
default action for a debugger. But it does occasionally confuse me, if
I'm expecting a breakpoint in an onCreate(Bundle) method to trigger.

On Jan 26, 7:16 pm, apregister08 apregiste...@gmail.com wrote:
 I am not sure what's happening but whenever I try to run the project,
 I get the following in the console:

 [2010-01-26 22:13:37 - TestProject1.0]--
 [2010-01-26 22:13:37 - TestProject1.0]Android Launch!
 [2010-01-26 22:13:37 - TestProject1.0]adb is running normally.
 [2010-01-26 22:13:37 - TestProject1.0]Performing com.testproject.Home
 activity launch
 [2010-01-26 22:13:39 - TestProject1.0]Application already deployed. No
 need to reinstall.
 [2010-01-26 22:13:39 - TestProject1.0]Starting activity
 com.greekrow.Home on device
 [2010-01-26 22:13:40 - TestProject1.0]ActivityManager: Starting:
 Intent { cmp=com.testproject/.Home }
 [2010-01-26 22:13:40 - TestProject1.0]ActivityManager: Warning:
 Activity not started, its current task has been brought to the front

-- 
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: Edit Text Objects

2010-01-27 Thread Kumar Bibek
There's a property for all the View classes, called, Visibility

It has three states,
1. VISIBLE
2. INVISIBLE
3. GONE

I think, you are looking for GONE state.

Kumar Bibek

On Jan 26, 6:11 pm, Uzair uskele...@gmail.com wrote:
 Hi,

 ne1 knw how to create the edit text view without help from xml ...

 Wat m trying to do is that i have created 2 buttons (say btn1 and
 btn2).. Now wat i want is that when i  click 'btn1' it show me 1
 edit text object and if i click 'btn2' 2 edit boxes are shown.

 the problem is that using xml i am able to create text boxes but they
 appear even before i click on the buttons (i.e. at the start of
 activity)...

 Regards,
 Uzair

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


[android-developers] How to programmatically install an APK file ?

2010-01-27 Thread ColletJb
Hi,

How can I programmatically install an apk file ?

I've foud that the PackageManager.installPackage(...) method was used
to do that, but is no longer supported (http://developer.android.com/
sdk/api_diff/4/changes/android.content.pm.PackageManager.html)

How can I do then ?

Thanks for your help

ColletJb

-- 
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: help for custom spinner..

2010-01-27 Thread Kumar Bibek
Sorry Mate, this is not customer support. Very rarely you will find a
member, actually, creating an example for you, zipping it, and sending
it to your mail. You will only get tips, links and links to tutorials,
and links to more links.

Please read up the docs, and other examples already available.

As requested, I haven't given you any links.

Kumar Bibek

On Jan 25, 6:48 pm, chiru.. chiru.v...@gmail.com wrote:
 hi frnz.. pls help to design a custom spinner.I need to use that in my
 other application.Pls send the complete project for custom
 spinner.pls.. dont send the links and suggest the sites.Be
 specific.tnq n sry for my language.

-- 
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: sdk setup.exe and windows 7

2010-01-27 Thread Christine
A coworker told me that he had to create a symlink from the adk folder
on C: to D: or vice versa before he got the sdk to work on windows 7.

On Jan 27, 9:01 am, Droidy billr...@gmail.com wrote:
 Run the SDK from a command line prompt that you have
 made yourself or type command in the start box on windows
 and CD to your sdk directory.

 Then the dos box does not vanish and you can read the error.

 On Jan 27, 12:03 am, Andrew Green greenie...@gmail.com wrote:

  Hi
  I have been unable to run the sdk setup.exe on windows 7. A black
  command line box appears for half a second then stops. No error
  message is in the console. I know the requirements do not mention
  windows 7. Though I'm hoping it works.
  So anyone have any idea how to get this to work?

-- 
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] Gallery view not working well

2010-01-27 Thread Manoj
I am facing a problem in scrolling in Gallery view. When i scroll
slowly it works fine but when i scroll fast the it shows jerks as it
takes time to create objects to display. Can anybody tell how can i
implement this in separate thread to load images in gallery so that it
would not affect the scrolling.

-- 
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: Update SQLite Database from other app

2010-01-27 Thread Kumar Bibek
You can surely do it, if you write your ContentProvider specifically
for this situation.

Have a look at some examples.
Kumar Bibek

On Jan 26, 11:23 pm, Charlie Collins charlie.coll...@gmail.com
wrote:
 The applications are in different processes, with different
 permissions (by default, you can work around that but you don't want
 to).  So the answer is no, not directly, but as the other post here
 stated, that is exactly what a ContentProvider is for.

 http://developer.android.com/guide/topics/providers/content-providers...

 On Jan 25, 10:17 pm, David Toledo dtole...@gmail.com wrote:

  Hi All

  Is possible update the records from SQLite  from my Android  Application1
   from other Application2 Android

  Thanks
  David

-- 
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-beginners] Book for learning Android

2010-01-27 Thread Chirayu Dalwadi
I want useful links, requried to learn android Help me out

-- 
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 webservice through Android

2010-01-27 Thread Chirayu Dalwadi
I want to call a webservice through android. How do i do that??
-- 
Warm Regards,
Chirayu Dalwadi

Pain is temporary. Quitting lasts forever. -- Lance Armstrong

-- 
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: Guide Me Right Way

2010-01-27 Thread Anthoni
Hi Kevin,

Thanks for your input.
That kinda puts the kibosch on the whole idea as I have major problems
with my eyes anyway (losing them completely, but slowly).
So it is back to being awkwardly sat up in bed with the laptop, or
fork out quite a bit for a flexible e-book reader like the Kindle :)

On Jan 26, 11:55 pm, Kevin Duffey andjar...@gmail.com wrote:
 I thought the same thing Anthoni.. I tried a PDF viewer for my moto droid.
 Don't like it so much. It's much harder to work with than on a laptop
 screen. It's much smaller of course, and you end up with a lot less
 realestate, so you continually have to scroll left/right. I suppose you can
 zoom out more, but then it's too small for my older eyes to read.

 On Tue, Jan 26, 2010 at 3:03 PM, Anthoni anthoni.gard...@gmail.com wrote:
  Hi all,

  Kinda a bit off topic, but I am looking into getting the HTC Hero as
  my mobile (don't currently have an android phone yet). What I wanted
  to know is what are these new Android phones like for viewing PDF
  files? Are they pretty clear etc.

  I was looking into getting a Kindle, as it's a pain to view my PDF
  files (and now especially the ones from Mark) on my laptop as it's
  quite bulky. So was thinking maybe use the SmartPhone etc.
  Either thinking of getting the HTC Hero or waiting (impatiently lol)
  for the HTC Bravo. I live in the UK and there is no release date on
  the Bravo as yet.

  Regards
  Anthoni

  --
  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: Nexus one reporting 533 as Height!?!

2010-01-27 Thread PaulT
On Jan 20, 2:26 pm, Loki117 thomas.sheppar...@gmail.com wrote:
 Hey guys yeah I understand getting the app onto larger screens with
 resource packs etc I just found it curious that when an app is not
 marked as supporting a screen size that it reported a different
 screensize than it actually has...

Are you developing with 1.5?  For me I got the full 480x800 default by
moving to 1.6.  Is it possible that 1.5 doesn't support higher
resolutions?

If you dump the OpenGL framebuffer on 1.5, you get a raster of 320x533
pixels, the same aspect ratio as 480x800.

Paul.

-- 
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 webservice through Android

2010-01-27 Thread Sudeep
Android supports REST services but if u want to use SOAP calls ,then
look out for ksoap2 library.(google for ksoap2 android)

On Jan 27, 2:27 pm, Chirayu Dalwadi chirayu.dalw...@gmail.com wrote:
 I want to call a webservice through android. How do i do that??
 --
 Warm Regards,
 Chirayu Dalwadi

 Pain is temporary. Quitting lasts forever. -- Lance Armstrong

-- 
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 programmatically install an APK file ?

2010-01-27 Thread kirti kaul
Hi,

Use this:

 intent.setAction(android.content.Intent.ACTION_VIEW);
 intent.setDataAndType(Uri.parse(file:///
sdcard/.sampleapk), application/vnd.android.package-archive);
 startActivity(intent);

Where Sample.apk is the apk you need to install.

On Jan 27, 1:54 pm, ColletJb collet...@gmail.com wrote:
 Hi,

 How can I programmatically install an apk file ?

 I've foud that the PackageManager.installPackage(...) method was used
 to do that, but is no longer supported (http://developer.android.com/
 sdk/api_diff/4/changes/android.content.pm.PackageManager.html)

 How can I do then ?

 Thanks for your help

 ColletJb

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


Re: [android-developers] Re: Using webservice through Android

2010-01-27 Thread Chirayu Dalwadi
Does anyone has ksoap library?
How to implement it?

On Wed, Jan 27, 2010 at 3:12 PM, Sudeep sudeep.neti...@gmail.com wrote:

 Android supports REST services but if u want to use SOAP calls ,then
 look out for ksoap2 library.(google for ksoap2 android)

 On Jan 27, 2:27 pm, Chirayu Dalwadi chirayu.dalw...@gmail.com wrote:
  I want to call a webservice through android. How do i do that??
  --
  Warm Regards,
  Chirayu Dalwadi
 
  Pain is temporary. Quitting lasts forever. -- Lance Armstrong

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




-- 
Warm Regards,
Chirayu Dalwadi

Cell Number: +91-997-470-4341
Email: chirayu.dalw...@gmail.com
Profile: http://www.google.com/profiles/chirayu.dalwadi

Pain is temporary. Quitting lasts forever. -- Lance Armstrong

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

Re: [android-developers] Re: Using webservice through Android

2010-01-27 Thread Chirayu Dalwadi
Does anyone has ksoap library?
How to implement it?

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

[android-developers] Issue with WindowManager showing UI

2010-01-27 Thread Tushar
Hi,

I have just created this small application which shows simple textview
on receiving incoming call.  This app works perfectly on emulator.
Also it works very well when I launch main activity of application and
I receive incoming call.
But now if I restart phone  and if I receive incoming call, the
TextView UI  won't show up. If I check debug log everything seems
working fine i.e. my broadcast receiver receives event and invokes
function to show UI. But actual UI never shows up.
Now if I again launch application main activity and receive incoming
call, UI shows up properly.

Below is the code snippet:
---
public class IncomingCallReceiver extends BroadcastReceiver {


@Override
public void onReceive(Context context, Intent arg1) {

TelephonyManager telephony = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);


int callState = telephony.getCallState();

switch (callState) {

case TelephonyManager.CALL_STATE_IDLE: {
Log.d(MainActivity.TAG, CALL_STATE_IDLE);
hideUI(context) ;
}
break;
case TelephonyManager.CALL_STATE_OFFHOOK: {
Log.d(MainActivity.TAG, CALL_STATE_OFFHOOK);
 hideUI(context) ;
}
break;
case TelephonyManager.CALL_STATE_RINGING: {
Log.d(MainActivity.TAG, CALL_STATE_RINGING);
showUI(context) ;

}
break;
}

}

private WindowManager mWindowManager;
static View mainView ;

private void showUI(Context context) {

mWindowManager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);

WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_TOAST,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
| 
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.OPAQUE);

TextView view = new TextView(context);
view.setText(This is text view do you see it ?);
mainView = view;
mWindowManager.addView(view, lp);

Log.d(MainActivity.TAG,  showUI done);

}
}

--

Not sure what could be the cause of behavior . Any clues ?

--Tushar

-- 
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: first frame of a video file

2010-01-27 Thread Daniel
Finally found another thread that does this.
Maybe it's going to help someone.

http://groups.google.com/group/android-developers/browse_thread/thread/11ffb41e7ad7f92c/e915c32d1df29460?lnk=gstq=first+frame#e915c32d1df29460

On Jan 18, 2:49 pm, Daniel danil...@gmail.com wrote:
 I want to get this on 1.5, so i cannot use
 MediaStore.Video.Thumbnails.
 Any hint is greatly appreciated.

 On Jan 18, 9:43 am, Daniel danil...@gmail.com wrote:

  Can anybody help me with getting thefirstframeof a video file taken
  with the camera?

-- 
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: Problem in sending sms

2010-01-27 Thread Nemat
but it also happens when I use another constructor of intent.Here is
my code:

PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(9001100444, null, This is test message, pi,
null);

Thanks
Nemat


On Jan 21, 4:31 pm, Nikhil Agarwal nikhil.dontpa...@gmail.com wrote:
 Probably your SMSSender.class also sends aSMS. OnceSMSis sent, it
 will pass an intent to the SMSSender activity.

 On Jan 21, 5:02 pm, Nemat nemate...@gmail.com wrote:



  Hi.

  I am trying to sendsmsusing SmsManager class.Here is my code:

  PendingIntent pi = PendingIntent.getActivity(this, 0,
  new Intent(this, SMSSender.class), 0);
  SmsManagersms= SmsManager.getDefault();
 sms.sendTextMessage(9001100444, null, This is test message, pi,
  null);

 SMSis sent successfully but it is sent two times on the same phone-
  number and aving same content.

  I dont get theproblem.Can anyone describe me the reason of this
 problem.??

  Thanks in Advance
  Nemat- 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: Launching the correct activity on resume

2010-01-27 Thread ayanir
Hello,

I have a similar problem when I open the application from the Market.

if I go from Activity A (LAUNCHER) to B, press Home key and re open
the application from the Home screen icon it come back to Activity B
(the last Activity) as it should.
but, if I open the application from the Market application, it open
Activity A.
what is the difference between these two and how can it always open
from the last Activity no mater how I open the application?

Thanks
ayanir

On Jan 26, 8:07 am, jotobjects jotobje...@gmail.com wrote:
 Yes it looks like we have got confused here about what happens when
 returning to the Home screen (perhaps your issue was the Eclipse
 feature mentioned in the thread?).

 In the interests of clearing up quite a bit of misinformation in this
 thread, this is the what actually happens:

 Re-launching the Activity from the Home screen returns to the same
 Task that initially started that Activity (the one where action=MAIN
 and category=LAUNCHER). But whatever Activity was on top of that old
 Task is again the foreground Activity (unless clearTaskOnLaunch is
 set).

 The Activity listed in the Manifest with category LAUNCHER is NOT the
 Activity that is active and setting singleTop is not necessary to get
 this standard behavior.   Here is one place that this behavior is
 outlined -

 http://developer.android.com/intl/fr/guide/topics/manifest/activity-e...

 On Jan 25, 1:08 pm, Josh Hoffman keshis...@gmail.com wrote:

  Thank you all for your help. I've tried some of the suggestions posted
  here and it seems like the main thing that was stopping me was not
  doing a full .apk build prior to each test. I implemented the
  android:launchMode=singleTop manifest flag, but that didn't actually
  seem to get me my desired functionality. The only time I ever hit the
  onNewIntent() execution block was if I hit home from Activity1 and
  relaunched. Hitting home from Activity2 simply resulted in returning
  to Activity1 on relaunch.

  When I tested my app via adb install -l -r myApp.apk, the Android
  application stack seemed to finally behave itself. If I hit home from
  Activity2 and relaunch, I return to Activity2 exactly as I left it
  (thanks largely to Matthias Kaeppler's Droid-Fu and BetterAsyncTask, I
  might add).

  Just wanted to post and say that my issues seem to be resolved thanks
  to this new (if a bit cumbersome) development process of doing a full
  apk build. Thanks again for all the help!

  On Jan 24, 10:58 pm, String sterling.ud...@googlemail.com wrote:

   On Jan 25, 12:54 am, jotobjects jotobje...@gmail.com wrote:

If Activity1 and Activity2 are part of the same task and Activity2 is
foreground when pressing the Home key, then I thought that choosing
that app on the Home screen would return you to Activity2.

   Something to remember is that choosing that app on the Home
   screen (or in the Launcher drawer) is really clicking on a shortcut,
   and that shortcut is specifically to the activity with this in your
   manifest:

         intent-filter
           action android:name=android.intent.action.MAIN /
           category android:name=android.intent.category.LAUNCHER /
         /intent-filter

   It's also true (as another poster said) that installing your app from
   Eclipse can change what its default activity is. If you want to
   accurately simulate the behavior that  your users will see, you need
   to build an APK as you would for release, install it through the
   command line, and see what that does.

   String

-- 
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: Launching the correct activity on resume

2010-01-27 Thread ayanir
Hello,

I have a similar problem when I open the application from the Market.

if I go from Activity A (LAUNCHER) to B, press Home key and re open
the application from the Home screen icon it come back to Activity B
(the last Activity) as it should.
but, if I open the application from the Market application, it open
Activity A.
what is the difference between these two and how can it always open
from the last Activity no mater how I open the application?

Thanks
ayanir

On Jan 26, 8:07 am, jotobjects jotobje...@gmail.com wrote:
 Yes it looks like we have got confused here about what happens when
 returning to the Home screen (perhaps your issue was the Eclipse
 feature mentioned in the thread?).

 In the interests of clearing up quite a bit of misinformation in this
 thread, this is the what actually happens:

 Re-launching the Activity from the Home screen returns to the same
 Task that initially started that Activity (the one where action=MAIN
 and category=LAUNCHER). But whatever Activity was on top of that old
 Task is again the foreground Activity (unless clearTaskOnLaunch is
 set).

 The Activity listed in the Manifest with category LAUNCHER is NOT the
 Activity that is active and setting singleTop is not necessary to get
 this standard behavior.   Here is one place that this behavior is
 outlined -

 http://developer.android.com/intl/fr/guide/topics/manifest/activity-e...

 On Jan 25, 1:08 pm, Josh Hoffman keshis...@gmail.com wrote:

  Thank you all for your help. I've tried some of the suggestions posted
  here and it seems like the main thing that was stopping me was not
  doing a full .apk build prior to each test. I implemented the
  android:launchMode=singleTop manifest flag, but that didn't actually
  seem to get me my desired functionality. The only time I ever hit the
  onNewIntent() execution block was if I hit home from Activity1 and
  relaunched. Hitting home from Activity2 simply resulted in returning
  to Activity1 on relaunch.

  When I tested my app via adb install -l -r myApp.apk, the Android
  application stack seemed to finally behave itself. If I hit home from
  Activity2 and relaunch, I return to Activity2 exactly as I left it
  (thanks largely to Matthias Kaeppler's Droid-Fu and BetterAsyncTask, I
  might add).

  Just wanted to post and say that my issues seem to be resolved thanks
  to this new (if a bit cumbersome) development process of doing a full
  apk build. Thanks again for all the help!

  On Jan 24, 10:58 pm, String sterling.ud...@googlemail.com wrote:

   On Jan 25, 12:54 am, jotobjects jotobje...@gmail.com wrote:

If Activity1 and Activity2 are part of the same task and Activity2 is
foreground when pressing the Home key, then I thought that choosing
that app on the Home screen would return you to Activity2.

   Something to remember is that choosing that app on the Home
   screen (or in the Launcher drawer) is really clicking on a shortcut,
   and that shortcut is specifically to the activity with this in your
   manifest:

         intent-filter
           action android:name=android.intent.action.MAIN /
           category android:name=android.intent.category.LAUNCHER /
         /intent-filter

   It's also true (as another poster said) that installing your app from
   Eclipse can change what its default activity is. If you want to
   accurately simulate the behavior that  your users will see, you need
   to build an APK as you would for release, install it through the
   command line, and see what that does.

   String

-- 
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 programmatically install an APK file ?

2010-01-27 Thread ColletJb
Thank you, I will try this this afternoon.

On 27 jan, 10:45, kirti kaul kirti.k...@wipro.com wrote:
 Hi,

 Use this:

              intent.setAction(android.content.Intent.ACTION_VIEW);
              intent.setDataAndType(Uri.parse(file:///
 sdcard/.sampleapk), application/vnd.android.package-archive);
              startActivity(intent);

 Where Sample.apk is the apk you need to install.

 On Jan 27, 1:54 pm, ColletJb collet...@gmail.com wrote:



  Hi,

  How can I programmatically install an apk file ?

  I've foud that the PackageManager.installPackage(...) method was used
  to do that, but is no longer supported (http://developer.android.com/
  sdk/api_diff/4/changes/android.content.pm.PackageManager.html)

  How can I do then ?

  Thanks for your help

  ColletJb

-- 
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: OpenGL Fillrate Issues

2010-01-27 Thread Mario Zechner
@Kevin i wrote a small tutorial on android game dev which is available
here http://www.androidpit.de/android/de/de/wiki/view/Spieleentwicklung_101.
You can find the accompanying code here 
http://code.google.com/p/android-gamedev/.
Currently there's only a german version of the tutorial, i'm working
on the translation to english. The code itself of course uses english
for naming stuff so you should be able to follow it. It shows how to
play music/sound effects, use the accelerometer and touch screen, use
assets to store your game resources and how to setup a proper game
loop for a small Space Invaders clone. For more game dev related info
i suggest you take a look at http://www.gamedev.net, http://www.flipcode.com
and http://www.gamasutra.com. Especially gamedev.net has a load of
articles on various topics ranging back to 1999, so a lot of it is
usefull for game dev on android.

I would not reload parts of the map during runtime. I can easily cram
a 512x512 tiles big map into ram for the racer i talked about above.
It's actually two layers of tiles, one for the background and one for
the foreground. That should be more than enough for any kind of tile
based game (yes i remember bill gates famous quote...). However, you
have to split up that map into smaller chunks, say 8x8 tiles each and
figure out which chunks are currently visible on screen based on the
location of the camera. You only want to render those. The same is
true for objects in the game. This process is called culling and it is
essential to keep things smooth. As tile-based games are most often 2D
you can get away with simple forms of culling, i.e. you know the size
of a tile chunk on screen in pixels and simply calculated the distance
to the camera to figure out if it's visible. For more elaborate maps
you might have to look into frustum culling which is a bit more
involved. You can find information on all relevant techiques on the
sites i mentioned above.

The 24mb limit was not a show stopper for me yet. 512x512 tiles can be
easily stored in 512x512 bytes in a byte array. This array keeps the
information on which graphical tile is used at what position, e.g. a
grass tile, a stone tile and so on. You just give each tile a number
and store that number for each tile in the byte array. The graphical
tiles themselves should be stored in a single texture atlas (another
bunch of keywords you can google for). When you construct your OpenGL
geometry you do so for each chunk (8x8 tiles). You basically create 2
triangles for each tile in a chunk that form a quad. You give that two
triangles texture coordinates that map to the proper graphical tile in
the texture atlas. Each graphical tile in the texture atlas should be
given a number. That number is stored in the byte array mentioned
above. Once you are done with creating all meshes (again, look that
word up if you don't know it, it's basically the geometry for the
tiles) you work out the culling of each tile chunk and only draw the
meshes for the chunks that are visible. tada, tile-based map rendering
is done :). There's a couple of tricks you can use to speed up the
culling process, e.g. quadtree (which might be a bit of overkill
here). Use your favorite search engine to find out more.

@MrChaz, i can confirm the problem Robert has. No matter how much i
sleep in the onTouch method, the slow down is always noticeable. Other
games on the market also suffer from this problem. If you take a look
at Radiant for example you will notice that the bullets slow down a
tiny bit when you touch the screen. The system get's flooded with
touch events on 1.5/1.6. Calling MotionEvent.recycle() at the end of
the onTouch method helps at least with fixing the small memory leak
that occurs as a MotionEvent instance with a float array is created
each time the method is called.

On 27 Jan., 09:41, Robert Green rbgrn@gmail.com wrote:
 @Kevin - I've written lots about this and posted code to use.  Check
 out the following 
 links:http://www.rbgrn.net/content/54-getting-started-android-game-developmenthttp://www.rbgrn.net/content/215-light-racer-3d-development-journal

 @MrChaz
 From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
 to adequately fixing the problem.  I have tried ranges from 16-1000
 and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
 or lower on the G1.  The game suffers no such problems on the Droid
 and Nexus One.  I've also taken out everything but the call to sleep
 (so onTouchEvent ONLY sleeps and returns) and I STILL see that
 slowdown, so it's not my handling code.  Also, I bound keyboard keys
 to do the same things and wouldn't you know, it works perfectly, thus
 proving that it's simple low-level touch code sucking up the CPU and
 killing my framerate.  If you don't use a sleep, it's even worse but
 even with one, games will suffer.  The more CPU intense your game is,
 the more the frame rate will drop from touching.  Like I said, I
 haven't experienced any 

Re: [android-developers] How to select an item in a listview by code

2010-01-27 Thread Matt Oakes
On Wed, Jan 27, 2010 at 5:11 AM, Michael J McLean m...@mmc2.com.au wrote:
 Mark,
               Thank you for taking the time to reply. There are a lot of
 restrictions placed on developers trying to provide a quality user
 interface. I can live with this particular restriction but I would
 appreciate help on one other issue. If I use the navigation buttons to
 highlight and select an item in my listview, and then press MENU, the first
 menu item is highlighted, where if I hadn't previously navigated to one of
 the items on my list view, and press MENU, the menu item would not be
 highlighted.. I would like to prevent this from happening for the sake of
 consistency.


There are two different modes of navigation. Touch mode and button
mode (can't remember the real name). Basically if you press a
navigation button like the d-pad it will switch out of touch mode.
This means you will see items highlighted so you can tell where you
are. If you're in touch mode you wont see this highlighting because
there's no need to know where you are and you can touch anywhere on
the screen. I's therefore a user aid to have this highlighting turned
on where you activate the menu button and isn't really something you
should be messing with. I'm sure it's possible to, however it would
likely confuse users as it goes away from what normally happens on all
other apps, and keeping things consistent means much happier users.
Only change this if you really have to, not just because it looks
better.

               I wonder why the programmer doesn't just simply have the
 ability to highlight or de-highlight an item with one command. But then I
 also wonder why the programmer cannot simply call or hide the virtual
 keyboard with one command each. Getting rid of the virtual keyboard proved
 to be a messy affair with unwanted side effects. Even now, when doing a text
 entry, I find that if I hold down some characters, such as e, g, and r,
 unwanted options appear on the screen.

I presume you've disabled the virtual keyboard and have the app in a
portrait orientation. If you do it wont matter too much what you press
on the emulators keyboard as only devices with a hardware keyboard (G1
and droid for example) will be able to press these keys, and even then
only with the slider open.

What was the reason for disabling the virtual keyboard? Surely if you
have a text area you want people to be able to type into it on devices
without a keybaord.

 I would really appreciate help on
 getting rid of that. I have purchsed two books including yours, enrolled in
 a University course ( to withdraw after 3 weeks when I realised their lack
 of their ability to help), and yet I find most knowledge comes from trial
 and error, constantly reinventing the wheel, and the occasional tip from the
 forums, if your lucky. I would love to know where I can find systematic
 introductions and explanations for these basic Android features. The Android
 documentation  seems to be written as a reference source for people who
 already understand it. Seeing links being given to the Android documentation
 as an 'answer' to forum questions, is frustrating and annoying. People are
 asking for help and examples. The existence of, and size of the forums, is
 testament to the Android documentation not giving us developers what we
 need. Much of my programming time and efforts seems to be in developing ad
 hoc workarounds, to situations that prevent me from achieving the standard
 of user interface that I require.


That's how development works for me as well. The books and
documentation can only take you so far. Most of the experience comes
from actually doing it. If you want to be able to read a book and then
be able to go straight out to making a really complicated application
you're going about it the wrong way. Treat the books and documentation
as a reference and use your own project as a way of actually learning
how to develop for android.

           Two features that led me to invest most of last year into learning
 Android, were 1) the fact that it was claimed that you didn't even need a
 handset. If it worked on the emulator you could rely that it would work on
 the phone, and 2) the App store.

1) Technically true but it's always good practice to test the
application on a real device. It also helps to know how other
applications on the device function so you can keep it consistent with
that (like the touch mode example i gave above).
2) Gotta love open app stores :)

 Both of these advantages are seriously
 eroded by the fragmentation of Android. And it doesn't help to read of
 Android engineers expressing their anger in forum replies to reference being
 made to the fragmentation issues.


The fragmentation is an issue and Google does need to answer it
seriously and soon I think.

           All of the above strengthens the case for me to not merely 
 rethink your user interface to avoid the question  as advised by you, but
 to rethink the ultimate question of 

[android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Mario Zechner
@robert. i'm curios wheter you succeeded in implementing proper
multitouch controls. I planned on going the 2.0 root myself for the
racer, having all controls on screen but that didn't work out as
expected. see this thread
http://groups.google.com/group/android-developers/browse_thread/thread/be4151b4bc769a0/d5ec6cdfce2025be?lnk=gstq=multitouch#d5ec6cdfce2025be
and the videos linked to in there for more information. All multitouch
capable apps on the market suffer from this problem. I'd be very
interested in your onTouch handler in case that worked out for you.

On 27 Jan., 09:41, Robert Green rbgrn@gmail.com wrote:
 @Kevin - I've written lots about this and posted code to use.  Check
 out the following 
 links:http://www.rbgrn.net/content/54-getting-started-android-game-developmenthttp://www.rbgrn.net/content/215-light-racer-3d-development-journal

 @MrChaz
 From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
 to adequately fixing the problem.  I have tried ranges from 16-1000
 and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
 or lower on the G1.  The game suffers no such problems on the Droid
 and Nexus One.  I've also taken out everything but the call to sleep
 (so onTouchEvent ONLY sleeps and returns) and I STILL see that
 slowdown, so it's not my handling code.  Also, I bound keyboard keys
 to do the same things and wouldn't you know, it works perfectly, thus
 proving that it's simple low-level touch code sucking up the CPU and
 killing my framerate.  If you don't use a sleep, it's even worse but
 even with one, games will suffer.  The more CPU intense your game is,
 the more the frame rate will drop from touching.  Like I said, I
 haven't experienced any issues with framerate drop on any 2.0/2.1
 device.  Only on 1.5/1.6.

 My new game, a FPS, will be requiring 2.0.  It runs in 1.5 but the
 user experience is bad because of that touch bug.  Also, I can take
 advantage of multitouch and provide a better control system this way,
 further enhancing user experience.  I just hope that most or all of
 the existing phones get upgraded at some point in the next 2 months.

 On Jan 27, 2:26 am, MrChaz mrchazmob...@googlemail.com wrote:

  @Kevin
  You might want to look at the rokon engine a good basis for doing a 2D
  game as it takes care of pretty much all the rendering work.

  @Mario
  I was hoping to avoid using the build number as that is a temporary
  fix only.

  @Ralf
  The accepted work around for the touch slow down issue is to put a
  Thread.sleep() in the event handler to stop it getting spammed with
  events.  A delay for 16ms seems to work well for most people.

  On Jan 27, 1:00 am, Kevin Duffey andjar...@gmail.com wrote:

   Is there any good resources on tile based games.. like how to construct 
   the
   game loop, keep it time based, update frames every 16ms or so while 
   calling
   your physics, collision detection, movement, and redrawing routines in 
   that
   time? I would love to develop some side scroller/top down tile based games
   with sprites, and yet I can't seem to find a good place to start. I saw 
   this
   one google IO presentation, forget the guys name, that said on each
   iteration you pass the time delta and always keep it time based (as 
   opposed
   to frame based I assume) and that while some basic puzzle games can get 
   away
   with using a canvas (GLSurfaceView??), most games would require open GL to
   some extent. As well, I am interesting in knowing how to play background
   music and yet still play multiple sound FX on time with no delay so that
   when something collides, a sound plays at that exact moment, not a 1/2
   second later. Is there any good resources on this? I don't need to make a
   perfect game my first time out.. just something to play with. I am also
   curious with regards to the 24MB ram limit per app, how you make larger
   levels without any potential delay in the game play. As the game scrolls 
   one
   way or another (especially a top down with a large map), how do you avoid
   the GC while loading in new tiles for the map? One thought I had was the
   game goes online to get a map, storing it on the SD card, so as to avoid
   using precious on-board user/app ram. I've read from various posts from 
   some
   of you about how you try to load everything in first, don't create any
   objects during the game loop, etc, but it seems games on the iPhone are
   quite impressive with smooth framerates, and I am aware that we're a bit
   limited as of yet on Android, especially with regards to the NDK layer 
   being
   able to update video/audio buffers (or maybe I have that wrong?).

   As well, how important will a JIT play into games being better perofmant
   when we finally get a JIT (and anyone know when that might be by chance?).
   Along the same lines, can someone correct me regarding the info I think I
   have pulled from various posts about video/audio buffers/hardware access 
   in
 

[android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Mario Zechner
@kevin
wheter your game needs native code or not depends on the type of game.
If you are doing animated 3D meshes, like using md2 meshes (quake 2
format) you need to write the vertex interpolation code in c if you
have more than a few (==2-3 from my experience) meshes displayed. As
for the overhead of calling JNI functions i'd say it's neglectable in
most cases. The space invaders clone above performs a lot of calls to
OpenGL matrix functions as well as mesh rendering functions and that
didn't seem to bog it down the least ( a lot ~= (32+15+1)*(4+7) =
528 ) on the hero as well as on the droid.

On 27 Jan., 11:33, Mario Zechner badlogicga...@gmail.com wrote:
 @robert. i'm curios wheter you succeeded in implementing proper
 multitouch controls. I planned on going the 2.0 root myself for the
 racer, having all controls on screen but that didn't work out as
 expected. see this 
 threadhttp://groups.google.com/group/android-developers/browse_thread/threa...
 and the videos linked to in there for more information. All multitouch
 capable apps on the market suffer from this problem. I'd be very
 interested in your onTouch handler in case that worked out for you.

 On 27 Jan., 09:41, Robert Green rbgrn@gmail.com wrote:

  @Kevin - I've written lots about this and posted code to use.  Check
  out the following 
  links:http://www.rbgrn.net/content/54-getting-started-android-game-developm...

  @MrChaz
  From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
  to adequately fixing the problem.  I have tried ranges from 16-1000
  and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
  or lower on the G1.  The game suffers no such problems on the Droid
  and Nexus One.  I've also taken out everything but the call to sleep
  (so onTouchEvent ONLY sleeps and returns) and I STILL see that
  slowdown, so it's not my handling code.  Also, I bound keyboard keys
  to do the same things and wouldn't you know, it works perfectly, thus
  proving that it's simple low-level touch code sucking up the CPU and
  killing my framerate.  If you don't use a sleep, it's even worse but
  even with one, games will suffer.  The more CPU intense your game is,
  the more the frame rate will drop from touching.  Like I said, I
  haven't experienced any issues with framerate drop on any 2.0/2.1
  device.  Only on 1.5/1.6.

  My new game, a FPS, will be requiring 2.0.  It runs in 1.5 but the
  user experience is bad because of that touch bug.  Also, I can take
  advantage of multitouch and provide a better control system this way,
  further enhancing user experience.  I just hope that most or all of
  the existing phones get upgraded at some point in the next 2 months.

  On Jan 27, 2:26 am, MrChaz mrchazmob...@googlemail.com wrote:

   @Kevin
   You might want to look at the rokon engine a good basis for doing a 2D
   game as it takes care of pretty much all the rendering work.

   @Mario
   I was hoping to avoid using the build number as that is a temporary
   fix only.

   @Ralf
   The accepted work around for the touch slow down issue is to put a
   Thread.sleep() in the event handler to stop it getting spammed with
   events.  A delay for 16ms seems to work well for most people.

   On Jan 27, 1:00 am, Kevin Duffey andjar...@gmail.com wrote:

Is there any good resources on tile based games.. like how to construct 
the
game loop, keep it time based, update frames every 16ms or so while 
calling
your physics, collision detection, movement, and redrawing routines in 
that
time? I would love to develop some side scroller/top down tile based 
games
with sprites, and yet I can't seem to find a good place to start. I saw 
this
one google IO presentation, forget the guys name, that said on each
iteration you pass the time delta and always keep it time based (as 
opposed
to frame based I assume) and that while some basic puzzle games can get 
away
with using a canvas (GLSurfaceView??), most games would require open GL 
to
some extent. As well, I am interesting in knowing how to play background
music and yet still play multiple sound FX on time with no delay so that
when something collides, a sound plays at that exact moment, not a 1/2
second later. Is there any good resources on this? I don't need to make 
a
perfect game my first time out.. just something to play with. I am also
curious with regards to the 24MB ram limit per app, how you make larger
levels without any potential delay in the game play. As the game 
scrolls one
way or another (especially a top down with a large map), how do you 
avoid
the GC while loading in new tiles for the map? One thought I had was the
game goes online to get a map, storing it on the SD card, so as to avoid
using precious on-board user/app ram. I've read from various posts from 
some
of you about how you try to load everything in first, don't 

[android-developers] Re: Orientation Change effect on Spinner control

2010-01-27 Thread navlrac
Did anyone figure this out? I have the same issue.
Additionally, I have a spinner backed by a cursor and its not
guaranteed that the selected item is still in the database when
restoring. I've been thinking along the lines of scanning the cursor
to find the previous selected item, but haven't found a nice way to do
it yet.

On Dec 28 2009, 11:18 pm, Arif arifeq...@gmail.com wrote:
 I was trying the API Demos that come along with Android SDK v1.5
 If you select an item in a spinner widget and change the orientation
 of the phone twice the selection goes.

 I am having similar problem in my app, I just checked the Demo app and
 the behaviour appears to be same. When you change the orientation say
 from Portrait to Landscape the text you selected is there, do it once
 more and the first item in the list appears as selected option.

 Is it a bug or is it that we explicitly need to maintain state with a
 spinner control?

-- 
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: Calling activities inside the tabs and also to retain main tabs.

2010-01-27 Thread suda murali
Hi All,

Please suggest me how to overcome this problem?

Thanks,
Suda

On Tue, Jan 26, 2010 at 10:26 AM, suda murali murali.s...@gmail.com wrote:
 Hi All,

 Can anyone suggest me how to call activities inside the tabs.
 I have implemented four tabs(one,two,three,four). In tab one i am
 having button, when onclick will call another activity, which will
 also has another button and so on . I want to retain the main tabs and
 tab one should be selected. Similar case with tabs two, three
 and four
 I was able to call the activities retaining the tabs. But when i click
 emulator back button i am not able to restore the previous activity.
llowing the code i have used for calling activities:

 public class SpinnerClass1 extends ActivityGroup{
  /** Called when the activity is first created. */
         LocalActivityManager m;
   �...@override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        m= getLocalActivityManager();
        setContentView(R.layout.main);

        Button next = (Button) findViewById
 (com.enlume.R.id.ButtonTabTest);
        next.setOnClickListener(new View.OnClickListener(){
                public void onClick(View view) {
                                Intent intent = new Intent(SpinnerClass1.this,
 ActivityTabStateRetain1.class);
                                Window window = m.startActivity(favourite 
 shop,intent);
                                setContentView(window.getDecorView());
                                
 overridePendingTransition(com.enlume.R.layout.fade,
 com.enlume.R.layout.hold);
                }
        });

    }

 }


 Please suggest me in the right direction.


 Thanks in Advance,
 Suda.





-- 
suda

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


Re: [android-developers] Re: urgent help Integrating code with Android home screen code.

2010-01-27 Thread Rogério de Souza Moraes
Hi satish,

What Darshana means is that you need to put you aplication inside the source
code of Android. You need to donwload the source code of Android and put
your application inside it. The file that he told you is the file:

android_source_code_root/build/target/product/generic.mk

inside this file, are the sources of the applications that are compiled with
the code of Android.

Regards,

Rogerio

2010/1/27 satish bhoyar getsatonl...@gmail.com

 Hi darshana,
 thanks for the reply.
 I am still stuck.
 can u guide me where i can find this file?
 do u mean it is Android.mk or anything else?

 Thanks,
 satish

 On Fri, Jan 22, 2010 at 9:47 PM, deeMurthy darshana.mur...@wipro.comwrote:

 Hi Satish,

   If m not wrong, you are playing around with cupcake/donut or eclair
 code directly. In that case you will have to build your app into the
 system for your homescreen code to recognise it. Include your
 application into the generic.mk and rebuild the code. This should
 work.

 Cheers!

 On Jan 22, 2:00 pm, satish bhoyar getsatonl...@gmail.com wrote:
  Hi all,
 
  I am trying to integrate my code to the android Home Screen code.
  I want to launch my activity frm the HomeScreen by click of a button.
  I Did the code  then build it but when i click the button i m getting
 error
  as
  Application not installed on phone.
 
  please help
 
  Thanks,
  satish

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


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


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

Re: [android-developers] Re: urgent help Integrating code with Android home screen code.

2010-01-27 Thread satish bhoyar
Thanks..
I will look in to it..

thanks,
satish

2010/1/27 Rogério de Souza Moraes rogerio.so...@gmail.com

 Hi satish,

 What Darshana means is that you need to put you aplication inside the
 source code of Android. You need to donwload the source code of Android and
 put your application inside it. The file that he told you is the file:

 android_source_code_root/build/target/product/generic.mk

 inside this file, are the sources of the applications that are compiled
 with the code of Android.

 Regards,

 Rogerio

 2010/1/27 satish bhoyar getsatonl...@gmail.com

 Hi darshana,
 thanks for the reply.
 I am still stuck.
 can u guide me where i can find this file?
 do u mean it is Android.mk or anything else?

 Thanks,
 satish

 On Fri, Jan 22, 2010 at 9:47 PM, deeMurthy darshana.mur...@wipro.comwrote:

 Hi Satish,

   If m not wrong, you are playing around with cupcake/donut or eclair
 code directly. In that case you will have to build your app into the
 system for your homescreen code to recognise it. Include your
 application into the generic.mk and rebuild the code. This should
 work.

 Cheers!

 On Jan 22, 2:00 pm, satish bhoyar getsatonl...@gmail.com wrote:
  Hi all,
 
  I am trying to integrate my code to the android Home Screen code.
  I want to launch my activity frm the HomeScreen by click of a button.
  I Did the code  then build it but when i click the button i m getting
 error
  as
  Application not installed on phone.
 
  please help
 
  Thanks,
  satish

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


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


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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] android milestone text size small

2010-01-27 Thread extrapedestrian
My application works fine on G1/Hero and emulators, but on Milestone
text size is tiny. I have list box and text items are very small on
Milestone device. What can be the cause of 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


Re: [android-developers] Re: urgent help Integrating code with Android home screen code.

2010-01-27 Thread satish bhoyar
Hi,
in the file generic.mk there are all the separate application are there. but
i want my files to be part of the android code.

Cant it be possible that i will just add my file in the directory where the
launcher code for android sits , i will add just files
(xml  java),  then as we call our activity in the normal program i will
call my activity from home screen?

thanks,
satish

2010/1/27 Rogério de Souza Moraes rogerio.so...@gmail.com

 Hi satish,

 What Darshana means is that you need to put you aplication inside the
 source code of Android. You need to donwload the source code of Android and
 put your application inside it. The file that he told you is the file:

 android_source_code_root/build/target/product/generic.mk

 inside this file, are the sources of the applications that are compiled
 with the code of Android.

 Regards,

 Rogerio

 2010/1/27 satish bhoyar getsatonl...@gmail.com

 Hi darshana,
 thanks for the reply.
 I am still stuck.
 can u guide me where i can find this file?
 do u mean it is Android.mk or anything else?

 Thanks,
 satish

 On Fri, Jan 22, 2010 at 9:47 PM, deeMurthy darshana.mur...@wipro.comwrote:

 Hi Satish,

   If m not wrong, you are playing around with cupcake/donut or eclair
 code directly. In that case you will have to build your app into the
 system for your homescreen code to recognise it. Include your
 application into the generic.mk and rebuild the code. This should
 work.

 Cheers!

 On Jan 22, 2:00 pm, satish bhoyar getsatonl...@gmail.com wrote:
  Hi all,
 
  I am trying to integrate my code to the android Home Screen code.
  I want to launch my activity frm the HomeScreen by click of a button.
  I Did the code  then build it but when i click the button i m getting
 error
  as
  Application not installed on phone.
 
  please help
 
  Thanks,
  satish

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


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


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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: What keycode is the HTC Hero 'Hide Keyboard' button?

2010-01-27 Thread jamesc
Sorry, yes, Mark is quite right; it's the soft key on the IME.
Thanks.

On Jan 27, 1:55 am, Dianne Hackborn hack...@android.com wrote:
 On Mon, Jan 25, 2010 at 10:15 AM, Mark Murphy mmur...@commonsware.comwrote:

  The HTC Hero does not have a Hide Keyboard hardware button. I am
  assuming the OP is referring to the button in the lower-left of the Hero
  IME, which hides the keyboard.

 Oh if that's the case, it is entirely internal to the IME and nothing you
 can catch.

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


Re: [android-developers] android milestone text size small

2010-01-27 Thread Matt Oakes
It might be something to do with the display density. Maybe you have
defined the size of the text in px (absolute pixels) which on a device
with a higher density makes the text smaller. You could try changing
to a density independent unit to see if that helps.

Matt

On Wed, Jan 27, 2010 at 11:02 AM, extrapedestrian
extra.pedestr...@gmail.com wrote:
 My application works fine on G1/Hero and emulators, but on Milestone
 text size is tiny. I have list box and text items are very small on
 Milestone device. What can be the cause of 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


-- 
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 milestone text size small

2010-01-27 Thread extrapedestrian
I defined it in pt. It should be bound to size of inch.

On Jan 27, 12:13 pm, Matt Oakes m...@matto1990.com wrote:
 It might be something to do with the display density. Maybe you have
 defined the size of the text in px (absolute pixels) which on a device
 with a higher density makes the text smaller. You could try changing
 to a density independent unit to see if that helps.

 Matt

 On Wed, Jan 27, 2010 at 11:02 AM, extrapedestrian

 extra.pedestr...@gmail.com wrote:
  My application works fine on G1/Hero and emulators, but on Milestone
  text size is tiny. I have list box and text items are very small on
  Milestone device. What can be the cause of 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



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


Re: [android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Ralf Schneider
I definitely have this problem on the Nexus One.

My OpenGL performance test (using JNI/NDK pumped by java GLSurfaceView) is
drawing 3 rotating Quads(8-8-8 texture) - all covering the whole screen -
with blending.
And I get very constant 60 FPS. As soon as I touch the screen: Frame rate
drops to 43 FPS until i release the finger, than it gets back to 60 FPS.

I think the garbage collection is the remaining reason for the slow down on
Android  2.0.

The problem is less visible in a more complex scene where the initial frame
rate is around 35 FPS. Touching the screen in this case does not change the
frame rate significantly.


2010/1/27 Robert Green rbgrn@gmail.com

 @MrChaz
 From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
 to adequately fixing the problem.  I have tried ranges from 16-1000
 and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
 or lower on the G1.  *The game suffers no such problems on the Droid
 and Nexus One*.  I've also taken out everything but the call to sleep


-- 
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] Regarding ContactsContract

2010-01-27 Thread Android Development
Hello,

I wanted to inquire about the ContactsContract API family.

I have one requirement:

1. I wish to store the Presence Status of the user which i receive over a
custom protocol.

I wish to re-use these APIs for this purpose:
http://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates.html
and
http://d.android.com/reference/android/provider/ContactsContract.StatusColumns.html

Will i be able to see the updated presence status for a given user when i
launch the contacts application in android after updating the user's status?
Or will I need to write my own GUI to display it?

Best Regards
Indodroid.

-- 
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: Crop a Picture after Using Camera to Take It

2010-01-27 Thread GDroid
Hi,

I'm testing this code on Motorola Milestone (2.0).
And I get an exception when trying to launch the Cropper:

01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by:
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.android.camera/com.android.camera.CropImage}; have
you declared this activity in your AndroidManifest.xml?

When trying the same intent without the setClassName call I get this
error:

01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
tmp_contact_1264594532122.jpg (has extras) }

Anyone?

Also, there is no Constant for the Crop image intent. Can anyone from
the Google/Android Framework team explain?
It seems like it is there to be used but someone forgot to create the
constant.

Thanks


On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote:
 Hi all,

 After doing some reading, I realized it can't be done so simply. My
 modded Contacts source is athttp://github.com/Wysie, you can take a
 look if you're interested. Also, here's what I did to get it working:

     private void doTakePhotoAction() {
         //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
         
 //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-...
         //http://www.damonkohler.com/2009/02/android-recipes.html
         //http://www.firstclown.us/tag/android/
         // The one I used to get everything 
 working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

         Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

         //Wysie_Soh: Create path for temp file
         mImageCaptureUri = Uri.fromFile(new File
 (Environment.getExternalStorageDirectory(),
                             tmp_contact_ + String.valueOf
 (System.currentTimeMillis()) + .jpg));

         intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
 mImageCaptureUri);

         try {
             intent.putExtra(return-data, true);
             startActivityForResult(intent, PICK_FROM_CAMERA);
         } catch (ActivityNotFoundException e) {
             //Do nothing for now
         }
     }

     protected void onActivityResult(int requestCode, int resultCode,
 Intent data) {
         if (resultCode != RESULT_OK) {
             return;
         }

         switch (requestCode) {

         case CROP_FROM_CAMERA: {
             //Wysie_Soh: After a picture is taken, it will go to
 PICK_FROM_CAMERA, which will then come here
             //after the image is cropped.

             final Bundle extras = data.getExtras();

             if (extras != null) {
                 Bitmap photo = extras.getParcelable(data);

                 mPhoto = photo;
                 mPhotoChanged = true;
                 mPhotoImageView.setImageBitmap(photo);
                 setPhotoPresent(true);
             }

             //Wysie_Soh: Delete the temporary
 file
             File f = new File(mImageCaptureUri.getPath());
             if (f.exists()) {
                 f.delete();
             }

             InputMethodManager mgr = (InputMethodManager)
 getSystemService(Context.INPUT_METHOD_SERVICE);
             mgr.showSoftInput(mPhotoImageView,
 InputMethodManager.SHOW_IMPLICIT);

             break;
         }

         case PICK_FROM_CAMERA: {
             //Wysie_Soh: After an image is taken and saved to the
 location of mImageCaptureUri, come here
             //and load thecropeditor, with the necessary parameters
 (96x96, 1:1 ratio)

             Intent intent = new Intent
 (com.android.camera.action.CROP);
             intent.setClassName(com.android.camera,
 com.android.camera.CropImage);

             intent.setData(mImageCaptureUri);
             intent.putExtra(outputX, 96);
             intent.putExtra(outputY, 96);
             intent.putExtra(aspectX, 1);
             intent.putExtra(aspectY, 1);
             intent.putExtra(scale, true);
             intent.putExtra(return-data, true);
             startActivityForResult(intent, CROP_FROM_CAMERA);

             break;

         }
         }
     }

 Hope it helps :)

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


Re: [android-developers] Re: Using webservice through Android

2010-01-27 Thread Frank Weiss
If I'm not mistaken, there are many resources you can search for on the web
via google (as Sudeep suggested) that provide examples of SOAP clients
written in Java. Please learn some basics before asking such a broad
question on a forum that is specifically for Android development.

-- 
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: Picking up a PhoneBook entry under Android 2.0 !!!

2010-01-27 Thread Mike Olson
I know this is a bit of an old thread, but I implemented the
workaround above to get my 1.5 emulator to launch and now my code
crashes when I try to run it in the 1.5 emulator. The error is an
InvocationTargetException with a cause of VerifyError. I'm currently
searching for answers on the web but I'm not finding anything. Any
ideas?

-- 
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: OpenGL Fillrate Issues

2010-01-27 Thread Mario Zechner
@Ralf
that is very strange behaviour i wouldn't expect from a Nexus One. I
have to admit that i only own a Droid so i can't confirm it for the
N1. Would you mind putting an apk with your test application up
somewhere, for example at http://www.file-pasta.com, and add log cat
output so we can observe the behaviour of your app on our devices?
Additionally, if it's not to much of a hazzle you could also share the
source code so we can have a look at it.

On 27 Jan., 12:42, Ralf Schneider li...@gestaltgeber.com wrote:
 I definitely have this problem on the Nexus One.

 My OpenGL performance test (using JNI/NDK pumped by java GLSurfaceView) is
 drawing 3 rotating Quads(8-8-8 texture) - all covering the whole screen -
 with blending.
 And I get very constant 60 FPS. As soon as I touch the screen: Frame rate
 drops to 43 FPS until i release the finger, than it gets back to 60 FPS.

 I think the garbage collection is the remaining reason for the slow down on
 Android  2.0.

 The problem is less visible in a more complex scene where the initial frame
 rate is around 35 FPS. Touching the screen in this case does not change the
 frame rate significantly.

 2010/1/27 Robert Green rbgrn@gmail.com

  @MrChaz
  From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
  to adequately fixing the problem.  I have tried ranges from 16-1000
  and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
  or lower on the G1.  *The game suffers no such problems on the Droid
  and Nexus One*.  I've also taken out everything but the call to sleep

-- 
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] Data list for Autocompletion

2010-01-27 Thread Eden
I'm looking for how i can have an acess to a data list  for
autocompetion TextView ? or where could i find a word data list ?

For example the list of the HERO device or the way to have it, i see a
few apps which use Hero autocompletetextView.

Thanks for 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: Crop a Picture after Using Camera to Take It

2010-01-27 Thread zero
the activity is not present on all systems under that explicit package
name. try calling it with just the action, leaving out package and
classname in the intent

On Jan 27, 1:31 pm, GDroid baron...@gmail.com wrote:
 Hi,

 I'm testing this code on Motorola Milestone (2.0).
 And I get an exception when trying to launch the Cropper:

 01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by:
 android.content.ActivityNotFoundException: Unable to find explicit
 activity class {com.android.camera/com.android.camera.CropImage}; have
 you declared this activity in your AndroidManifest.xml?

 When trying the same intent without the setClassName call I get this
 error:

 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
 android.content.ActivityNotFoundException: No Activity found to handle
 Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
 tmp_contact_1264594532122.jpg (has extras) }

 Anyone?

 Also, there is no Constant for the Crop image intent. Can anyone from
 the Google/Android Framework team explain?
 It seems like it is there to be used but someone forgot to create the
 constant.

 Thanks

 On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote:

  Hi all,

  After doing some reading, I realized it can't be done so simply. My
  modded Contacts source is athttp://github.com/Wysie, you can take a
  look if you're interested. Also, here's what I did to get it working:

      private void doTakePhotoAction() {
          //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
          
  //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-...
          //http://www.damonkohler.com/2009/02/android-recipes.html
          //http://www.firstclown.us/tag/android/
          // The one I used to get everything 
  working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

          Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

          //Wysie_Soh: Create path for temp file
          mImageCaptureUri = Uri.fromFile(new File
  (Environment.getExternalStorageDirectory(),
                              tmp_contact_ + String.valueOf
  (System.currentTimeMillis()) + .jpg));

          intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
  mImageCaptureUri);

          try {
              intent.putExtra(return-data, true);
              startActivityForResult(intent, PICK_FROM_CAMERA);
          } catch (ActivityNotFoundException e) {
              //Do nothing for now
          }
      }

      protected void onActivityResult(int requestCode, int resultCode,
  Intent data) {
          if (resultCode != RESULT_OK) {
              return;
          }

          switch (requestCode) {

          case CROP_FROM_CAMERA: {
              //Wysie_Soh: After a picture is taken, it will go to
  PICK_FROM_CAMERA, which will then come here
              //after the image is cropped.

              final Bundle extras = data.getExtras();

              if (extras != null) {
                  Bitmap photo = extras.getParcelable(data);

                  mPhoto = photo;
                  mPhotoChanged = true;
                  mPhotoImageView.setImageBitmap(photo);
                  setPhotoPresent(true);
              }

              //Wysie_Soh: Delete the temporary
  file
              File f = new File(mImageCaptureUri.getPath());
              if (f.exists()) {
                  f.delete();
              }

              InputMethodManager mgr = (InputMethodManager)
  getSystemService(Context.INPUT_METHOD_SERVICE);
              mgr.showSoftInput(mPhotoImageView,
  InputMethodManager.SHOW_IMPLICIT);

              break;
          }

          case PICK_FROM_CAMERA: {
              //Wysie_Soh: After an image is taken and saved to the
  location of mImageCaptureUri, come here
              //and load thecropeditor, with the necessary parameters
  (96x96, 1:1 ratio)

              Intent intent = new Intent
  (com.android.camera.action.CROP);
              intent.setClassName(com.android.camera,
  com.android.camera.CropImage);

              intent.setData(mImageCaptureUri);
              intent.putExtra(outputX, 96);
              intent.putExtra(outputY, 96);
              intent.putExtra(aspectX, 1);
              intent.putExtra(aspectY, 1);
              intent.putExtra(scale, true);
              intent.putExtra(return-data, true);
              startActivityForResult(intent, CROP_FROM_CAMERA);

              break;

          }
          }
      }

  Hope it helps :)

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


Re: [android-developers] EditTexts and Handles

2010-01-27 Thread TreKing
On Tue, Jan 26, 2010 at 9:36 PM, Aaron Rudolph aanrudol...@gmail.comwrote:

 How do I get
 the user-inputted data out of these EditText's after they have been
 created?


http://developer.android.com/intl/zh-CN/reference/android/widget/EditText.html#getText()
http://developer.android.com/intl/zh-CN/reference/android/widget/EditText.html#getText()
-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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: Picking up a PhoneBook entry under Android 2.0 !!!

2010-01-27 Thread Mike Olson
I figured it out from a combination of the info on these two pages:
http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/1/
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

I needed to write an abstract wrapper class that generates a concrete
class depending on the SDK version. Then I had to implement different
concrete classes for each set of code I needed and generate them on
the fly depending on the SDK version. Weird stuff!

PS. I know it's likely that the people on this thread knew that
already or didn't need to know it, but I'm posting this to help anyone
who may find this thread on Google.

On Jan 27, 8:17 am, Mike Olson mish.ol...@gmail.com wrote:
 I know this is a bit of an old thread, but I implemented the
 workaround above to get my 1.5 emulator to launch and now my code
 crashes when I try to run it in the 1.5 emulator. The error is an
 InvocationTargetException with a cause of VerifyError. I'm currently
 searching for answers on the web but I'm not finding anything. Any
 ideas?

-- 
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: OpenGL Fillrate Issues

2010-01-27 Thread Mario Zechner
I did some more testing and am now calculating mean delta times for
each second as well as the standard deviation of the delta times.
Here's what i get for the space racer above:

01-27 15:11:42.274: DEBUG/AFX(2504): fps: 56.82312, delta:
0.016143799, mean delta: 0.01756897, stddev. delta: 0.0026706476,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:43.274: DEBUG/AFX(2504): fps: 54.986576, delta:
0.016479492, mean delta: 0.018019613, stddev. delta: 0.0038374658,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:44.290: DEBUG/AFX(2504): fps: 50.92457, delta: 0.03729248,
mean delta: 0.019476827, stddev. delta: 0.0064565083, #listeners: 1,
#meshes: 35, #textures: 2
01-27 15:11:45.298: DEBUG/AFX(2504): fps: 53.9243, delta: 0.015136719,
mean delta: 0.019114176, stddev. delta: 0.00692833, #listeners: 1,
#meshes: 35, #textures: 2
01-27 15:11:46.306: DEBUG/AFX(2504): fps: 52.600296, delta:
0.012298585, mean delta: 0.018918864, stddev. delta: 0.0053105806,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:47.306: DEBUG/AFX(2504): fps: 52.914413, delta:
0.01171875, mean delta: 0.018682353, stddev. delta: 0.005447507,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:48.337: DEBUG/AFX(2504): fps: 51.17586, delta:
0.030395508, mean delta: 0.019417318, stddev. delta: 0.0067782626,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:49.337: DEBUG/AFX(2504): fps: 53.930874, delta:
0.031311035, mean delta: 0.019150289, stddev. delta: 0.0061283736,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:50.345: DEBUG/AFX(2504): fps: 54.986576, delta:
0.017272947, mean delta: 0.01829478, stddev. delta: 0.0044108317,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:51.360: DEBUG/AFX(2504): fps: 55.01943, delta:
0.026489256, mean delta: 0.018075053, stddev. delta: 0.0037128378,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:52.376: DEBUG/AFX(2504): fps: 55.93651, delta:
0.026336668, mean delta: 0.017899577, stddev. delta: 0.003501554,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:53.384: DEBUG/AFX(2504): fps: 56.657646, delta:
0.016845703, mean delta: 0.017754618, stddev. delta: 0.0029748674,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:54.384: DEBUG/AFX(2504): fps: 55.919792, delta:
0.016937256, mean delta: 0.017803447, stddev. delta: 0.002930975,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:55.391: DEBUG/AFX(2504): fps: 54.774338, delta:
0.016662598, mean delta: 0.018299866, stddev. delta: 0.0052955016,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:56.407: DEBUG/AFX(2504): fps: 51.882175, delta:
0.016479492, mean delta: 0.018996684, stddev. delta: 0.005628621,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:57.415: DEBUG/AFX(2504): fps: 55.93684, delta: 0.0223999,
mean delta: 0.018104045, stddev. delta: 0.0036228807, #listeners: 1,
#meshes: 35, #textures: 2
01-27 15:11:58.415: DEBUG/AFX(2504): fps: 51.946102, delta:
0.011444091, mean delta: 0.019133504, stddev. delta: 0.0067592976,
#listeners: 1, #meshes: 35, #textures: 2

The delta time varries between 3-6ms from frame to frame! That
explains the stuttering pretty well. Now i wonder why i get such
inconsistent delta times. I removed rendering the background tiles so
i only render the ship which is a lousy 50 triangles big, no textures
or lighting. Very strange indeed.

On 27 Jan., 14:23, Mario Zechner badlogicga...@gmail.com wrote:
 @Ralf
 that is very strange behaviour i wouldn't expect from a Nexus One. I
 have to admit that i only own a Droid so i can't confirm it for the
 N1. Would you mind putting an apk with your test application up
 somewhere, for example athttp://www.file-pasta.com, and add log cat
 output so we can observe the behaviour of your app on our devices?
 Additionally, if it's not to much of a hazzle you could also share the
 source code so we can have a look at it.

 On 27 Jan., 12:42, Ralf Schneider li...@gestaltgeber.com wrote:

  I definitely have this problem on the Nexus One.

  MyOpenGLperformance test (using JNI/NDK pumped by java GLSurfaceView) is
  drawing 3 rotating Quads(8-8-8 texture) - all covering the whole screen -
  with blending.
  And I get very constant 60 FPS. As soon as I touch the screen: Frame rate
  drops to 43 FPS until i release the finger, than it gets back to 60 FPS.

  I think the garbage collection is the remaining reason for the slow down on
  Android  2.0.

  The problem is less visible in a more complex scene where the initial frame
  rate is around 35 FPS. Touching the screen in this case does not change the
  frame rate significantly.

  2010/1/27 Robert Green rbgrn@gmail.com

   @MrChaz
   From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
   to adequately fixing the problem.  I have tried ranges from 16-1000
   and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
   or lower on the G1.  *The game suffers no such problems on the Droid
   and Nexus One*.  I've also taken out everything but the call to sleep

-- 
You 

Re: [android-developers] Re: How to set a default item in a spinner drop down list

2010-01-27 Thread Jiri

Is this any help?

http://thinkandroid.wordpress.com/2010/01/13/retrieving-spinner-values/?utm_source=feedburnerutm_medium=feedutm_campaign=Feed%3A+PlanetAndroidCom+%28Planet+Android%29

Jiri

Sasikumar S wrote:

See this link

http://www.androidpeople.com/android-spinner-default-value/

you will get the answer.

On Jan 26, 6:09 pm, MMC2 m...@mmc2.com.au wrote:

How can I use code to set a default item in a spinner drop down list




--
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 milestone text size small

2010-01-27 Thread Lance Nanek
Isn't there some sort of density calculation bug that results in small
text sizes on the Droid? Maybe you're running into the same thing on
the Milestone?

On Jan 27, 6:40 am, extrapedestrian extra.pedestr...@gmail.com
wrote:
 I defined it in pt. It should be bound to size of inch.

 On Jan 27, 12:13 pm, Matt Oakes m...@matto1990.com wrote:

  It might be something to do with the display density. Maybe you have
  defined the size of the text in px (absolute pixels) which on a device
  with a higher density makes the text smaller. You could try changing
  to a density independent unit to see if that helps.

  Matt

  On Wed, Jan 27, 2010 at 11:02 AM, extrapedestrian

  extra.pedestr...@gmail.com wrote:
   My application works fine on G1/Hero and emulators, but on Milestone
   text size is tiny. I have list box and text items are very small on
   Milestone device. What can be the cause of 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



-- 
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] Google vs Flurry

2010-01-27 Thread Joshua Frank
I want to start tracking usage of my apps. I need to decide on who to
use Google Mobile Analytics or Flurry. Does anyone have an opinion?

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


[android-developers] How to build library with my code?

2010-01-27 Thread bluestar
Hi, Sir:

I can build a daemon with my algorithm code and main function.
I put all files in one folder under /development and make
This executable file works successfully

Now I want to separate my algorithm code and main function code.
I hope to build a binary library with my algorithm code and
main function will link this binary library to use.

Where to put my algorithm code to create binary library and
how to link this binary library in main function code?

Thanks for your great help!


Best Regards,
Alan

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


Re: [android-developers] How to build library with my code?

2010-01-27 Thread Mark Murphy

 Hi, Sir:

 I can build a daemon with my algorithm code and main function.
 I put all files in one folder under /development and make
 This executable file works successfully

 Now I want to separate my algorithm code and main function code.
 I hope to build a binary library with my algorithm code and
 main function will link this binary library to use.

 Where to put my algorithm code to create binary library and
 how to link this binary library in main function code?

 Thanks for your great help!

I do this by creating a separate project for the library that builds a
JAR, then use that JAR in the main project. So long as the library does
not rely much upon resources, this technique works fairly well. You can
see many examples of this with my CommonsWare Android Components, which
are all set up using this model:

http://commonsware.com/cwac

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


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


[android-developers] Re: Crop a Picture after Using Camera to Take It

2010-01-27 Thread GDroid
That's what I did in the second try.
As I mentioned I commented out the the setClassName method and got
the second exception:

01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
tmp_contact_1264594532122.jpg (has extras) }

BTW - Thanks for the quick response.


On Jan 27, 4:03 pm, zero zeroo...@googlemail.com wrote:
 the activity is not present on all systems under that explicit package
 name. try calling it with just the action, leaving out package and
 classname in the intent

 On Jan 27, 1:31 pm, GDroid baron...@gmail.com wrote:

  Hi,

  I'm testing this code on Motorola Milestone (2.0).
  And I get an exception when trying to launch the Cropper:

  01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by:
  android.content.ActivityNotFoundException: Unable to find explicit
  activity class {com.android.camera/com.android.camera.CropImage}; have
  you declared this activity in your AndroidManifest.xml?

  When trying the same intent without the setClassName call I get this
  error:

  01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
  android.content.ActivityNotFoundException: No Activity found to handle
  Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
  tmp_contact_1264594532122.jpg (has extras) }

  Anyone?

  Also, there is no Constant for the Crop image intent. Can anyone from
  the Google/Android Framework team explain?
  It seems like it is there to be used but someone forgot to create the
  constant.

  Thanks

  On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote:

   Hi all,

   After doing some reading, I realized it can't be done so simply. My
   modded Contacts source is athttp://github.com/Wysie, you can take a
   look if you're interested. Also, here's what I did to get it working:

       private void doTakePhotoAction() {
           //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
           
   //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-...
           //http://www.damonkohler.com/2009/02/android-recipes.html
           //http://www.firstclown.us/tag/android/
           // The one I used to get everything 
   working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

           Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

           //Wysie_Soh: Create path for temp file
           mImageCaptureUri = Uri.fromFile(new File
   (Environment.getExternalStorageDirectory(),
                               tmp_contact_ + String.valueOf
   (System.currentTimeMillis()) + .jpg));

           intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
   mImageCaptureUri);

           try {
               intent.putExtra(return-data, true);
               startActivityForResult(intent, PICK_FROM_CAMERA);
           } catch (ActivityNotFoundException e) {
               //Do nothing for now
           }
       }

       protected void onActivityResult(int requestCode, int resultCode,
   Intent data) {
           if (resultCode != RESULT_OK) {
               return;
           }

           switch (requestCode) {

           case CROP_FROM_CAMERA: {
               //Wysie_Soh: After a picture is taken, it will go to
   PICK_FROM_CAMERA, which will then come here
               //after the image is cropped.

               final Bundle extras = data.getExtras();

               if (extras != null) {
                   Bitmap photo = extras.getParcelable(data);

                   mPhoto = photo;
                   mPhotoChanged = true;
                   mPhotoImageView.setImageBitmap(photo);
                   setPhotoPresent(true);
               }

               //Wysie_Soh: Delete the temporary
   file
               File f = new File(mImageCaptureUri.getPath());
               if (f.exists()) {
                   f.delete();
               }

               InputMethodManager mgr = (InputMethodManager)
   getSystemService(Context.INPUT_METHOD_SERVICE);
               mgr.showSoftInput(mPhotoImageView,
   InputMethodManager.SHOW_IMPLICIT);

               break;
           }

           case PICK_FROM_CAMERA: {
               //Wysie_Soh: After an image is taken and saved to the
   location of mImageCaptureUri, come here
               //and load thecropeditor, with the necessary parameters
   (96x96, 1:1 ratio)

               Intent intent = new Intent
   (com.android.camera.action.CROP);
               intent.setClassName(com.android.camera,
   com.android.camera.CropImage);

               intent.setData(mImageCaptureUri);
               intent.putExtra(outputX, 96);
               intent.putExtra(outputY, 96);
               intent.putExtra(aspectX, 1);
               intent.putExtra(aspectY, 1);
               intent.putExtra(scale, true);
               intent.putExtra(return-data, true);
               startActivityForResult(intent, 

[android-developers] Re: Crop a Picture after Using Camera to Take It

2010-01-27 Thread Streets Of Boston
... The name of the action looks good...

In my app, the image-Uri in the setData is different. You use a
'file:' uri. In my app, I use a 'content:' uri. Maybe the CROP action
cannot handle 'file:' uris and can only handle images that are
inserted into the Images content-provider.

On Jan 27, 9:57 am, GDroid baron...@gmail.com wrote:
 That's what I did in the second try.
 As I mentioned I commented out the the setClassName method and got
 the second exception:

 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
 android.content.ActivityNotFoundException: No Activity found to handle
 Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
 tmp_contact_1264594532122.jpg (has extras) }

 BTW - Thanks for the quick response.

 On Jan 27, 4:03 pm, zero zeroo...@googlemail.com wrote:



  the activity is not present on all systems under that explicit package
  name. try calling it with just the action, leaving out package and
  classname in the intent

  On Jan 27, 1:31 pm, GDroid baron...@gmail.com wrote:

   Hi,

   I'm testing this code on Motorola Milestone (2.0).
   And I get an exception when trying to launch the Cropper:

   01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by:
   android.content.ActivityNotFoundException: Unable to find explicit
   activity class {com.android.camera/com.android.camera.CropImage}; have
   you declared this activity in your AndroidManifest.xml?

   When trying the same intent without the setClassName call I get this
   error:

   01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
   android.content.ActivityNotFoundException: No Activity found to handle
   Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
   tmp_contact_1264594532122.jpg (has extras) }

   Anyone?

   Also, there is no Constant for the Crop image intent. Can anyone from
   the Google/Android Framework team explain?
   It seems like it is there to be used but someone forgot to create the
   constant.

   Thanks

   On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote:

Hi all,

After doing some reading, I realized it can't be done so simply. My
modded Contacts source is athttp://github.com/Wysie, you can take a
look if you're interested. Also, here's what I did to get it working:

    private void doTakePhotoAction() {
        //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
        
//http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-...
        //http://www.damonkohler.com/2009/02/android-recipes.html
        //http://www.firstclown.us/tag/android/
        // The one I used to get everything 
working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

        //Wysie_Soh: Create path for temp file
        mImageCaptureUri = Uri.fromFile(new File
(Environment.getExternalStorageDirectory(),
                            tmp_contact_ + String.valueOf
(System.currentTimeMillis()) + .jpg));

        intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
mImageCaptureUri);

        try {
            intent.putExtra(return-data, true);
            startActivityForResult(intent, PICK_FROM_CAMERA);
        } catch (ActivityNotFoundException e) {
            //Do nothing for now
        }
    }

    protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
        if (resultCode != RESULT_OK) {
            return;
        }

        switch (requestCode) {

        case CROP_FROM_CAMERA: {
            //Wysie_Soh: After a picture is taken, it will go to
PICK_FROM_CAMERA, which will then come here
            //after the image is cropped.

            final Bundle extras = data.getExtras();

            if (extras != null) {
                Bitmap photo = extras.getParcelable(data);

                mPhoto = photo;
                mPhotoChanged = true;
                mPhotoImageView.setImageBitmap(photo);
                setPhotoPresent(true);
            }

            //Wysie_Soh: Delete the temporary
file
            File f = new File(mImageCaptureUri.getPath());
            if (f.exists()) {
                f.delete();
            }

            InputMethodManager mgr = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
            mgr.showSoftInput(mPhotoImageView,
InputMethodManager.SHOW_IMPLICIT);

            break;
        }

        case PICK_FROM_CAMERA: {
            //Wysie_Soh: After an image is taken and saved to the
location of mImageCaptureUri, come here
            //and load thecropeditor, with the necessary parameters
(96x96, 1:1 ratio)

            Intent intent = new Intent
(com.android.camera.action.CROP);
            

[android-developers] Re: US Taxes: Does Google send a 1099 tax form?

2010-01-27 Thread Streets Of Boston
About reporting a loss at tax time: You can't if you only make a few
hundred bucks or so. It's considered a hobby and you cannot deduct
more than your income on that hobby. E.g. i have a photography hobby
as well. It would be nice to deduct all the costs of my camera and
lenses if i just would sell one picture :-). But the IRS don't swing
that way :)


If it's your principal income than the story becomes much different.


On Jan 27, 12:37 am, Nathan nathan.d.mel...@gmail.com wrote:
 On Jan 26, 3:46 pm, Kevin Duffey andjar...@gmail.com wrote:

  I don't want to sound
  like I am going to cheat the system and not pay taxes..

 Well, that is what you sound like.

  The point is, and I know this is at
  the discretion of each developer, but if I only make a few hundred bucks
  over the course of a year, it hardly seems like it's worth while for the IRS
  to even follow up on..

 It probably is worth it to you to track your expenses that went into
 making those few hundred bucks. You'll probably come out ahead and
 report a loss at tax time.

 if I ever get around
  to an app that makes money tho, is it any different than if I were making
  tips as a bartender?

 Yes. Consult your tax advisor, they are not on the same line.

 might just ignore the tax thing altogether if there is no way for them to be 
 caught.

 The IRS can find everything if they do an audit, which you can be
 chosen for randomly.

 Nathan

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


Re: [android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Ralf Schneider
2010/1/27 Mario Zechner badlogicga...@gmail.com

 @Ralf
 that is very strange behaviour i wouldn't expect from a Nexus One. I
 have to admit that i only own a Droid so i can't confirm it for the
 N1. Would you mind putting an apk with your test application up
 somewhere, for example at http://www.file-pasta.com, and add log cat
 output so we can observe the behaviour of your app on our devices?
 Additionally, if it's not to much of a hazzle you could also share the
 source code so we can have a look at it.


Sorry, unfortunately I can not upload a test app at this point.

I just checked it again:

   - The 60 FPS I reported for 3 textured full screen quads was to high. It
   is more around 40 FPS (if not touching the screen).
   It goes down to 35 FPS as long as I touch the screen.
   - The 60 FPS I reported was from a simple colored triangle. During
   touching the screen it is ca. 48 FPS.

Sorry, for the wrong numbers in my previous post.

There is a very simple test you can perform by yourself:

   - On every frame [*public void onDrawFrame(GL10 gl) *] just do a glClear
   like:
   *gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);*
   - Measure FPS
   - Touch the screen
   - Measure FPS

This simple test on the N1 shows a frame rate drop while touching the
screen:

01-27 16:01:20.920: DEBUG/GGTest(21690): FPS: 60.92
01-27 16:01:21.920: DEBUG/GGTest(21690): FPS: 60.73
01-27 16:01:22.921: DEBUG/GGTest(21690): FPS: 60.83
01-27 16:01:23.930: DEBUG/GGTest(21690): FPS: 60.65
01-27 16:01:24.951: DEBUG/GGTest(21690): FPS: 43.25 # Touch Screen
01-27 16:01:25.960: DEBUG/GGTest(21690): FPS: 48.48
01-27 16:01:26.960: DEBUG/GGTest(21690): FPS: 53.60
01-27 16:01:27.980: DEBUG/GGTest(21690): FPS: 49.22
01-27 16:01:28.980: DEBUG/GGTest(21690): FPS: 46.83
01-27 16:01:29.991: DEBUG/GGTest(21690): FPS: 44.65
01-27 16:01:30.991: DEBUG/GGTest(21690): FPS: 52.82
01-27 16:01:32.000: DEBUG/GGTest(21690): FPS: 60.89 # Release Finger
01-27 16:01:33.000: DEBUG/GGTest(21690): FPS: 60.64
01-27 16:01:34.010: DEBUG/GGTest(21690): FPS: 60.71
01-27 16:01:35.011: DEBUG/GGTest(21690): FPS: 60.70
01-27 16:01:36.020: DEBUG/GGTest(21690): FPS: 60.73

..Btw: I tried a:

event.recycle();
try {
Thread.sleep(18);
} catch (InterruptedException e) {
}

... this helps nothing on the N1. So, (in this case) the problem might not
be a garbage collection issue. May be the the whole input flow is just to
bloated with to many abstraction layers.

-- 
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] Reposition views att runtime

2010-01-27 Thread ls02
How do I reposition views at runtime? In activity onCreate when all
views are set all views sizes are 0. If I could somehow subclass
activity view loaded from resources I could probably override view's
onFinishInflate() and reposition all views after they all have been
set and inflated.

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


Re: [android-developers] Reposition views att runtime

2010-01-27 Thread Mark Murphy
 How do I reposition views at runtime?

The same way you position them in the first place -- by manipulating their
layout rules (e.g., android:layout_centerInParent). You do this via
calling getLayoutParams() on your View, casting it to an appropriate type
(e.g., RelativeLayout.LayoutParams), making the desired changes, and
calling setLayoutParams() to affect those changes.

Note that I haven't done this in quite some time, so the above recipe is
from memory and may be a bit off, though I'm pretty sure it is mostly
correct.

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


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


Re: [android-developers] Reposition views att runtime

2010-01-27 Thread TreKing
You're trying to reposition your view right after inflating them ... ?
Why not just set them up in XML the way you actually want them to begin with
...?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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] What About Oversize Apps?

2010-01-27 Thread ian
My almost compled app has a couple of hundred images and tips the
scales at a (bloated) 11 mb.

But I'd rather leave it that size. So I'm trying to figure out what
this would mean to a user.

Could the app still be installed OK if their phone wasn't already
crowded with other large apps?  Will more memory likely become
available soon? Do the Droid and Nexus have more than the old HTC
phones?

Any opinions/insights would be appreciated.

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


Re: [android-developers] What About Oversize Apps?

2010-01-27 Thread Mark Murphy
 Could the app still be installed OK if their phone wasn't already
 crowded with other large apps?

Your application will take 22-44MB to install, depending on whether or not
you use the Android Market copy protection.

 Will more memory likely become
 available soon?

That is impossible to predict.

 Do the Droid and Nexus have more than the old HTC phones?

Yes, but still only around 200MB. My DROID clocks in at 240MB free with
some apps installed; my Nexus One has 175MB free with some apps installed.

You may wish to consider downloading your images on first run and storing
them on the SD card.

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


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


[android-developers] virtual hard key icon

2010-01-27 Thread PHdP
Hi,

Are the nexus virtual hard key icons (home, back, etc...) modifiable ?



Vicente

-- 
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: Crop a Picture after Using Camera to Take It

2010-01-27 Thread GDroid
I've tried testing it with the code from the 1st post.
Looks like:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString());
intent.putExtra(crop, true);
..
..


If i'm not wrong, this tells the Camera activity to call the crop
activity right after (I also looked at the sources).
It returns the same exception. Which is very odd. It means that the
Camera activity failed to launch the crop activity ?!

BTW - A simple test of trying to set an image to a contact in my
contact list works just fine (with croping).
According to the Android sources, the contacts application is doing
the same thing as me example.

So now I call to Motorola developers, what's your 5-cents?

Thanks



On Jan 27, 5:20 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 ... The name of the action looks good...

 In my app, the image-Uri in the setData is different. You use a
 'file:' uri. In my app, I use a 'content:' uri. Maybe the CROP action
 cannot handle 'file:' uris and can only handle images that are
 inserted into the Images content-provider.

 On Jan 27, 9:57 am, GDroid baron...@gmail.com wrote:

  That's what I did in the second try.
  As I mentioned I commented out the the setClassName method and got
  the second exception:

  01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
  android.content.ActivityNotFoundException: No Activity found to handle
  Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
  tmp_contact_1264594532122.jpg (has extras) }

  BTW - Thanks for the quick response.

  On Jan 27, 4:03 pm, zero zeroo...@googlemail.com wrote:

   the activity is not present on all systems under that explicit package
   name. try calling it with just the action, leaving out package and
   classname in the intent

   On Jan 27, 1:31 pm, GDroid baron...@gmail.com wrote:

Hi,

I'm testing this code on Motorola Milestone (2.0).
And I get an exception when trying to launch the Cropper:

01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by:
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.android.camera/com.android.camera.CropImage}; have
you declared this activity in your AndroidManifest.xml?

When trying the same intent without the setClassName call I get this
error:

01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by:
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=com.android.camera.action.CROP dat=file:///sdcard/
tmp_contact_1264594532122.jpg (has extras) }

Anyone?

Also, there is no Constant for the Crop image intent. Can anyone from
the Google/Android Framework team explain?
It seems like it is there to be used but someone forgot to create the
constant.

Thanks

On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote:

 Hi all,

 After doing some reading, I realized it can't be done so simply. My
 modded Contacts source is athttp://github.com/Wysie, you can take a
 look if you're interested. Also, here's what I did to get it working:

     private void doTakePhotoAction() {
         //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
         
 //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-...
         //http://www.damonkohler.com/2009/02/android-recipes.html
         //http://www.firstclown.us/tag/android/
         // The one I used to get everything 
 working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

         Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

         //Wysie_Soh: Create path for temp file
         mImageCaptureUri = Uri.fromFile(new File
 (Environment.getExternalStorageDirectory(),
                             tmp_contact_ + String.valueOf
 (System.currentTimeMillis()) + .jpg));

         intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
 mImageCaptureUri);

         try {
             intent.putExtra(return-data, true);
             startActivityForResult(intent, PICK_FROM_CAMERA);
         } catch (ActivityNotFoundException e) {
             //Do nothing for now
         }
     }

     protected void onActivityResult(int requestCode, int resultCode,
 Intent data) {
         if (resultCode != RESULT_OK) {
             return;
         }

         switch (requestCode) {

         case CROP_FROM_CAMERA: {
             //Wysie_Soh: After a picture is taken, it will go to
 PICK_FROM_CAMERA, which will then come here
             //after the image is cropped.

             final Bundle extras = data.getExtras();

             if (extras != null) {
                 Bitmap photo = extras.getParcelable(data);

                 mPhoto = photo;
                 

Re: [android-developers] What About Oversize Apps?

2010-01-27 Thread Greg Donald
On Wed, Jan 27, 2010 at 9:58 AM, Mark Murphy mmur...@commonsware.com wrote:
 Will more memory likely become
 available soon?

It's highly likely.

 That is impossible to predict.

Is it really?

Every new computer I've built or bought in the last 20 years had more
memory than it's predecessor.

Knowing the specs of my last several phones, I predict my next phone
will indeed have more ram than the one I have now.


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


Re: [android-developers] What About Oversize Apps?

2010-01-27 Thread TreKing
On Wed, Jan 27, 2010 at 9:49 AM, ian stilbit...@gmail.com wrote:

 My almost compled app has a couple of hundred images and tips the
 scales at a (bloated) 11 mb.

 But I'd rather leave it that size.


Why?


 So I'm trying to figure out what this would mean to a user.


For me, personally, this would mean that unless your app was the most
awesomest thing ever on my phone and completely indispensable, it would be
the first to go when I needed to clear space for something new. And I would
probably never re-install it knowing how much space it took up.

I'd second Mark's suggestion to cache to the SD what you need as you need
it. Will the user really need a couple of hundred images at any given
time?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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: trying to launch Android 2's Gallery .. security exception

2010-01-27 Thread DulcetTone
Understood.  I'm trying to invoke this class because it was
programmatically found to exist previously.


On Jan 23, 5:57 pm, dan raaka danra...@gmail.com wrote:
 on the tangential topic ..
 it is harmful to assume that the classname you are using will exist on ALL
 andorid devices.

 -Dan


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


Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread SoftwareForMe.com SoftwareForMe.com
Hi,

Sorry that I missed the continuation of this thread, and only noticed it now
as I got a Google Alert for our app name.

@Dianne, that's not quite true (that all MT data is lost). The coordinates
of the additional points are removed from the event data, but the size and
pressure values change predictably as additional fingers are added.

We have been swamped with work on our products and have not published the
solution. But, in a nut shell, our solution is a simulated multi-touch
that lets you zoom easily using either pinch/stretch or paw gestures. If
you're curious how well it works, download PhoneMyPC or Imagine Multi-touch
and give it a try.

Here's how it works:

* When an additional finger touches the screen, the size and pressure
([MotionEvent].getSize() and [MotionEvent].getPressure()) change in fairly
predictable ways.
* When that change is detected, track the one point (x,y) that you get to
determine whether it's moving towards, or away from the center of screen.
* If it's moving towards, zoom in. If it's moving away, zoom out.

Some things to consider are:

1) HTC devices work best when both pressure and size are used
2) On Samsung devices, size is always zero, but pressure changes predictably
3) The Motorola Cliq is the only phone we've found on which this will not
work. Both size and pressure are constant.

Both values can be a bit neurotic and require some denouncing, but if you
try the software, you'll see this method works well enough to give a good
user experience.

And, in the interest of time, here are some more details copied from an
email I recently sent someone who asked about this:


First, we no longer override onTouchEvent because it's simpler to provide
support for all API versions using view.setOnTouchListener(...). We use one
OnTouchListener implementer for pre-2.0 devices, and a different one for
2.0+ devices. Determine this with (Integer.parseInt(
android.os.Build.VERSION.SDK )). This value is 4 for 2.0+ devices.

Next, in our implementation for  2.0 devices, we grab three important
values:

float size = event.getSize();
float pressure = event.getPressure();
float total = size * pressure;

We use the total to help us detect the device type.

In our code for handling events when the action is MotionEvent.ACTION_MOVE,
we're always watching to see if the values indicate we should switch to zoom
mode (an extra finger down). Note, we never worry about this when action is
ACTION_DOWN, because you just can't get two fingers on the screen at the
same time, and even if you could, we'd pick it up int he fist ACTION_MOVE.
We check as follows:

if( (total  .1f) || (size == 0f  pressure  .15f ) ) { ...

The first subexpression indicates a non-Samsung device, and that a second
finger is down. The second subexpression is for Samsung, where size is
always 0, and pressure will drop below .15 when a second finger goes down.

Note, there is something wrong with this approach because we've now got two
reports (out of many thousand users) that they are unable to pan. One is
using a G1 (this MUST be a strange device calibration issue, because I
personally have ran this code on MANY G1's); one is a Cliq. Ironically now
that we've added support for Samsung, they are the only users with zero
reports of issues (and of course Droid and Nexus One users don't count
because they are using different code that supports true multi-touch).


Warm regards,
Scott
SoftwareForMe.com

On Thu, Jan 7, 2010 at 10:49 AM, theSmith chris.smith...@gmail.com wrote:

 Scott,

 Please publish your code, I would love to take a look at it :-)

 -theSmith

 On Jan 7, 12:48 pm, Dan Sherman impact...@gmail.com wrote:
  I'd love to see this as well :)
 
  On Thu, Jan 7, 2010 at 9:30 AM, Dianne Hackborn hack...@android.com
 wrote:
   Well I would really like to see this, given that prior to 2.0 there was
 no
   multitouch information propagated through the framework at all, and
   applications do not have permission to open the raw driver.
 
   On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com 
   softwareforme@gmail.com wrote:
 
   Our solution is software only, works on production phones (i.e., no
   rooting or modding required).
 
   Scott
   SoftwareForMe.com
   Makers of PhoneMyPC
 
On Thu, Nov 12, 2009 at 11:02 PM, Nathan nathan.d.mel...@gmail.com
 wrote:
 
   I'm curious about this. Does multi-touch require hardware changes? Or
   am I reading this right that it can all be done through software?
 
   Nathan
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this 

[android-developers] Re: uses-library

2010-01-27 Thread DulcetTone
Many thanks.

tone

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


Re: [android-developers] Re: trying to launch Android 2's Gallery .. security exception

2010-01-27 Thread Mark Murphy

 Understood.  I'm trying to invoke this class because it was
 programmatically found to exist previously.

I seem to recall a related case (trying to launch a video into Gallery)
being asked a month or so ago on this list. The upshot was that just
because an activity exists does not mean you can launch it directly using
the component name anymore.

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


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


[android-developers] Re: How to select an item in a listview by code

2010-01-27 Thread Casper
I agree with the below statement. I am experienced mobile app
developer in BREW, J2ME. But Android documentation when compared with
them is so bad. Doesn't help developers much. Much of it is being
learned from forums, Example apps provided by others and by trail and
error.



The Android
documentation  seems to be written as a reference source for people
who
already understand it. Seeing links being given to the Android
documentation
as an 'answer' to forum questions, is frustrating and annoying. People
are
asking for help and examples. The existence of, and size of the
forums, is
testament to the Android documentation not giving us developers what
we
need. Much of my programming time and efforts seems to be in
developing ad
hoc workarounds, to situations that prevent me from achieving the
standard
of user interface that I require.


On Jan 27, 12:11 am, Michael J McLean m...@mmc2.com.au wrote:
 Mark,
                 Thank you for taking the time to reply. There are a lot of
 restrictions placed on developers trying to provide a quality user
 interface. I can live with this particular restriction but I would
 appreciate help on one other issue. If I use the navigation buttons to
 highlight and select an item in my listview, and then press MENU, the first
 menu item is highlighted, where if I hadn't previously navigated to one of
 the items on my list view, and press MENU, the menu item would not be
 highlighted.. I would like to prevent this from happening for the sake of
 consistency.

                 I wonder why the programmer doesn't just simply have the
 ability to highlight or de-highlight an item with one command. But then I
 also wonder why the programmer cannot simply call or hide the virtual
 keyboard with one command each. Getting rid of the virtual keyboard proved
 to be a messy affair with unwanted side effects. Even now, when doing a text
 entry, I find that if I hold down some characters, such as e, g, and r,
 unwanted options appear on the screen. I would really appreciate help on
 getting rid of that. I have purchsed two books including yours, enrolled in
 a University course ( to withdraw after 3 weeks when I realised their lack
 of their ability to help), and yet I find most knowledge comes from trial
 and error, constantly reinventing the wheel, and the occasional tip from the
 forums, if your lucky. I would love to know where I can find systematic
 introductions and explanations for these basic Android features. The Android
 documentation  seems to be written as a reference source for people who
 already understand it. Seeing links being given to the Android documentation
 as an 'answer' to forum questions, is frustrating and annoying. People are
 asking for help and examples. The existence of, and size of the forums, is
 testament to the Android documentation not giving us developers what we
 need. Much of my programming time and efforts seems to be in developing ad
 hoc workarounds, to situations that prevent me from achieving the standard
 of user interface that I require.

             Two features that led me to invest most of last year into
 learning Android, were 1) the fact that it was claimed that you didn't even
 need a handset. If it worked on the emulator you could rely that it would
 work on the phone, and 2) the App store. Both of these advantages are
 seriously eroded by the fragmentation of Android. And it doesn't help to
 read of Android engineers expressing their anger in forum replies to
 reference being made to the fragmentation issues.

             All of the above strengthens the case for me to not merely 
 rethink your user interface to avoid the question  as advised by you, but
 to rethink the ultimate question of does Android offer enough to developers
 to be worthwhile.
 I hope that you are able to take these criticisms as being offered
 constuctively.

 Michael McLean

                 Also when entering text into a EditText- Original Message 
 -
 From: Mark Murphy mmur...@commonsware.com
 To: android-developers@googlegroups.com
 Sent: Wednesday, January 27, 2010 12:11 AM
 Subject: Re: [android-developers] How to select an item in a listview by
 code

  Michael J McLean wrote:
  Thank you for that,  but how can I show that the item has been selected?

  You rethink your user interface to avoid the question. Do not use
  ListView with a selection mindset. Think of ListView as being more
  akin to a rolling roster of buttons, not something that has a persistent
  selection.

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

  Android Training in US: 22-26 February 2010:http://onlc.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
 

[android-developers] Re: How can I enable assert statement on Android?

2010-01-27 Thread Brion Emde
Did you look at that link? That is the class that let's you do
assertions. If you try:

Assert.assertEquals(yes, no); // you will get an assertion failed
exception
Assert.assertTrue(1 == 2); // you will get an assertion failed
exception

Assert.assertTrue(1 == 1); // you will not get an exception


On Jan 26, 8:34 pm, EricWang whaom...@gmail.com wrote:
 so, you mean Android does not support assert currently?

 On Jan 27, 11:21 am, Brion Emde brione2...@gmail.com wrote:



  Take a look at theAssertclass, 
  here:http://developer.android.com/intl/de/reference/junit/framework/Assert...

  On Jan 26, 8:11 pm, EricWang whaom...@gmail.com wrote:

   How can I enableassertstatement on Android?
   I have referred to a 
   url:http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=d...
   and done what it said: adb shell setprop dalvik.vm.enableassertions
   all
   but nothing happen!
   The test code is:
       Log.v(assert1,1);
      assertfalse;
       Log.v(assert2,2);
   No matter what I did, assert2 will be printed, which means assert
   false does nothing!
   What should I do?
   BTW, I use eclipse as IDE.

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


Re: [android-developers] Re: Guide Me Right Way

2010-01-27 Thread Kevin Duffey
I'd hold off on a Kindle until you check out the Android readers coming out.
I am sure apple will be releasing their table info sometime today.. but I
suspect that one will be pricey. There will probably be netbook with
twistable screens to make them tablets.. or complete tablets, with Android
on them, for a lot less. That is what I am waiting for.

On Wed, Jan 27, 2010 at 1:32 AM, Anthoni anthoni.gard...@gmail.com wrote:

 Hi Kevin,

 Thanks for your input.
 That kinda puts the kibosch on the whole idea as I have major problems
 with my eyes anyway (losing them completely, but slowly).
 So it is back to being awkwardly sat up in bed with the laptop, or
 fork out quite a bit for a flexible e-book reader like the Kindle :)

 On Jan 26, 11:55 pm, Kevin Duffey andjar...@gmail.com wrote:
  I thought the same thing Anthoni.. I tried a PDF viewer for my moto
 droid.
  Don't like it so much. It's much harder to work with than on a laptop
  screen. It's much smaller of course, and you end up with a lot less
  realestate, so you continually have to scroll left/right. I suppose you
 can
  zoom out more, but then it's too small for my older eyes to read.
 
  On Tue, Jan 26, 2010 at 3:03 PM, Anthoni anthoni.gard...@gmail.com
 wrote:
   Hi all,
 
   Kinda a bit off topic, but I am looking into getting the HTC Hero as
   my mobile (don't currently have an android phone yet). What I wanted
   to know is what are these new Android phones like for viewing PDF
   files? Are they pretty clear etc.
 
   I was looking into getting a Kindle, as it's a pain to view my PDF
   files (and now especially the ones from Mark) on my laptop as it's
   quite bulky. So was thinking maybe use the SmartPhone etc.
   Either thinking of getting the HTC Hero or waiting (impatiently lol)
   for the HTC Bravo. I live in the UK and there is no release date on
   the Bravo as yet.
 
   Regards
   Anthoni
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


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

[android-developers] Movies

2010-01-27 Thread vijay rajan

Iswarya rai - wallpapers, photos and iswarya rai videos, songs ...
MORE info : http://123maza.com/50/rashers/

-- 
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: Who wants Multi-touch in all Android versions?

2010-01-27 Thread JP


On Jan 27, 8:14 am, SoftwareForMe.com SoftwareForMe.com
softwareforme@gmail.com wrote:
 Hi,

 Sorry that I missed the continuation of this thread, and only noticed it now
 as I got a Google Alert for our app name.

 @Dianne, that's not quite true (that all MT data is lost). The coordinates
 of the additional points are removed from the event data, but the size and
 pressure values change predictably as additional fingers are added.

Yeah, I remember having seen proof-of-concepts prior to 2.0
But back to the original question. I would highly welcome pinch-and-
zoom, supported on the platform level, across apps Wait, it *is*
supported, at least somewhat, assuming you get a Milestone.
From an engineering perspective, the sensible thing appears to be to
wait until pinch-and-zoom is supported on the platform level, across
the entire user interface of the phone, East and West. Lacking a
Milestone to test this, and motivation, I am not going down the path
to try to figure out how an app that implements pinch-and-zoom on the
app level will fare when same functionality is also implemented on the
platform level. Could work out of the box, could be ugly.
JP

-- 
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: Reposition views att runtime

2010-01-27 Thread ls02
The problem is that in onCreate where all views are set all views
sizes are 0. I have to dynamically create image depending on sizes of
some views that are also dynamic depending on their content set at
runtime. I didn''t dind any overridable in activity that is called
AFTER all views are set and inflated and their runtime sizes and
positions are valid.


On Jan 27, 10:48 am, Mark Murphy mmur...@commonsware.com wrote:
  How do I reposition views at runtime?

 The same way you position them in the first place -- by manipulating their
 layout rules (e.g., android:layout_centerInParent). You do this via
 calling getLayoutParams() on your View, casting it to an appropriate type
 (e.g., RelativeLayout.LayoutParams), making the desired changes, and
 calling setLayoutParams() to affect those changes.

 Note that I haven't done this in quite some time, so the above recipe is
 from memory and may be a bit off, though I'm pretty sure it is mostly
 correct.

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

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


[android-developers] Re: Reposition views att runtime

2010-01-27 Thread ls02
In activity onCreate where all views are set all views sizes are still
0. I need to create an image that depends on sizes on some views.
These views sizes depend on content set at runtime. I didn't find any
overridable in activity that is called AFTER all views have been set
and inflated and their inflated runtime sizes are valid.

On Jan 27, 10:48 am, Mark Murphy mmur...@commonsware.com wrote:
  How do I reposition views at runtime?

 The same way you position them in the first place -- by manipulating their
 layout rules (e.g., android:layout_centerInParent). You do this via
 calling getLayoutParams() on your View, casting it to an appropriate type
 (e.g., RelativeLayout.LayoutParams), making the desired changes, and
 calling setLayoutParams() to affect those changes.

 Note that I haven't done this in quite some time, so the above recipe is
 from memory and may be a bit off, though I'm pretty sure it is mostly
 correct.

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

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


Re: [android-developers] Re: Launching the correct activity on resume

2010-01-27 Thread Kevin Duffey
Hey guys,

Funny I find this thread this morning.. I just posted to Mark Murphy's forum
a similar question regarding multi-activity apps and how the life cycle is
handled. My question was a little bit different, but similar to this. My
main question was how do we handle the various life cycle methods in each
activity. If I have a game with a splash screen, main menu, game screen, and
high score screen.. at any one of those screens a call can come in, the user
can hit back, hit home, etc. My understanding of what you say in this
thread, and how I thought it would work is.. no matter WHAT button was
pressed (or call come in, etc), the activity on top is PAUSED. When you come
back to your app by any means, the paused activity regains control via
onResume and such, and you continue where you left off. The exception is..
that Android itself might shut down your app for other apps if it needs to
regain the memory your app is using. Therefore, it is up to the app to save
it's state info, so that WHEN the user either uses the task list OR the icon
in the drawer (or home screen) to launch your app, you can load that state
and put the app back into the last place it was at when the
PAUSE condition occurred. Is this not the case?

So my main problem with all this.. I understand for the most part how the
methods are called and when.. but what I am having a problem with is how to
save state and restore it... primarily because, in 2+ activity apps, it
seems you have to duplicate all those methods in every activity. See, I love
how Android works.. I think it's great..makes sense.. one foreground app
runs, the rest sit their paused. Saves battery and makes sense. What I don't
get is this notion of life cycle events for every single activity. It seems
to me most OS/platforms have a single point of entry life cycle class..
where you would handle any life cycle event in one place. Sort of like a
game loop in a game, where you handle all the things in one place to make
the game go. I am trying to figure out.. if in my game, at the main menu the
user hits BACK, does it go back to the splash screen.. or to the home/drawer
and out of my app? Do I exit my game completely if they hit back, or does
the user assume that hitting back or home does NOT exit the app, but simply
pauses it so they can do something else? I've read two different
methodologies regarding this. It seems that some people exit their app
completely if you leave it... but you still don't have total control over
that because if a call comes in, your app gets paused. You can at least
detect home/back pushes and exit your app completely if you want. The other
notion is to never exit your app. It stays running forever until Android
shuts it down due to memory needs, or a user runs a Task killer to kill it.
This seems so odd to me that this is the way to do things. In between that
we seem to have some games or apps that actually provide an exit option,
either by catching the back button at the main screen and offering the
option to exit, or providing an exit/quit menu item that ends the app. To me
this last one seems the right way to go for any app. Somehow, you should
have an exit/quit, just like a real desktop app. This notion of letting it
run forever and Android will manage all the app resources as needed.. I
don't know.. I don't like it. What happens if you go to play a game that
needs more resources..but Android in shutting down some apps, causes the
game to hiccup? Not sure if Android would actually do that right in the
middle of a running app or not, but I am curious what happens?

The other dilemma to me is.. do we have to actually implement each activity
with all those life cycle methods? Or do we put the process of saving state
into a single say, static helper class, and in all the activites.. in their
onSaveStateInstance and such, we refer to the same one helper method so that
we're not duplicating code in various activities? I ask this also because I
am wondering.. if I make a dialog activity, and the user hits back/home,
call comes in, screen orientation changes, etc.. I need to save my state,
then when the app starts.. in case say they changed screen rotation, it
restarts the app. Where does it start from? The activity that was on top? Do
I then have to reload all the state? Or do I just reload state for that one
activity that is on top? If only the one on top (the dialog.. if it has any
state)... when it's done and closes (or user hits back), does the underlying
activity then get called to load it's state before it goes back to executing
whatever method it would?

I so far haven't found any info that explains how this multi activity/life
cycle process works. I did ask Mark Murphy on his forum so Mark, if you're
reading this, I apologize for a double post. I think it would be good for
other developers to know in both places. :)

Thanks all.


On Wed, Jan 27, 2010 at 2:13 AM, ayanir ayanir...@gmail.com wrote:

 Hello,

 I have a similar problem when I 

[android-developers] Re: What About Oversize Apps?

2010-01-27 Thread Terry Stone


On Jan 27, 9:58 am, Mark Murphy mmur...@commonsware.com wrote:
 You may wish to consider downloading your images on first run and storing
 them on the SD card.

Does anyone have a good working example of how to do that? It seems
that this is a recurring issue here.

-- 
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: ViewAnimator?

2010-01-27 Thread NoraBora
You can see the examples of ViewFlipper or ViewSwitcher in ApiDemos.

On Jan 24, 5:46 am, Duey Oxburger cg-art...@hotmail.com wrote:
 Lads,

 When my game fires up I'm trying to fade from my company logo to my
 splash page... basically fade from one image to the other.  I'm trying
 to use ViewAnimator to do this, but I'm confused about how to properly
 hook this up to my main.xml file.  I've enclosed my main.xml file and
 my .java file as well.  If some of you more experienced guru's have a
 moment and wouldn't mind having a quick peak, it'd be much
 appreciated!:

 ---
 main.xml:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
     android:orientation=vertical
     android:layout_width=fill_parent
     android:layout_height=fill_parent
     

 ViewAnimator
         android:layout_width=wrap_content
     android:layout_height=wrap_content
         android:inAnimation=@drawable/ti_splash_logo
 /
 ViewAnimator
         android:layout_width=wrap_content
     android:layout_height=wrap_content
         android:outAnimation=@drawable/ti_presents
 /

 /LinearLayout
 ---

 .java:

 package com.tybon.fe;

 import android.app.Activity;
 import android.content.Context;
 import android.os.Bundle;
 import android.view.View;
 import android.widget.ViewAnimator;
 import android.widget.FrameLayout;
 import android.view.ViewGroup;
 import android.widget.ViewSwitcher.ViewFactory ;

 public class AMBUSH extends Activity {
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);
     }

 }

 --

 thx,

 D

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


[android-developers] Re: What About Oversize Apps?

2010-01-27 Thread ian
Thanks for the info guys. I suppose the SD card approach is the way to
go. It sounds a bit complicated but it makes more sense because my app
doesn't really need the pics in memory, they are mostly just for
occasional reference.





On Jan 27, 12:10 pm, TreKing treking...@gmail.com wrote:
 On Wed, Jan 27, 2010 at 9:49 AM, ian stilbit...@gmail.com wrote:
  My almost compled app has a couple of hundred images and tips the
  scales at a (bloated) 11 mb.

  But I'd rather leave it that size.

 Why?

  So I'm trying to figure out what this would mean to a user.

 For me, personally, this would mean that unless your app was the most
 awesomest thing ever on my phone and completely indispensable, it would be
 the first to go when I needed to clear space for something new. And I would
 probably never re-install it knowing how much space it took up.

 I'd second Mark's suggestion to cache to the SD what you need as you need
 it. Will the user really need a couple of hundred images at any given
 time?

 -
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
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: Record raw Audio, process audio and save as ogg or another compressed format

2010-01-27 Thread maecky
Push.
Does no one have any suggestions?

regards Maecky

On 17 Jan., 21:24, maecky markus.feuerst...@gmail.com wrote:
 Hi,
 I have searched the whole group but wasn't able to find a answer for
 my problem.

 I want to record audio from the microphone,  apply some audio signal
 processing and than save the processed audio data in a compressed
 format.

 I figured out, how to record audio uncompressed but now I wonder if I
 can use some api functions to store this data in a supported
 compressed format.

 Has anyone some suggestions?

 Thanks for your help
 regards Maecky

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


Re: [android-developers] Re: What About Oversize Apps?

2010-01-27 Thread TreKing
On Wed, Jan 27, 2010 at 10:54 AM, Terry Stone noidfou...@gmail.com wrote:

 Does anyone have a good working example of how to do that? It seems
 that this is a recurring issue here.


I don't but this shouldn't be that difficult. Assuming there are existing
functions for loading an image from a file:
1 - Check if file to image on SD card exists
2 - If so, load it, done.
3 - If not, download from your server, cache to SD card where you checked
previously so it'll be there next time
4 - Profit

Of course you will want to let the user know that you're downloading stuff
somehow, especially if they're large images that will take some time.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

Re: [android-developers] Re: Record raw Audio, process audio and save as ogg or another compressed format

2010-01-27 Thread Donal Rafferty
Have you looked at the MediaRecorder class? As far as I know it allows some
encoding and compression

On Wed, Jan 27, 2010 at 5:04 PM, maecky markus.feuerst...@gmail.com wrote:

 Push.
 Does no one have any suggestions?

 regards Maecky

 On 17 Jan., 21:24, maecky markus.feuerst...@gmail.com wrote:
  Hi,
  I have searched the whole group but wasn't able to find a answer for
  my problem.
 
  I want to record audio from the microphone,  apply some audio signal
  processing and than save the processed audio data in a compressed
  format.
 
  I figured out, how to record audio uncompressed but now I wonder if I
  can use some api functions to store this data in a supported
  compressed format.
 
  Has anyone some suggestions?
 
  Thanks for your help
  regards Maecky

 --
 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: simple web search based on location

2010-01-27 Thread Sunny
Adding to my email below, let me share with you what I am trying to do
and the results I get:-

ListAddress wfList = gc.getFromLocationName(sb.toString(),5 )
where sb contains the address  Whole Foods, Los Gatos, CA.  what I
was expecting from above was a list of address of whole food locations
in this area.

However the wfList returns a size 0. This is a well formed address and
I was expecting it to work. Examples given for this method
( getFromLocationName)  gives the impression that partial address like
the above should work -like Dalvik, Iceland, an address such as
1600 Amphitheatre Parkway, Mountain View, CA, an airport code such
as SFO, etc.. but it is not the case :-(.

Maybe I  am doing something wrong and I need to get out  of the
woods !. Any clues !!



On Jan 21, 5:00 pm, Sunny menon1...@gmail.com wrote:
 Thanks Jeff, john.

 I tried with Geocoder getFromLocationName - it does not return
 business based results unless you have the complete address. I would
 greatly appreciate  if you have a code piece written that works. I am
 using android 2.1.

 thanks
 Sunil.

 On Jan 20, 11:15 am, jeffro j...@trackaroo.com wrote:



  Check out the GeoCoder class and the getFromLocationName methods.  You
  can input a search string like whole foods,
  los gatos, CA and it will return a list of Address results.  You can
  also specify a bounding box if you want to limit your results to your
  current map.

 http://developer.android.com/reference/android/location/Geocoder.html

  Jeff
  ---­­-
  Trackaroo
  Trackmaster - Motorsports Lap Timer (http://trackmaster.trackaroo.com)
  Dynomaster - Performance Dyno (http://dynomaster.trackaroo.com)

  On Jan 19, 10:41 am, John jcarp...@gmail.com wrote:

   Google provides a fairly simple interface for local searches.

  http://code.google.com/apis/ajaxsearch/documentation/#fonje

   In the search request you can specify a latitude and longitude with
   the text to get a reference to those nearby businesses. Here is the
   reference to the parameters for the search.

  http://code.google.com/apis/ajaxsearch/documentation/reference.html#_...

   You can simply make a http call and parse the json response when it
   comes back. It should be straight forward from there.

   Thanks,
   John

   On Jan 17, 8:00 pm, sunny menon1...@gmail.com wrote:

Hi Folks,
wondering if any of you can help.
This is what I am trying to do:
simple app to get list of addresses I am interested in based on my 
current
location.

I get the current location using location services. Now, based on this
current location I want to do a search on business places without really
using the SearchManager's triggerSearch. The problem with the 
triggerSearch
is that it launches the googlemap and show the business address I am
 looking for and it is blocked. I want to get the control back.  I do 
not
want to launch the map with the listing. all I want to do is the get the
Geopoint of the business address I am interested in using a simple web
search. I tried reverseGeocoding , but it is does not work with business
address. It needs full address. any suggestion?.

Simply put, all I want to do is a simple websearch , say query=whole 
foods,
los gatos, CA to get its full address. and then use it to get the 
GeoPoint.

I am stuck and wondering if anyone can give me some pointers.

thanks a ton in advance.
Sunny.- Hide quoted text -

  - Show quoted text -- 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] JDK dynamic proxy : it works on Android :-)

2010-01-27 Thread Piwai
Hi all !

This message is not a help request neither another complaint post...

I just wanted to say that I'm happy to see that Android seems to
perfectly implement the JDK Proxy/InvocationHandler API... And that's
great !

Ok, maybe some people already knew this. But I didn't, so I'm glad to
share ;-) .

For those wondering what the hell is he talking about ?, quick usage
example :

public interface IUserService {
  void getSomeData(String param);
}
[...]
ClassLoader cl = IUserService.class.getClassLoader();
InvocationHandler h = new InvocationHandler() {
  public Object invoke(Object proxy, Method m, Object[] args) throws
Throwable {
System.out.println(m);
System.out.println(args[0]);
return null;
  }
};
IUserService service = (IUserService) Proxy.newProxyInstance(cl, new
Class[] {IUserService.class}, h);

Calling :
service.getSomeData(yeah!);
will print the method signature and the argument...

I now use interfaces + annotations to define my JSON client services,
no more boiler plate code, I love it :-) .

Who said AOP is not for Android ? :-) . Of course, there is still no
dynamic byte-code creation, but that's cool enough.

And I don't wanna hear about any performance concern :-) . It all
depends on what you're doing. For instance, when dealing with getting
data from the internet, what is the relative cost of a proxy ? Not
much... Of course, one should not use this in the graphical components
of a 3D game...

Cheers,
Piwai

-- 
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 Gmail content provider

2010-01-27 Thread zehunter
i'm also interesting about using Gmail APK (maybe lauching activity
with parameter... or to access to Gmail and Google login service with
some API or class...

any idea?

On Jan 22, 4:55 am, Alberto afonsec...@gmail.com wrote:
 Hello, I was wondering if anyone has any information on accessing 
 theGmailcontent provider. It doesn't seem to be officially supported in
 the API but it looks like people are able to do this regardless. See
 the SlideScreen app which notifies you of new e-mail and even shows
 you info (sender, title).

 http://gizmodo.com/5453321/slidescreen-android-app-replaces-homescree...

 It would be great to know how this is accomplished, for example we
 could create a home screen widget that shows you your last few e-
 mails, etc.

-- 
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: GMail unread mail count

2010-01-27 Thread zehunter
i'm also interesting about using Gmail APK (maybe lauching activity
with parameter...) or to access to Gmail and Google login service with
some API or class...

any idea?

On Dec 9 2009, 12:51 pm, Christoph chris.schue...@googlemail.com
wrote:
 Hello Forum,

 most other smart phones display the unread email count as a small
 number in the lower right hand corner of the email application icon. I
 like that. After realizing that this is not supported by theGMail
 app, I started looking around the market for a widget that achieves
 this. All I found was a commercial widget, which did not satisfy me
 (the count did not get instantly updated when the unread mail count
 changed).

 Therefore I want to develop a widget, which accomplishes exactly that.

 Many of you probably have more experience in android development than
 I do, so I would be happy to hear your opinions.

 I see two ways to realize this:

 1) Somehow hook into a content provider of theGMailapp and extract
 the unread mail count directly from there. Unfortunately theGMailapp
 is not part of the SDK and closed source. Therefore I have no idea how
 to find out about the internal workings of the app and how to extract
 the unread mail count directly from there.

 2) The second approach is much more indirect and has more overhead,
 but it will work nevertheless. I will let the user provide google
 username and password and log into the google imap server directly and
 find out how many unread mail there are. A port of the JavaMail
 library for the android OS should make this quite simple. The question
 remains when to update the mail count. What should trigger the update?
 A periodic time-out? Well, my first idea would be to update it when
 the widget is first started and then every time a new mail
 notification comes in. However I don't know whether this is possible.
 Can I tell my application to react to notifications, which where
 produced by another application (GMailapp in our case) ?

 I really think there should be a free unreadgmailwidget, which
 accomplishes this! I would be happy to receive feedback.

 Cheers,

 Christoph

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


Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread SoftwareForMe.com SoftwareForMe.com
I'm not clear what you mean by:



  I am not going down the path
 to try to figure out how an app that implements pinch-and-zoom on the
 app level will fare when same functionality is also implemented on the
 platform level. Could work out of the box, could be ugly.


I mean, Multi-touch is fully implemented and available in the platform since
2.0. Google's applications (browser, gallery, maps) don't use it, but any
other applications wishing to use it can do so.

The issue in this thread was that it is possible to simulate it on all but
one [known] Android device from 1.0 though 1.6. As I said above, our
software uses a different code path on 2.0 and later devices, so there are
no ill side effects when placed on new devices.

Scott
SoftwareForMe.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] Dynamic views removed when switching to landscape

2010-01-27 Thread BobMorane
Hello,

I thought I already posted this question but I can't find it so I ask
again :-)

I add dynamically some views to my main view with addView().
When the phone goes to landscape mode, these views are no longer on
the screen.

I believe that's because the main.xml file is reloaded so all the
views that are not described in the xml are gone.

Is there a nice way to keep the same view hierarchy when going to
landscape mode and not lose the views added dynamically?

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: Google vs Flurry

2010-01-27 Thread Smelly Eddie
I use Flurry and have been mostly content with it.  The event tracking
is very nice, and allows up to 10 custom parameters for each event
(Ie. event:move disc, old position :1, new pos. : 5, queuetype:
disc, etc, etc)

The downside is that they lack some detail in error reporting (like
class, device, framework) that would be very useful in
troubleshooting.

On Jan 27, 9:33 am, Joshua Frank frankjos...@gmail.com wrote:
 I want to start tracking usage of my apps. I need to decide on who to
 use Google Mobile Analytics or Flurry. Does anyone have an opinion?

-- 
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: OpenGL Fillrate Issues

2010-01-27 Thread Mario Zechner
How does your onTouch method look like? Are you synchronizing on som
object instance?

On 27 Jan., 16:28, Ralf Schneider li...@gestaltgeber.com wrote:
 2010/1/27 Mario Zechner badlogicga...@gmail.com

  @Ralf
  that is very strange behaviour i wouldn't expect from a Nexus One. I
  have to admit that i only own a Droid so i can't confirm it for the
  N1. Would you mind putting an apk with your test application up
  somewhere, for example athttp://www.file-pasta.com, and add log cat
  output so we can observe the behaviour of your app on our devices?
  Additionally, if it's not to much of a hazzle you could also share the
  source code so we can have a look at it.

 Sorry, unfortunately I can not upload a test app at this point.

 I just checked it again:

    - The 60 FPS I reported for 3 textured full screen quads was to high. It
    is more around 40 FPS (if not touching the screen).
    It goes down to 35 FPS as long as I touch the screen.
    - The 60 FPS I reported was from a simple colored triangle. During
    touching the screen it is ca. 48 FPS.

 Sorry, for the wrong numbers in my previous post.

 There is a very simple test you can perform by yourself:

    - On every frame [*public void onDrawFrame(GL10 gl) *] just do a glClear
    like:
    *gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);*
    - Measure FPS
    - Touch the screen
    - Measure FPS

 This simple test on the N1 shows a frame rate drop while touching the
 screen:

 01-27 16:01:20.920: DEBUG/GGTest(21690): FPS: 60.92
 01-27 16:01:21.920: DEBUG/GGTest(21690): FPS: 60.73
 01-27 16:01:22.921: DEBUG/GGTest(21690): FPS: 60.83
 01-27 16:01:23.930: DEBUG/GGTest(21690): FPS: 60.65
 01-27 16:01:24.951: DEBUG/GGTest(21690): FPS: 43.25 # Touch Screen
 01-27 16:01:25.960: DEBUG/GGTest(21690): FPS: 48.48
 01-27 16:01:26.960: DEBUG/GGTest(21690): FPS: 53.60
 01-27 16:01:27.980: DEBUG/GGTest(21690): FPS: 49.22
 01-27 16:01:28.980: DEBUG/GGTest(21690): FPS: 46.83
 01-27 16:01:29.991: DEBUG/GGTest(21690): FPS: 44.65
 01-27 16:01:30.991: DEBUG/GGTest(21690): FPS: 52.82
 01-27 16:01:32.000: DEBUG/GGTest(21690): FPS: 60.89 # Release Finger
 01-27 16:01:33.000: DEBUG/GGTest(21690): FPS: 60.64
 01-27 16:01:34.010: DEBUG/GGTest(21690): FPS: 60.71
 01-27 16:01:35.011: DEBUG/GGTest(21690): FPS: 60.70
 01-27 16:01:36.020: DEBUG/GGTest(21690): FPS: 60.73

 ..Btw: I tried a:

         event.recycle();
         try {
             Thread.sleep(18);
         } catch (InterruptedException e) {
         }

 ... this helps nothing on the N1. So, (in this case) the problem might not
 be a garbage collection issue. May be the the whole input flow is just to
 bloated with to many abstraction layers.

-- 
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: Guide Me Right Way

2010-01-27 Thread Terry Stone
The CommonsWare books read perfectly fine on the Droid.

I keep a copy there so I can read on flights, etc.



On Jan 27, 10:21 am, Kevin Duffey andjar...@gmail.com wrote:
 I'd hold off on a Kindle until you check out the Android readers coming out.
 I am sure apple will be releasing their table info sometime today.. but I
 suspect that one will be pricey. There will probably be netbook with
 twistable screens to make them tablets.. or complete tablets, with Android
 on them, for a lot less. That is what I am waiting for.

 On Wed, Jan 27, 2010 at 1:32 AM, Anthoni anthoni.gard...@gmail.com wrote:
  Hi Kevin,

  Thanks for your input.
  That kinda puts the kibosch on the whole idea as I have major problems
  with my eyes anyway (losing them completely, but slowly).
  So it is back to being awkwardly sat up in bed with the laptop, or
  fork out quite a bit for a flexible e-book reader like the Kindle :)

  On Jan 26, 11:55 pm, Kevin Duffey andjar...@gmail.com wrote:
   I thought the same thing Anthoni.. I tried a PDF viewer for my moto
  droid.
   Don't like it so much. It's much harder to work with than on a laptop
   screen. It's much smaller of course, and you end up with a lot less
   realestate, so you continually have to scroll left/right. I suppose you
  can
   zoom out more, but then it's too small for my older eyes to read.

   On Tue, Jan 26, 2010 at 3:03 PM, Anthoni anthoni.gard...@gmail.com
  wrote:
Hi all,

Kinda a bit off topic, but I am looking into getting the HTC Hero as
my mobile (don't currently have an android phone yet). What I wanted
to know is what are these new Android phones like for viewing PDF
files? Are they pretty clear etc.

I was looking into getting a Kindle, as it's a pain to view my PDF
files (and now especially the ones from Mark) on my laptop as it's
quite bulky. So was thinking maybe use the SmartPhone etc.
Either thinking of getting the HTC Hero or waiting (impatiently lol)
for the HTC Bravo. I live in the UK and there is no release date on
the Bravo as yet.

Regards
Anthoni

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

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

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

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


Re: [android-developers] Dynamic views removed when switching to landscape

2010-01-27 Thread TreKing
On Wed, Jan 27, 2010 at 11:36 AM, BobMorane tpi...@yahoo.fr wrote:

 I believe that's because the main.xml file is reloaded so all the
 views that are not described in the xml are gone.


Yup

 Is there a nice way to keep the same view hierarchy when going to
 landscape mode and not lose the views added dynamically?


Override onSaveInstanceState and onRestoreInstanceState to save / restore
information about the dynamic views that need to be re-added.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] how to set a word in a TextView clickable

2010-01-27 Thread monty
culd any1 plz tell me how to set a particular text in a TextView as
clickable and not the entire text in TextView.At present
clickable=true works for entire textview and not a particular text
in textview.

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


Re: [android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Ralf Schneider
2010/1/27 Mario Zechner badlogicga...@gmail.com

 How does your onTouch method look like? Are you synchronizing on som
 object instance?


class EngineGLSurfaceView extends GLSurfaceView {
public EngineGLSurfaceView(Context context) {
super(context);
mRenderer = new EngineRenderer();
 setRenderer(mRenderer);
}

public boolean onTouchEvent(final MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
}
return true;
}

EngineRenderer mRenderer;
}

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

Re: [android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Dianne Hackborn
On Tue, Jan 26, 2010 at 4:20 PM, Mario Zechner badlogicga...@gmail.comwrote:

 That being said, there shouldn't be any problems with touch events on
 devices running android = 2.0 as they fixed the event flood problem
 in that version. I couldn't see any problem in my projects that make
 heavy use of the touch screen on my droid. There seems to be a small
 memory leak in the onTouch method if you don't call event.recycle
 before exiting the onTouch method.


Oh my ghod...  are you saying you are calling recycle() on the MotionEvent
that is -given- to you in onMotionEvent()?  Please please please do not do
that, you do not own the event, and you are going to cause nasty problems if
you recycle it from the caller that does own it.

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

Re: [android-developers] Re: Who wants Multi-touch in all Android versions?

2010-01-27 Thread Dianne Hackborn
On Wed, Jan 27, 2010 at 9:31 AM, SoftwareForMe.com SoftwareForMe.com 
softwareforme@gmail.com wrote:

 The issue in this thread was that it is possible to simulate it on all but
 one [known] Android device from 1.0 though 1.6. As I said above, our
 software uses a different code path on 2.0 and later devices, so there are
 no ill side effects when placed on new devices.


Wow.  Okay, all I have to say is this: please do not be one of the people
who complains about fragmentation, and please provide HUGE CAVEATS to
-anyone- who is giving any thought to using your code.  You are entirely
relying on certain behavior, of a certain vendor's certain screen, that will
not happen on most other screens.  You can guarantee that this code will not
work or work poorly or various devices as they ship.

It's a clever trick for the cases where it works, but relies on highly
variable behavior between devices.

-- 
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] mobile TV support for Nexus One

2010-01-27 Thread Cameron
The Qualcomm CPU on the Nexus Ond claims to have support for mediaFlo
which is Qualcomm's solution to mobile TV as well as DVB-H, which I
believe is the most widely implemented standard.

1.  What exactly is the support? I think (but would like confirmation)
that this support is the ability for the chip to receive the broadcast
signals.

2.  If the chip has this ability, is there hardware that the phone
manufacturers must add to access the received signal from the chip?

3.  If not more hardware is needed, are there API's which I can use to
access the signal from the chip

Clearly there must also be a software solution to interpret/decode the
signal. There is much 3rd party software which can be added, but if
the hardware is not there, there is no point in pursuing this issue
further. If anyone has this information available, I would appreciate
a reply

Cam

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