iTouchMouse project does not run on Android?

Previous topic - Next topic

turnerb

I have downloaded and run the iTouchMouse demo on my Windows machine, my Touchpad, Palm Pixi, Palm Pre, but when i try and run it on my Android Photon 4G it does not start up.  I think I have seen issues with Android and multi-touch but nothing specific.

Two questions:
1) Does this demo work for anyone on an Android device?
2) How does one go about Debugging an issue on device in GLBasic?  I did not see anything in the Help that detailed how to debug on device, or if it is even possible.

Thanks

MrTAToad

I dont think its possible on the device, beyond using DEBUG/STDERR/STDOUT to write to the log file.  Haven't tested the iTouchMouse project on an Android device yet.

Kitty Hello

in glbasic/compiler/platform/android/bin there's a file "_logview.bat". If you start that, you see the logfile of Android (trimmed to SDL/glbasic output). With STDOUT you can print to this log.



turnerb

Here is what I have determined:

I can make things work by modifying the Function updateMice.  If I change the FOR LOOP to any number less than 5, I dont crash, and I can get two sets of mouse coordinates (not more than 2!).  If I modify the FOR LOOP to 0 to 5, like below, I get the crash:

FUNCTION updateMice:
   FOR imouse% = 0 TO 5 //GETMOUSECOUNT()-1
      SETACTIVEMOUSE imouse%
      MOUSESTATE mx%, my%, b1%, b2%
      mouse[imouse].x=mx
      mouse[imouse].y=my
      mouse[imouse].active=b1
   NEXT
ENDFUNCTION

I guess my brand new dual core super Android phone (I am being sarcastic) can only handle two touches?  the WebOS family of products works more like Apple and handles all 5...

Do you think this is a limitation of the phone, the OS, or something in the GLBasic implementation of GETMOUSECOUNT()?


Here is the output of _logview.bat when it fails to run:
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
10-19 14:31:15.498 29805 29805 I glbasic : onCreate
10-19 14:31:15.498 29805 29805 I glbasic : Updating media files
10-19 14:31:15.498 29805 29805 I glbasic : assets found, copying...
10-19 14:31:15.498 29805 29805 I glbasic : assets still up to date, proceed to main...
10-19 14:31:15.498 29805 29805 I glbasic : done with updating
10-19 14:31:15.498 29805 29805 I glbasic : external files dir is /data/data/com.glbasic.itouchmouse/files
10-19 14:31:15.518 29805 29805 I glbasic : onResume()
10-19 14:31:15.718 29805 29805 I SDL     : pixel format RGB_565
10-19 14:31:15.718 29805 29817 I SDL     : SDL_Android_Init()
10-19 14:31:15.718 29805 29817 I glbasic : debug works at all
10-19 14:31:15.718 29805 29817 I glbasic : preplic
10-19 14:31:15.718 29805 29817 I glbasic : lic done
10-19 14:31:15.718 29805 29817 I glbasic : timer
10-19 14:31:15.728 29805 29817 I glbasic : rbow
10-19 14:31:15.748 29805 29817 I glbasic : rbow init
10-19 14:31:15.748 29805 29817 I glbasic : SDL_init video
10-19 14:31:15.759 29805 29817 I glbasic : SDL_GetVideoInfo = 360x640 @ 16 bpp
10-19 14:31:15.759 29805 29817 I glbasic : Setting video mode: 360x640x16 fl=4800000
10-19 14:31:15.759 29805 29817 I SDL     : [STUB] GL_LoadLibrary
10-19 14:31:15.759 29805 29817 I SDL     : Starting up OpenGL ES 1.1
10-19 14:31:15.808 29805 29817 I glbasic : SDL_SetVideoMode seems to be 1
10-19 14:31:15.828 29805 29817 I glbasic : get accurate timer - 1st call
10-19 14:31:15.828 29805 29817 I glbasic : flip - 1st call
10-19 14:31:15.848 29805 29817 I glbasic : BGRA ext supported
10-19 14:31:15.848 29805 29817 I glbasic : Texture size limit: 2048
10-19 14:31:15.848 29805 29817 I glbasic : init fbo
10-19 14:31:15.848 29805 29817 I glbasic : 2D VP
10-19 14:31:15.848 29805 29817 I glbasic : OGRB init [OK]
10-19 14:31:15.848 29805 29817 I glbasic : Cptn
10-19 14:31:15.848 29805 29817 I glbasic : Network
10-19 14:31:15.848 29805 29817 I glbasic : Input
10-19 14:31:15.848 29805 29817 I glbasic : Window mode
10-19 14:31:15.848 29805 29817 I glbasic : Create DXin
10-19 14:31:15.848 29805 29817 I glbasic : sdl_grab
10-19 14:31:15.848 29805 29817 I glbasic : reptr
10-19 14:31:15.848 29805 29817 I glbasic : getexe
10-19 14:31:15.848 29805 29817 I glbasic : cd
10-19 14:31:15.848 29805 29817 I glbasic : set cdir to: /data/data/com.glbasic.itouchmouse
10-19 14:31:15.848 29805 29817 I glbasic : exepath=curdir= /data/data/com.glbasic.itouchmouse
10-19 14:31:15.878 29805 29817 I glbasic : set cdir to: files
10-19 14:31:15.878 29805 29817 I glbasic : Init Finalized
10-19 14:31:15.878 29805 29817 I glbasic : Rbow::SetScreen( 320,480)
10-19 14:31:16.028 29805 29817 I glbasic : Shut down GLB
10-19 14:31:16.178 29805 29817 I glbasic : glb is shut down
10-19 14:31:16.178 29805 29817 I SDL     : [STUB] GL_UnloadLibrary

Thanks

MrTAToad

The problem is that GETMOUSECOUNT isn't being used to initialise the mouse array (probably lower than the value returned)...

mentalthink

Put

getmousecount()   // whitout -1 ,

for me works.

MrTAToad

When defining DIM yes, but not in the loop