[android-developers] Why Android Studio IDE shows redundant modules in "Project View" pane

2016-08-11 Thread Toothy Bunny
Hi, I opened Google's NDK sample "Teapot" project in Android Studio 2.1. Everything works well except one thing confuses me. The "Teapot" project contains two modules "App" and "NativeActivity". Under "Project View" in the left-hand pane, I saw two "redundant node" of "app" and

[android-developers] OpenGL App crashes on Nexus One

2010-02-02 Thread Toothy Bunny
Hi All, Do not know anybody could give a hint for the problem I have. Our OpenGL games are built based on SDK 1.2 and runs almost all Android devices (from OS 1.2 ~ 2.0) except Google Nexus One (OS 2.1). On Nexus One, it generates the following exception: 02-01 09:26:28.319: DEBUG/libEGL(2340):

[android-developers] How can we restart an Activity properly?

2009-01-02 Thread Toothy Bunny
Hi All, I created a restart() method to restart an Activity, there are some reasons for us to do this since there are some thing that we can not do unless we make the Activity completely restarted, for example, if the SurfaceView is created in GPU memory and we want to move it back to normal

[android-developers] Re: How can we restart an Activity properly?

2009-01-02 Thread Toothy Bunny
Just want to add one more thing: I printed out the instance count by this.getInstanceCount(), the result is that the instance count is increased once the restart() is called, like 1, 2, 3, ..., which means the old instance is not killed. We need to kill the old instance in the newly restarted

[android-developers] T-Mobile G1: How to properly resume View's focus when Activity resumed from screen black-out?

2008-12-31 Thread Toothy Bunny
Hi All, If the G1 is idle for short period (no user input) while a Activity is still running, the screen blacks out and the user input is locked. When the screen is unlocked by the user again and screen light up, we found the View object does not have input focus, as the result, the application

[android-developers] Re: OpenGL on T-Mobile G1: How to turn OpenGL on and off with SurfaceHolder ?

2008-12-26 Thread Toothy Bunny
want, I can send you the APK file of our X-benchmark, from which you can see that on emulator, we successfully enter and quit 3D rendering with the above solution. Hongkun www.omnigsoft.com On Dec 26, 7:10 pm, Mathias Agopian pixelflin...@google.com wrote: Hi, On Dec 26, 5:00 am, Toothy Bunny

[android-developers] OpenGL on T-Mobile G1: How to turn OpenGL on and off with SurfaceHolder ?

2008-12-25 Thread Toothy Bunny
Hi All, When designing a 3D game running on Android, we need to enter into 3D (OpenGL) rendering and quit back to 2D rendering from time to time, like this control flow: game title page (2D) - game main menu (2D) - game window (3D / OpenGL) - game main menu (2D). We have made this working well on

[android-developers] Suggestions Needed: can not play sound files under assets folder

2008-12-22 Thread Toothy Bunny
Hi All, I have been struggling with playing a WAV file music.wav under assets folder of my APK file. The WAV file has been proven good by using Android SDK's media sample code. I tried the following methods, all of them generates java.io.IOException: Prepare failed.: status=0xFFFC. Method 1

[android-developers] Re: Suggestions Needed: can not play sound files under assets folder

2008-12-22 Thread Toothy Bunny
Hi All, After searching developer group, I found out the problem might be related to the file permission, because Android Media player does not have permission to access application's data directory. Here is another developer's post about Media Player's problem. Hongkun www.omnigsoft.com

[android-developers] Canvas.drawBitmap(int[] colors, ...) creates wrong alpha blending

2008-12-10 Thread Toothy Bunny
Hi All, I'm trying to use Canvas.drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint) to draw an integer color array containing an image pixels array in the format of ARGB_ (with alpha channel). This function is provided in SDK

[android-developers] Re: Canvas.drawBitmap(int[] colors, ...) creates wrong alpha blending

2008-12-10 Thread Toothy Bunny
I could not find a way to attach pictures with my post, so I post the screen shot on the web, and here is the link: The test screen shot: http://www.omnigsoft.com/TechnicalSupport/TestResult.png The original PNG image (with alpha channel) I used for the test:

[android-developers] Re: How to get a GL11Ext instance to call OpenGL Extension functions?

2008-04-02 Thread Toothy Bunny
www.omnigsoft.com On Mar 31, 4:12 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, Yes, a cast is all you need. On Mon, Mar 31, 2008 at 1:09 PM, Toothy Bunny [EMAIL PROTECTED] wrote:  Hi Android Graphics Team,  I would like to call OpenGL extension function:  void glDrawTexiOES(int x, int y, int z

[android-developers] How to get a GL11Ext instance to call OpenGL Extension functions?

2008-03-31 Thread Toothy Bunny
Hi Android Graphics Team, I would like to call OpenGL extension function: void glDrawTexiOES(int x, int y, int z, int width, int height) to render a 2D image directly in 3D scene without bothering to use OpenGL quad. The question is, how can I get a GL11Ext instance? I could not find any