5

I can't find any better wording to my question.

At some point inside my app I have set up some pretty intensive animation. Thing is, on high-end devices the animation runs smoothly and is pleasant to the eye. On the other hand, one low-end device I tested had a pretty bad performance while animating.

Trying to put user experience first, I'd like to run this stuff on devices that are computationally sufficient, and somehow "turn it off" on other devices.

I have thought for a while on how to discriminate between devices. The only thing that comes to my mind is API level: considering the platform fragmentation and manufacturers delays, I believe there should be some kind of correlation between API level and performance. But there might be something better.

Do you have any idea?

Just to clarify, the animation is not something I can lighten or simplify in any way (e.g., using smaller size drawables, worse quality bitmaps, .... ). It's mainly measuring and layout stuff.

Please feel free to edit the tags I chose.

natario
  • 24,954
  • 17
  • 88
  • 158
  • Couple suggestions - Read the bogoMIPS value, read the number of cores, read the gpu model and decide based on those. For the low end devices, maybe a recorded animation (Unless you are animating UI components around, in which case maybe just a simple fade in out as a opposed to movement?) – JosephGarrone Dec 23 '15 at 00:45
  • @Joseph thank you. I'm not familiar with any of those except for number of cores, but as far as I remember it is not easy to read on android (e.g. platform APIs do not return a reliable number). Maybe that's not true anymore. – natario Dec 23 '15 at 00:58
  • Maybe try something like - http://stackoverflow.com/questions/3021054/how-to-read-cpu-frequency-on-android-device (Second answer) – JosephGarrone Dec 23 '15 at 01:03
  • bogoMIPS is just a very rough indicator of CPU performance, you would likely have to play around with a "magic number" to determine whether to disable or enable animations – JosephGarrone Dec 23 '15 at 01:04

1 Answers1

1

The first time your app runs, you could run some kind of micro-benchmark that would measure the CPU performance for no more than a second or two. I would suggest not disabling the animations automatically, but warn the user if the device seems slow and ask if they'd like to disable them.

Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82
  • Thank you for your answer. You have a good suggestion but I'm not sure it's worth it: I'd have to set up the benchmark, tune it to make a decision, and moreover slow the app at startup, just to determine if a UI "decoration" should be there. – natario Dec 23 '15 at 00:55