Access to DATA BASE from Android application

by Mongi » Wed, 11 Nov 2009 23:38:23 GMT


Sponsored Links
 Hello Friends,

Can you explain how  use Context to access to DATA BASE (MySQL
installing in different host) from Android application ?

--



Other Threads

1. need help pulling/appling patches to kernal

I was wondering, if i have 2 kernals, one from stock android source,
and one from cyanogenmod, how do i pull off the patches he has in his
source and apply to stock kernal? I can't just use his kernal because
im porting his rom to a device other then the one his is built for,
and these patches are requried for his version of android to run.
Thanks!

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Basic OpenGL ES Texture problem

I'm having great difficulty getting basic textures to work in an
OpenGL ES app on my Droid (2.1-update1). I trying to render a simple
textured quad - four vertices, two faces, with normals and texture
coords. When rendered, the texture is garbled and full of static,
similar to TV noise.   The basic colors from the texture map are
there, but obviously the texture isn't being read or applied
correctly.

My texture load sequence is simple :
int[] textures = new int[1];
gl.glGenTextures(1, textures, 0);
Bitmap bmp = BitmapFactory.decodeResource(cx.getResources(),
R.drawable.img);
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0);

I've tried setting various parameters for glTexParameterf at texture
load time, but to no avail :

gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_REPEAT);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_REPEAT);
gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
GL10.GL_REPLACE);

My render sequence is also very simple :

(setup)
gl.glEnable(GL10.GL_DEPTH_TEST);
gl.glDepthFunc(GL10.GL_LEQUAL);
gl.glDisable(GL10.GL_DITHER);
gl.glDisable(GL10.GL_FOG);
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST);
gl.glDisable(GL10.GL_COLOR_MATERIAL);
gl.glShadeModel(GL10.GL_SMOOTH);

(render)
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vertices);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glTexCoordPointer(2, GL10.GL_SHORT, 0, textureCoords);
gl.glBindTexture(GL10.GL_TEXTURE_2D, textureName);
gl.glDrawElements(GL10.GL_TRIANGLES, numIndices,
GL10.GL_UNSIGNED_SHORT, indices);
...

I've tried various texture image file formats, all sized ^2, placed
under the drawable-nodpi folder. PNG, BMP, GIF, JPEG all give me the
same result. I've also tried 8 and 16 bit color depths. I'm running
this on top of GLSurfaceView with the default EGL config.

Can anyone shed some light on why my texture is coming through
garbled?

Below is my index/vertex/normal/texcoord data. I've been over it a
dozen times but perhaps I missed something.

Adding vertex (vIndex 0) Vector3F(77.0492, 0.0, 121.5453)
Adding vertex (vIndex 1) Vector3F(478.1715, 0.0, 121.5453)
Adding vertex (vIndex 2) Vector3F(478.1715, 227.0969, 121.5453)
Adding vertex (vIndex 3) Vector3F(77.0492, 227.0969, 121.5453)
Adding normal Vector3F(0.0, 0.0, 1.0)
Adding normal Vector3F(0.0, 0.0, 1.0)
Adding normal Vector3F(0.0, 0.0, 1.0)
Adding normal Vector3F(0.0, 0.0, 1.0)
Adding textureCoords Vector3F(0.0, 0.0)
Adding textureCoords Vector3F(1.0, 0.0)
Adding textureCoords Vector3F(1.0, 1.0)
Adding textureCoords Vector3F(0.0, 1.0)
Adding face indexes 1,2,3
Adding face indexes 3,4,1

-- 

3. Native RTP stack on Android

4. Shuttle component in Anroid ???

5. Android Game Development Scaling

6. why my ListView didn't show?

7. Rendering Alpha Causes Frame Rate to Plummet on HTC Magic