Samsung Galaxy Tab produces jerky animations at the start of the game - android

First to thank you all for your great help, I have finally published my game puzzle, both full and free version. Not sure how would I do it without Stackoverflow.
I also learned a lot by helping others.
The issue I am having is that when I start applications I have developed, on Samsung Galaxy Tab, animations are jerky at first 10 seconds or so, then they become smooth. This is not the case on HTC desire or Samsung Europe mobile.
It does not matter whether the animation is a frame by frame canvas drawing or built in android view animations.
I wonder if there is something I can do to prevent this slow down; is it something to do the way Galaxy Tab buffers when loading an application and optimising the resources? Or is this to do with the fact that it has a higher resolution screen… or both.
One way to deal with this could be to create some kind of animated intro in the same activity which would preload/optimise Galaxy Tab for the game.
EDIT after few months of development:
When testing an app on Galaxy Tab it starts slow and the animation is jerky, but if I restart the app and/or unplug the USB link, then it run fast as it should.

It's hard to say without seeing any of you're code. I couldn't say if it's a general problem with your code that only becomes apparent on slower devices, or if it is actually an issue with the Tab.
When testing my applications on the Galaxy Tab the general user interface is slower than on a Galaxy S (2.2), Nexus S or HTC Hero (2.1) but there are reasons for this:
Nexus S has a better GPU and Android version
Samsung have enabled some hardware-acceleration wizardry in their later Galaxy S builds
The resolution of the Galaxy Tab is higher
My main experience has been that the effect of the garbage collector (GC) is much more prominent on the Tab, therefore it could be something to do with your memory management -- are you creating objects in your onDraw method?

Related

Google VR + Unity = tracking stuttering / jittering / choppy

Launching GVRDemo scene using Unity5.4.2f2-GVR13 installation package I'm experiencing unsteady tracking on my Samsung Galaxy S7. As you can see on an attached video it's not caused by low frame rate nor any of my code since the only thing I've changed in the scene is switching the cubeRoom object with a textured sphere object which better visualises the issue:
https://youtu.be/_NRQNbtdpuI
It doesn't matter if I change the quality setting from Fantastic to Fastest.
As you can see the frame rate doesn't drop around the stuttering moments, so it's not about the CPU/GPU performance
As I test the Google Street View app for example, there's no such issue – is it because it's been written natively for Android?
On the other hand I've noticed games like VR Fantasy with tracking system behaving differently – more smoothly due to the delay in the reaction time regarding the device's movement (looks nice, but causes nausea after 5 seconds). This makes me believe there is an issue with Google VR tracking.
Is anyone experiencing the same thing? What might be the reason for it?
I am also testing a simple VR app made with Unity (5.6b9), and i'm finding that Android performance is rather poor. This is the case on cheap phones (Moto G, $150) as well as fancy phones (Nexus 5X, Asus ZenFone 3) and even expensive phones (Samsung S6).
I'm particularly puzzled by how poor the performance of a VERY simple VR app made with unity is (empty scene, a cube and a sphere, no special lighting, single pass rendering...). The Samsung S6 performes very well with native GearVR apps, or photos/videos. All the phones perform very well with things like street view or youtube.
The same unity app running on iOS outperformer all the androids by a wide margin.
Are there some tricks we're not aware of for getting performance out of android?
I'm using Unity5.4.2f2-GVR13 too, and I think it's just random.
Charging up your phone and controller, and rebooting the phone seems to help a lot.

Android app much, much slower on Galaxy S 4

My Android App is very slow on the Galaxy S4. And for SLOW I mean, 10 - 20 times slower than it is on a Galaxy SII... the weird thing it's that it is fast enough on the S2, galaxy tab 10.1, galaxy note 10.1 and a bunch of other samsung devices; it is perceptibly slower on the S3, and VERY slower on the S4...
It's a big app that uses a lot of animations and loads a lot of images from the assets folder and scales them...
I know that what I wrote it's not very helpful... did somebody get the same issue on some app?
No experience with the specific Galaxy S4. But what you can do to find potential issues is to check the Show GPU overdraw setting in developer settings. It shows areas that are drawn multiple times, which is very slow.
Besides that, check the hierarchy viewer to see if your layout trees are too deep, StrictMode to see if you are blocking the UI thread, and lint to do static code analysis for general problems.
I've found the problem: I don't know why but it slows when it loads images from the assets folder... it works really smooth if I put all those images in the drawable folder. The problem, now, is that i can't do it because my app will download the images from the internet (it will download a zip and put the images in a folder of the application).
Will try something else...
EDIT:
I am now using picasso for android and it works really smooth... recommended!!!

Android ViewPager performance on Galaxy Tab 2

I have an application which uses Android ViewPager (7 views, pretty complex with images and animations). This application runs fantastically on my Asus Eee Pad. It is just gorgeous.
I also have a Galaxy Tab 2 10.1 which almost can not run the app... despite it's brand new and theoretically more powerfull than my EEE Pad. I would like to mention both terminals run Android 4.0.3 and their screen size is identical (1280x800). Application runs in landscape mode.
The application does not use sql, or internet access, just animations on different views and the swipe effect of the ViewPager.
I checked I think everything, from heap, from lint, from basically all the available tools for profiling but nothing seems to improve my UI performance on the Galaxy Tab 2... I wonder if there isn't some difference in the hardware finally, where the ASUS will use GPU to render the UI and the Galaxy Tab 2 its CPU...
I was wondering finally, if any of you, noticed some similar issues on Galaxy Tab or other tablets when comparing your app behaviors on multiple targets...
Cheers!
Paul
--- added September 6th ---
Well, it seems that, despite the Galaxy tablet should use hardware acceleration, it does not. When I am forcing each xml layout with android:layerType="hardware" and
v.setLayerType(View.LAYER_TYPE_HARDWARE, null);
    ObjectAnimator oaAlpha = ObjectAnimator.ofFloat(v, "alpha",0f, 1f);
it works finally better... even if it is not as smooth as on the Asus one
Finally, I discovered - and this is really odd - that the performance issue was created by the fact that the font size was too high !?!
It was a sad experience... but for some stupid reason the Galaxy Tab 2.0 was having major issues rendering texts written with big sized letters. And it is related to the Galaxy Tabs (so I imagine hardware) because I tried with So just redesign your app with smaller fonts and don't forget to complain to Samsung.

Galaxy S 3 memory problems

I have a game which does a whole lot of image-scaling (once every time you enter a level). The scaling is done with a simple call to Bitmap.createScaledBitmap(Bitmap). I realize that until the garbage collector comes, I effectively have two copies of these images, but I've tested it to death on several Android devices, and only recently got a Galaxy S3. You would have thought that if a game runs perfectly well on the Xoom2, the Galaxy Tab and the Galaxy S2, to say nothing of lower-end models like the Galaxy Y and Galaxy Ace, it would run even better on the Galaxy S3. Embarrassingly, it doesn't, and all-too-often I run out of memory. I think I've optimized my game about as far as I'm willing to (admittedly, some optimization was called for). I'd like to understand the problem. Does anyone know of any memory-management problems regarding the S3? Is the screen size-RAM ratio worse than on, say, the Galaxy Tab? Thanks in advance.
If you're are scalling imgs you should use .isSampleSize in the BitmapFactory.Options before makes the bpm.

Galaxy 10.1 runs app slower than Thunderbolt

So I recently created a game with several activities. On my HTC Thunderbolt, all parts of the game seem to be running very fast; however, on my Galaxy 10.1, two of my five activities are running extremely slow (i.e. screen fading is slow, enemies and cursor are moving slow as well). I don't know what is wrong. The other activities are running at or at least near the speed my thunderbolt was running at. Can someone please help me?
Try enabling hardware accelerated graphics, which is available on Android 3.0+.
Or, if you are serious about game performance, use OpenGL instead.

Categories

Resources