android game always freezes only on samsung galaxy s2 - android

our new game seems to be smooth on other phones but on samsung gaxalxy s2 it always freezes and crashes. the application uses gdx lib. the issue seems to be connected with the music.
while the music is turned off from the code the gameplay is smooth, but after turning it on the whole series of crashes and freezes start.
Any solutions or advice on this ?
You can check the game here Fish vs Pirates
Thanks in advance.

The Samsung Galaxy S2 has a known audio bug: http://code.google.com/p/android/issues/detail?id=17623
Supposedly using the MediaPlayer API instead of the SoundPool API is supposed to work-around the issue. There are also reports that this is fixed in the ICS update. (If you're not using the SoundPool API, then you're probably not seeing this particular issue.)

Related

SoundPool issue - bad performance on a specific device/API level

OK, this one is a bit odd.
My app is an OpenGL ES 2.0 game and uses MediaPlayer to play the background music (not on a service as I want the music to stop when the app is send into the background) and SoundPool to play the (various, short) sound effects.
It's been tested on aprox 18 devices and a wide range of OS versions with no problems. However I recently ran it on a Hudl2 tablet with Lollipop installed and the performance was pretty bad (very choppy).
If I use my games settings to turn off the sound, it runs fine (strangely, if I leave the sound on and turn off the music, it also runs fine).
However, there are a lot of questions here relating to SoundPool causing lag, so I'm going with SoundPool being the likely cause.
Things I've tried are:
Playing a muted sound in my gameloop
Using MP3's instead of .OGG's
Reducing the number of simultaneous streams
Playing the sounds from the UI Thread (normally I call 'play' from the GL Thread)
Checking for API Level and using SoundPool.Builder when it detects API 21+ and the older constructor method when it finds an API of <21
Turning off USB Debugging and disconnecting from my dev computer
Removing my AdViews (in case they were causing the problem - clutching at straws here)
Disabling Hardware Acceleration in my manifest (more clutching at straws)
Unfortunately, nothing that I've listed makes any difference.
After much research, I found some people saying that soundPool should be run on a new thread, however, I already tried it on the UI thread and it made no difference at all.
The only other thing I can think of is that this is some kind of compatibility issues between the Hudl2 and Lollipop.
Does anyone have any other ideas as to what may be causing this lag on one specific device, with this specific OS Version (Lollipop)), or has anyone come across anything remotely similar? And if so are there any more suggestions?
Edit
I forgot to mention that I ran it on the same device (Hudl 2) with KitKat installed and it was perfectly fine. And on my Nexus 10 with Lollipop again, it's perfectly fine.

Libgdx game Freezes or show black screen after sometimes or on restart of devices

My libgdx game is running perfectly for somtimes on real devices. Samsung galaxy s# and Google nexus tab. But after opening my game again after some time my app freezes my samsung mobile and shows black screen on google nexus tablet.
I have carefully disposed Spritebatch, stage, and all textures and sound, also Assetloader as per my knowledge.
I have also tried checking my game after restarting my device. So my game runs perfect before but after restarting it is in same freez or black screen condition.
P.S : I am just using Google analytics in my game.
Any idea what can I do more? I have read many questions regarding it here and on Google and did whatever considerable solutions are available but no luck. I have also checked this Black Screen After Restart but no luck for me.

widget problems on Samsung Galaxy S3

We released a new app which has a widget. This works fine so far on all devices, however on Samsung Galaxy S3 we get reports that it stops working in certain situations.
Unfortunately I do not have such a device to check myself - therefore I would just like to know if anyone had some similar experience.
The widget stops working after the screen redraws itself (which seems to happen on the S3 regularly and randomly). Another user reported that the widget stops working after invoking the Task Manager and "clearing memory". There is no crash - in this case unfortunately.
The app has been tested on many devices with different Android versions - so far we have never seen such a random screen update which caused the widget to stop working.
I am thankfull for any hints.
...in fact it turned out to be a fault in Samsung's Android implemenation - they promised to fix it in the upcoming release. Thanks to Samsung amazing support we finally could confirm this issue !

Error code 1, -110 in media player android

I got the MediaPlayer error code as (1,-110) on BeagleBoard Hardware running ICS.The code runs fine on android tablets with ICS but I get a dialog box as "Sorry,this video cannot be played" error on BeagleBoard only.Any suggestions.
This is a time out error from the MediaPlayer:
http://developer.android.com/reference/android/media/MediaPlayer.html#MEDIA_ERROR_TIMED_OUT
Also, it may happen with an issue with Samsung firmware on Android 4.1.2, I've seen it in Galaxy S2 mini and Galaxy S3. Take a look here:
https://stackoverflow.com/a/18378273/3032209
You could solve it if you play the file it with another library, which will have the adequate codecs, like aacdecoder-android
I know my answer is too late to your question and I think you were able to fix this problem by now, but if not and for those people who are struggling with the Media Player Error (1, -110) (like I did the whole day today, Android HTC Desire X Jelly Bean 4.1.1), maybe this is the solution for you:
Just reboot your android (or close all the apps, which are using the Media Player).
In my case it was not a programming error, I just had to many apps open using the Media Player Instance, which led to that time out and I could not use it anymore.

Android Soundboard Help

Someone is making a simple soundboard for me but when I try it on the emulator, it loads very slow(10+ seconds), and every sound that is longer than maybe 4 seconds gets cut off. The person mentioned that he is using SoundPool. Anyone know what is wrong and what might fix it?
Generally, Emulators are much slower than real devices.
I created a soundboard with soundPool and sounds were very slow and lagging on emulators while on my Samsung Galaxy S2 it was perfect !!
Try running it on real device

Categories

Resources