Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Bugs

Touch screen not working with Android 4

Report bugs and issues

Touch screen not working with Android 4

Postby neilb » 09 Jun 2012, 23:17

I've had reports from users who've upgraded to the official release of ICS on their Sony phones that the touch screen no longer works in my apps. The app appears to run OK, but will not accept any user input once it's started.

There's been lots of vocal complaints from people running ICS custom ROMs since January, and obviously these aren't supported, but whatever the problem is, it looks like it's starting to show up in official ROMs now.

I can't test the latest UAT beta to see if it's fixed anything because the build process is broken if a wrapper is used, which my apps rely on.

http://www.stonetrip.com/developer/forum/viewtopic.php?f=43&t=25755
neilb
Platinum Boarder
Platinum Boarder
 
Posts: 463
Location: Adelaide, South Australia

Re: Touch screen not working with Android 4

Postby Fraser » 10 Jun 2012, 16:17

My wife has a Sony Tablet-S (nice tablet for the money), upgraded to Android 4 a week ago.

Shiva app multi touch screen works fine on it.

Can't speak for phones though?
Fraser Ashworth,
https://www.cortex7.net
User avatar
Fraser
Platinum Boarder
Platinum Boarder
 
Posts: 1050
Location: Europe

Re: Touch screen not working with Android 4

Postby neilb » 10 Jun 2012, 22:51

I've only had it reported for the official 4.0.4 ICS released by Sony last week for their phones.
neilb
Platinum Boarder
Platinum Boarder
 
Posts: 463
Location: Adelaide, South Australia

Re: Touch screen not working with Android 4

Postby NiCoX » 11 Jun 2012, 00:13

User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5642
Location: France

Re: Touch screen not working with Android 4

Postby neilb » 11 Jun 2012, 00:32

It doesn't quite sound the same because users are reporting that no touches are detected at all, but I'll ask a couple of affected users if they can try the screen off-on trick to see if it temporarily corrects it.

That Google bug report does look familiar though. It basically describes the touch input problem that you were able to fix late last year:

http://www.stonetrip.com/developer/forum/viewtopic.php?f=29&t=23968&p=42772
neilb
Platinum Boarder
Platinum Boarder
 
Posts: 463
Location: Adelaide, South Australia

Re: Touch screen not working with Android 4

Postby neilb » 13 Jun 2012, 03:31

One of the users gave me more detailed information and it's not the touchscreen at all - what's happening is that the welcome HUD is displayed after startup, and when the user clicks the "close" button the app freezes and has to be killed.

All the app's models and textures are loaded when the welcome screen appears, but they are invisible. The only thing that happens is that the parent of all the objects is made visible at which point I would guess that shaders are created, etc.

The app worked fine until the device was updated to ICS.
neilb
Platinum Boarder
Platinum Boarder
 
Posts: 463
Location: Adelaide, South Australia

Re: Touch screen not working with Android 4

Postby NiCoX » 14 Jun 2012, 09:14

Hi neilb,

The only thing that happens is that the parent of all the objects is made visible at which point I would guess that shaders are created, etc.

Ok, is there a way to get a logcat? (you may have crash reports on your google developer account)
User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5642
Location: France

Re: Touch screen not working with Android 4

Postby neilb » 15 Jun 2012, 12:55

One of the users has given me the logs of two of my four apps, and another has reported that all my apps are affected. These apps share a similar code base.

http://dl.dropbox.com/u/8570503/Solar%20Explorer%20Log%20-%20Sony.txt
http://dl.dropbox.com/u/8570503/Exoplanet%20Explorer%20Log%20-%20Sony.txt

This user reports that although the app looks like it's frozen, it's not. Only the three buttons on the welcome HUD work when the app starts. When the welcome screen's close button is hit, the app makes the objects in the scene visible and the HUD controls that appear at the bottom of the screen don't respond to taps.

With the welcome screen gone, the camera controls, which normally allow for 360 degree rotation and pinch-zooming, only permit a small amount of panning when the screen is touched. When it's released, the camera snaps back to where it started.

It sounds like a touch event that normally centers the camera to view an object when it is tapped, is constantly firing and overriding user input, giving the impression that the app has frozen.
neilb
Platinum Boarder
Platinum Boarder
 
Posts: 463
Location: Adelaide, South Australia

Re: Touch screen not working with Android 4

Postby NiCoX » 16 Jun 2012, 16:16

Hi,

Thanks for the details, we have other similar reports (also with Sony tablets), and will work on it next week. We should release a new UAT just after that, that will bring many enhancements for Android (faster loading time, no more "black screen", compatibility fixes, etc.).
User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5642
Location: France

Re: Touch screen not working with Android 4

Postby etXtra » 17 Jun 2012, 22:24

Hello, same problem for me: "Touch screen not working"
tested on : Xperia Pro, before the update all worked fine but since the ICS update any touch action is impossible !
app tested: my own shiva3d app, and it used work OK before...
note that the app where compiled for an older android version than 2.3 Gingerbread... and so, older than ICS...

-is it a bug coming from sony's update ??
-or is it compatibility issue between shiva3D's apps and sony's Xperia products ??
-is it because an app compiled for froyo and not for ICS can't work on ICS ??? (I mean that I did not installed the stuff needed to compile especially for ICS: Just installed Android SDK 2.1 to work with the shiva UAT... but not the Android SDK 4.0(!)... )

Please, I would really apreciate a solution to make things working again on my Xperia Pro as it is my only "test device" (I use it to test how my shiva3D's project works on android phones)...

As neilb said, it also seems that all the Xperia users are getting issues with these apps... (shiva3D apps)... So it is really important for everyone to get a solution as soon as possible !
etXtra
Junior Boarder
Junior Boarder
 
Posts: 39

Re: Touch screen not working with Android 4

Postby etXtra » 20 Jun 2012, 09:32

Ok, I've posted the previous message because my program no longer act as expected... but Right now I've noticed that the menu buttons are highlighting when I touch them but they can't be "clicked" so the expected action doesn't occur. for example the "start game" button can be highlighted when I touch it but when I release it the game doesn't start as it should (and as it did before the ICS update...) - (ICS = Ice Cream Sandwich - 4.0)

-so it seems that the touch screen works finally, (let me confirm that when I'll test it with a little testing app of mine )

I don't understand why my app act differently now, any solution/advice ???

PS: I've searched in the bugs section, and it seems that other users had similar issues:
http://www.stonetrip.com/developer/forum/viewtopic.php?f=29&t=25174&p=42595&hilit=touch
most touch events where disccarded because onTouchEvent(..) from S3DSurfaceView did not handle the newly masked touch events which are common on newer Android versions (> 2.2)


and there was an issue that has been fixed but that is, maybe, coming back with some android devices and ICS update:
http://www.stonetrip.com/developer/forum/viewtopic.php?f=29&t=23968&p=37462&hilit=multi+touch
What's happening is that the onTouchSequenceChange doesn't seem to be firing if there's been more than one touch and the location of the first touch hasn't changed.


- Regards -
Last edited by etXtra on 20 Jun 2012, 09:59, edited 1 time in total.
etXtra
Junior Boarder
Junior Boarder
 
Posts: 39

Re: Touch screen not working with Android 4

Postby neilb » 20 Jun 2012, 09:40

This is a problem specific to the ICS update by Sony. ICS from other manufacturers, such as ASUS, works correctly.

I think you are going to have to wait for the next UAT update for this to be resolved.
neilb
Platinum Boarder
Platinum Boarder
 
Posts: 463
Location: Adelaide, South Australia

Re: Touch screen not working with Android 4

Postby NiCoX » 20 Jun 2012, 12:59

Hi,

We should have a clear answer later today (or tomorrow), but the problem has already been identified: in the onTouchEvent method (in the view), the MotionEvent.ACTION_UP and MotionEvent.ACTION_CANCEL are never called (they *should* be, according to the doc). So, here is a potential fix we wrote, but that we did not test on the actual device yet:

Code: Select all
    //------------------------------------------------------------------
    // Touch input handling.
    //
    public void onTouchEvent ( int action, int cnt, float p0, float x0, float y0, float p1, float x1, float y1, float p2, float x2, float y2, float p3, float x3, float y3, float p4, float x4, float y4 )
    {
        if ( ! bPaused )
        {
            int     iActionMasked   = ( action & 0x000000ff ) ;
            boolean bNoMoreContacts = ( cnt == 0 ) ;
       
            if ( cnt == 1 )
            {
                switch ( iActionMasked )
                {
                    case MotionEvent.ACTION_MOVE        : engineOnMouseMove       ( x0, y0 ) ; break ;
                    case MotionEvent.ACTION_DOWN        : engineOnMouseButtonDown ( x0, y0 ) ; break ;
                    case MotionEvent.ACTION_UP          :
                    case MotionEvent.ACTION_CANCEL      :
                    case MotionEvent.ACTION_POINTER_UP  : engineOnMouseButtonUp   ( x0, y0 ) ; bNoMoreContacts = true ; break ;
                }
            }
         else if ( iActionMasked == MotionEvent.ACTION_POINTER_UP )
         {
                int      iActionPointer = ( action & 0x0000ff00 ) >> 8 ;
                switch ( iActionPointer )
                {
                    case 0 : p0 = 0.0f ; break ;
                    case 1 : p1 = 0.0f ; break ;
                    case 2 : p2 = 0.0f ; break ;
                    case 3 : p3 = 0.0f ; break ;
                    case 4 : p4 = 0.0f ; break ;
                }            
         }
       
            if ( bNoMoreContacts )
            {
                engineOnTouchesChange ( 0, 0.0f, 0.0f, 0, 0.0f, 0.0f, 0, 0.0f, 0.0f, 0, 0.0f, 0.0f, 0, 0.0f, 0.0f ) ;
            }
            else
            {
                engineOnTouchesChange ( ( p0 > 0.01f ) ? 1 : 0, x0, y0,
                                        ( p1 > 0.01f ) ? 1 : 0, x1, y1,
                                        ( p2 > 0.01f ) ? 1 : 0, x2, y2,
                                        ( p3 > 0.01f ) ? 1 : 0, x3, y3,
                                        ( p4 > 0.01f ) ? 1 : 0, x4, y4 ) ;
            }
        }
    }


I'll post more details later, in the mean time if you guys can test and let us know if you find something :)
User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5642
Location: France

Re: Touch screen not working with Android 4

Postby NiCoX » 21 Jun 2012, 14:43

Ok, for info this issue has been fixed. We are still on a last (minor) problem on some devices (totally unrelated to this one), and we will release the UAT 1.4.beta3 ;)
User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5642
Location: France

MERA

Postby etXtra » 28 Jun 2012, 18:49

Hi,

I've tried the same thing using the latest UAT 1.4.beta3 and...

...It Works !!!

very nice to be able to go on again !

I'm Sorry but I've some difficulties to blend more than 2 3dAnimations together...
So, Please, if you could help me, and check the code snippet I've posted in order to correct it... it would be nice because I'm losing my time trying to make it working alone (I don't get it how it works... I don't understand now) Here is the topic:

http://www.stonetrip.com/developer/forum/viewtopic.php?f=13&t=26054

Please Help,
Thanks...

- Regards - :D

PS:
When I see how bad my smartphone is since I've updated to ICS.... I feel sad ! the phone is laggy, slower, the CAMERA works slowly... many issues ! no real bug BUT very slow ! (Xperia). my advice would be don't install this update on your smartphone UNLESS it was meant to run under ICS (e.g. : a phone released in middle 2012) !!!
etXtra
Junior Boarder
Junior Boarder
 
Posts: 39


Return to Bugs