[android-developers] calling showDialog(dialog_id) in Activity consists GLSurfaceView

2012-01-26 Thread Avatar Ng
Application exit and throw error when I trying to call showDialog() in
an Activity consisting GLSurfaceView

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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: 2D Double Buffering in Android 1.5 (with Canvas?)

2009-06-11 Thread Avatar Ng

I only concern of my animation quality ...
Caused the current approach give me a flickering effect (yes which is
quite disturbing for viewing).

Double-Buffering is suppose to eliminate this flickering problem ...
that's y it's introduced I guess.

This approach is very different from my desktop Java experience, which
in turn it's quite hard for me to fine tune my game performance.

Still hoping there's an official write up tutorial for this in the
developer.android.com/
Hate the XML approach for drawing/ animation, ... very confusing
mechanism (which I think is not capable of doing serious games, how
many great games are there in market??? ).

Sorry Android fans, no offends ... please take my feedback
constructively.

I'm hoping Android could go further than this ... still very much a
lab toy to me now.

Regards,
Avatar Ng
--

On Jun 11, 4:55 am, Robert Green rbgrn@gmail.com wrote:
 Correct me if I'm wrong but isn't SurfaceView double buffered by
 design?  The idea of a double buffer is to hide the current drawing
 while it's happening and then flip to the entire drawn frame (back
 buffer / front buffer).  When I use lockCanvas and post on the surface
 view, it doesn't show what I'm drawing until I post the entire canvas,
 which is the whole idea of double buffering.

 On Jun 9, 7:06 pm, Avatar Ng ngchee...@gmail.com wrote:

  Hi there,

  Do anyone here having experience of applying double-buffering in
  Android 2D animation/ games?

  I'm sure this is a pretty basic functionality people will discuss
  about when writing games on Android, but seems like the source I found
  on web was pretty little ...

  The only one I found is using OpenGL blit (intro by Chris Pruett in
  Google IO 2009 session). If I want only a 2D, how do I do that?

  Hope Google Android group can come out a tutorial on this ... it will
  be much helpful.

  Regards,
  Avatar Ng
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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: Animated Sprites For Games

2009-06-11 Thread Avatar Ng

Thanks taking the time to write down those guides... that helps me
alot!!!

Cheers,
Avatar Ng
---

On May 26, 4:11 am, Robert Green rbgrn@gmail.com wrote:
 It's usually a little more complicated than that because you need to
 have it handled by your loop and then there is variable timing, etc so
 I wrote this to get people started:

 http://www.rbgrn.net/content/253-main-loop-suitable-stable-animations

 It has some code that you may want to use.  Just load up all of your
 frames into an array of bitmaps and then have your draw code draw the
 appropriate bitmap into the correct spot, which is as easy as
 canvas.draw(bitmap, x, y, paint).

 If you need to scale or rotate it, you may want to use a matrix to
 draw and have it position (translate) scale and rotate.

 I just helped someone else doing the same thing.  It's not that hard
 after you've implemented it once.  There is some good discussion in
 the top comments on this post as well 
 -http://www.rbgrn.net/content/54-getting-started-android-game-development

 Good luck!

 On May 25, 1:08 pm, Alekh alek...@gmail.com wrote:

  How do I add animated sprites to a custom view?

  I have used AnimationDrawable object to execute the animation. The
  animation works if I add the xml resource to the background of my
  custom view. But I want to know how to draw the animationdrawable
  directly on a canvas. Please help me with examples..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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: 2D Double Buffering in Android 1.5 (with Canvas?)

2009-06-11 Thread Avatar Ng

lol ... icic
So I assume double buffering is taken care behind the scene (I saw
your name in the EGLDisplaySurface.cpp code review, now I know why you
are so bz to reply)

Anyone mind to show us what;s the right way to use SurfaceView in a
game loop ... in order to beneficial from Double-Buffering ... thanks

Cheers
Avatar Ng
-

On Jun 11, 5:13 am, Romain Guy romain...@google.com wrote:
 Not just SurfaceView, regular views also benefit from double buffering.



 On Wed, Jun 10, 2009 at 1:55 PM, Robert Greenrbgrn@gmail.com wrote:

  Correct me if I'm wrong but isn't SurfaceView double buffered by
  design?  The idea of a double buffer is to hide the current drawing
  while it's happening and then flip to the entire drawn frame (back
  buffer / front buffer).  When I use lockCanvas and post on the surface
  view, it doesn't show what I'm drawing until I post the entire canvas,
  which is the whole idea of double buffering.

  On Jun 9, 7:06 pm, Avatar Ng ngchee...@gmail.com wrote:
  Hi there,

  Do anyone here having experience of applying double-buffering in
  Android 2D animation/ games?

  I'm sure this is a pretty basic functionality people will discuss
  about when writing games on Android, but seems like the source I found
  on web was pretty little ...

  The only one I found is using OpenGL blit (intro by Chris Pruett in
  Google IO 2009 session). If I want only a 2D, how do I do that?

  Hope Google Android group can come out a tutorial on this ... it will
  be much helpful.

  Regards,
  Avatar Ng

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 2D Double Buffering in Android 1.5 (with Canvas?)

2009-06-11 Thread Avatar Ng

By the way ... here's my working project (yes not tune yet, very slow
even my demo).
Any criticism or ideas were welcome ...

http://hexagonm.blogspot.com/

Will try to post some of my game story and idea until I have the
time ...
I had these whole thing sketch down long before Android arrived ...
It's time to bring it live now XD

Regards,
Avatar Ng
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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: 2D Double Buffering in Android 1.5 (with Canvas?)

2009-06-11 Thread Avatar Ng

Ya ... that will be great, think Chris Pruett (the speaker name) will
release the framework code, once he's done with his game's 1st
release ... think he got mention that ...

But before that happens, my development goes on ... I can't keep
waiting doing nothing :P


Regards,
Avatar Ng

On Jun 11, 10:38 pm, Streets Of Boston flyingdutc...@gmail.com
wrote:
 Why don't you use OpenGL ES for your 2D game. Take a look at the
 Google I/O session talks about gaming on mobile platforms.

 On Jun 11, 10:21 am, Avatar Ng ngchee...@gmail.com wrote:

  I only concern of my animation quality ...
  Caused the current approach give me a flickering effect (yes which is
  quite disturbing for viewing).

  Double-Buffering is suppose to eliminate this flickering problem ...
  that's y it's introduced I guess.

  This approach is very different from my desktop Java experience, which
  in turn it's quite hard for me to fine tune my game performance.

  Still hoping there's an official write up tutorial for this in the
  developer.android.com/
  Hate the XML approach for drawing/ animation, ... very confusing
  mechanism (which I think is not capable of doing serious games, how
  many great games are there in market??? ).

  Sorry Android fans, no offends ... please take my feedback
  constructively.

  I'm hoping Android could go further than this ... still very much a
  lab toy to me now.

  Regards,
  Avatar Ng
  --

  On Jun 11, 4:55 am, Robert Green rbgrn@gmail.com wrote:

   Correct me if I'm wrong but isn't SurfaceView double buffered by
   design?  The idea of a double buffer is to hide the current drawing
   while it's happening and then flip to the entire drawn frame (back
   buffer / front buffer).  When I use lockCanvas and post on the surface
   view, it doesn't show what I'm drawing until I post the entire canvas,
   which is the whole idea of double buffering.

   On Jun 9, 7:06 pm, Avatar Ng ngchee...@gmail.com wrote:

Hi there,

Do anyone here having experience of applying double-buffering in
Android 2D animation/ games?

I'm sure this is a pretty basic functionality people will discuss
about when writing games on Android, but seems like the source I found
on web was pretty little ...

The only one I found is using OpenGL blit (intro by Chris Pruett in
Google IO 2009 session). If I want only a 2D, how do I do that?

Hope Google Android group can come out a tutorial on this ... it will
be much helpful.

Regards,
Avatar Ng- 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: 2D Double Buffering in Android 1.5 (with Canvas?)

2009-06-11 Thread Avatar Ng

Hi, thanks everyone for your input ... I'll try up the suggestions.

Cheers,
Avatar Ng

On Jun 12, 2:35 am, Robert Green rbgrn@gmail.com wrote:
 I'm seeing 9fps on your app.  That's way too slow.  I have 2 full
 screen layers, many sprites, full sound and 2 A* algorithms running at
 45 FPS.  There are many things you must know to do efficiently.  I'm
 not going to list everything I've done here because it would fill up
 pages but if you take a look at my blog I wrote about lots of 
 it.http://www.rbgrn.net/content/290-light-racer-20-days-32-33-getting-gr...
 talks about some of that.

 I'm not using OpenGL ES, just a plain old Canvas.  Z buffering
 probably would have been much easier with a 3D library, so if it's
 just as fast, I'd recommend doing that.  Either way though, you need
 to be performance-conscious or you'll have a sluggish game.

 On Jun 11, 10:26 am, Avatar Ng ngchee...@gmail.com wrote:

  By the way ... here's my working project (yes not tune yet, very slow
  even my demo).
  Any criticism or ideas were welcome ...

 http://hexagonm.blogspot.com/

  Will try to post some of my game story and idea until I have the
  time ...
  I had these whole thing sketch down long before Android arrived ...
  It's time to bring it live now XD

  Regards,
  Avatar Ng
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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] 2D Double Buffering in Android 1.5 (with Canvas?)

2009-06-09 Thread Avatar Ng

Hi there,

Do anyone here having experience of applying double-buffering in
Android 2D animation/ games?

I'm sure this is a pretty basic functionality people will discuss
about when writing games on Android, but seems like the source I found
on web was pretty little ...

The only one I found is using OpenGL blit (intro by Chris Pruett in
Google IO 2009 session). If I want only a 2D, how do I do that?

Hope Google Android group can come out a tutorial on this ... it will
be much helpful.


Regards,
Avatar Ng


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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] Bug in contacts

2009-05-07 Thread Avatar Ng

I wonder is it the contact sync was running, or some application which
caused this problem.
I got an exception during navigation in contact list ... a contact
sync from my Gmail account.

Error: Sorry! The process android.process.acore has stopped
unexpectedly. Please try again.

This error interrupts my normal phone usage, please help.

hardware/os: Android Dev Phone 1, self upgrade to Android 1.5

process running:
--
# ps
ps
USER PID   PPID  VSIZE RSS   WCHANPC NAME
root 1 0 288   164   c00ad64c c74c S /init
root 2 0 0 0 c006038c  S kthreadd
root 3 2 0 0 c0050a68  S ksoftirqd/0
root 4 2 0 0 c0075138  S watchdog/0
root 5 2 0 0 c005d18c  S events/0
root 6 2 0 0 c005d18c  S khelper
root 7 2 0 0 c005d18c  S suspend
root 8 2 0 0 c005d18c  S kblockd/0
root 9 2 0 0 c005d18c  S kmmcd
root 102 0 0 c005d18c  S btaddconn
root 112 0 0 c005d18c  S btdelconn
root 122 0 0 c005d18c  S kondemand/0
root 132 0 0 c005d18c  S qmi
root 142 0 0 c00306c8  D rpcrouter
root 152 0 0 c005d18c  S detection/0
root 162 0 0 c00327c0  S krpcserversd
root 172 0 0 c0081c58  S pdflush
root 182 0 0 c0081c58  S pdflush
root 192 0 0 c0085e0c  S kswapd0
root 202 0 0 c005d18c  S aio/0
root 212 0 0 c0030fbc  S kadspd
root 222 0 0 c005d18c  S panel_on/0
root 232 0 0 c01893f4  S mtdblockd
root 242 0 0 c018f4c8  S USB mass_storag
root 262 0 0 c005d18c  S synaptics_wq
root 272 0 0 c005d18c  S kstriped
root 282 0 0 c0231cd0  S krfcommd
system   301 808   168   c01795f4 afe0c45c S /system/bin/
servicemanager
root 311 848   276   c00adc70 afe0c584 S /system/bin/vold
root 321 668   152   c01cfb20 afe0cdec S /system/bin/
debuggerd
radio331 7864  636    afe0cacc S /system/bin/rild
root 341 70548 9596  c00adc70 afe0c584 S zygote
media351 34164 3236   afe0c45c S /system/bin/
mediaserver
bluetooth 361 1180  512   c00ad64c afe0d25c S /system/bin/dbus-
daemon
root 371 816   232   c021dc30 afe0c1bc S /system/bin/
installd
compass  391 1324  352   c01a3574 afe0c45c S /system/bin/akmd
system   5634213048 23968  afe0c45c S system_server
radio9234119768 15580  afe0d3e4 S
com.android.phone
root 290   2 0 0 c0030dd0  D audmgr_rpc
root 1083  1 3344  168    e8f4 S /sbin/adbd
app_41810  34122388 11856  afe0d3e4 S
com.android.inputmethod.la
tin
root 1841  2 0 0 c0030dd0  D audmgr_rpc
root 6277  2 0 0 c01ba5a4  S mmcqd
app_37306  3496864 12032  afe0d3e4 S
android.process.media
app_17   7635  34118672 18296  afe0d3e4 S
com.android.browser
system   7984  34102176 14416  afe0d3e4 S
com.android.settings
app_48057  34120184 18704  afe0d3e4 S
android.process.acore
app_78064  34118216 16928  afe0d3e4 S
com.google.process.gapps
root 8090  1083  740   328   c004e318 afe0d08c S /system/bin/sh
root 8092  8090  884   336    afe0c1bc R ps
#
-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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 1.5 SDK now available

2009-05-07 Thread Avatar Ng

I just bought an Android Dev Phone 1 (HTC Dream). recently upgraded
with the latest 1.5 (cupcake, image from grabbed from HTC's site).

I wonder anyone had notice this, but i found that Dream 1's touch
screen is slow response (not sensitive, accurate, tolerance enough,
which in return making the qwerty keyboard impossible to use).

does version 1.1 or 1.0 having this kinda issue?

by Avatar Ng

On Apr 28, 2:12 am, Xavier Ducrohet x...@android.com wrote:
 Hello developers,

 The Android 1.5 SDK, and the 1.5 images for ADP1 are now available for 
 download.

 More information 
 athttp://android-developers.blogspot.com/2009/04/android-15-is-here.html

 Xav
 --
 Xavier Ducrohet
 Android Developer Tools Engineer
 Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email 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: Bug in contacts

2009-05-07 Thread Avatar Ng

ok thans, i got the work around

On May 8, 10:24 am, Jeff Sharkey jshar...@android.com wrote:
 Please report issues over at:http://code.google.com/p/android/issues/list

 j



 On Thu, May 7, 2009 at 6:50 PM, Avatar Ng ngchee...@gmail.com wrote:

  I wonder is it the contact sync was running, or some application which
  caused this problem.
  I got an exception during navigation in contact list ... a contact
  sync from my Gmail account.

  Error: Sorry! The process android.process.acore has stopped
  unexpectedly. Please try again.

  This error interrupts my normal phone usage, please help.

  hardware/os: Android Dev Phone 1, self upgrade to Android 1.5

  process running:
  --
  # ps
  ps
  USER     PID   PPID  VSIZE RSS   WCHAN    PC         NAME
  root     1     0     288   164   c00ad64c c74c S /init
  root     2     0     0     0     c006038c  S kthreadd
  root     3     2     0     0     c0050a68  S ksoftirqd/0
  root     4     2     0     0     c0075138  S watchdog/0
  root     5     2     0     0     c005d18c  S events/0
  root     6     2     0     0     c005d18c  S khelper
  root     7     2     0     0     c005d18c  S suspend
  root     8     2     0     0     c005d18c  S kblockd/0
  root     9     2     0     0     c005d18c  S kmmcd
  root     10    2     0     0     c005d18c  S btaddconn
  root     11    2     0     0     c005d18c  S btdelconn
  root     12    2     0     0     c005d18c  S kondemand/0
  root     13    2     0     0     c005d18c  S qmi
  root     14    2     0     0     c00306c8  D rpcrouter
  root     15    2     0     0     c005d18c  S detection/0
  root     16    2     0     0     c00327c0  S krpcserversd
  root     17    2     0     0     c0081c58  S pdflush
  root     18    2     0     0     c0081c58  S pdflush
  root     19    2     0     0     c0085e0c  S kswapd0
  root     20    2     0     0     c005d18c  S aio/0
  root     21    2     0     0     c0030fbc  S kadspd
  root     22    2     0     0     c005d18c  S panel_on/0
  root     23    2     0     0     c01893f4  S mtdblockd
  root     24    2     0     0     c018f4c8  S USB mass_storag
  root     26    2     0     0     c005d18c  S synaptics_wq
  root     27    2     0     0     c005d18c  S kstriped
  root     28    2     0     0     c0231cd0  S krfcommd
  system   30    1     808   168   c01795f4 afe0c45c S /system/bin/
  servicemanager
  root     31    1     848   276   c00adc70 afe0c584 S /system/bin/vold
  root     32    1     668   152   c01cfb20 afe0cdec S /system/bin/
  debuggerd
  radio    33    1     7864  636    afe0cacc S /system/bin/rild
  root     34    1     70548 9596  c00adc70 afe0c584 S zygote
  media    35    1     34164 3236   afe0c45c S /system/bin/
  mediaserver
  bluetooth 36    1     1180  512   c00ad64c afe0d25c S /system/bin/dbus-
  daemon
  root     37    1     816   232   c021dc30 afe0c1bc S /system/bin/
  installd
  compass  39    1     1324  352   c01a3574 afe0c45c S /system/bin/akmd
  system   56    34    213048 23968  afe0c45c S system_server
  radio    92    34    119768 15580  afe0d3e4 S
  com.android.phone
  root     290   2     0     0     c0030dd0  D audmgr_rpc
  root     1083  1     3344  168    e8f4 S /sbin/adbd
  app_4    1810  34    122388 11856  afe0d3e4 S
  com.android.inputmethod.la
  tin
  root     1841  2     0     0     c0030dd0  D audmgr_rpc
  root     6277  2     0     0     c01ba5a4  S mmcqd
  app_3    7306  34    96864 12032  afe0d3e4 S
  android.process.media
  app_17   7635  34    118672 18296  afe0d3e4 S
  com.android.browser
  system   7984  34    102176 14416  afe0d3e4 S
  com.android.settings
  app_4    8057  34    120184 18704  afe0d3e4 S
  android.process.acore
  app_7    8064  34    118216 16928  afe0d3e4 S
  com.google.process.gapps
  root     8090  1083  740   328   c004e318 afe0d08c S /system/bin/sh
  root     8092  8090  884   336    afe0c1bc R ps
  #
  -

 --
 Jeff Sharkey
 jshar...@google.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
-~--~~~~--~~--~--~---