Android 3.0 Hardware Acceleration Dos and Don'ts
Date Added: June 08, 2011 06:34:15 AM | Author: Family Friendly Directory | Category: Business: Information Technology: Software
The new and improved Android 3 (referred to as Android from here on) smart phones are in. In basic terms, Android is a phone that has about everything that you could wish for in a cellular phone. Games, browsing the web, social networking and customization are some of the attributes that the Android has to offer. The Android stands on the 4G cellular network, the latest and fastest cellular network available today. The increased bandwidth of the 4G network allows for faster data transfer as opposed to the earlier 3G network. Web browsing and photo uploads are normalized. But the true beauty of the Android is Open-Source. Open source is a relatively new concept of programming that allows for freedom within the programming community. Anyone who wishes to program can modify and distribute Android open source code. You can actually program your Android operating system to perform faster!

One of the new features of the Android is "hardware-accelerated 2D graphics." To the average person this means better games and graphics on the Android phone display. For the community of software developers this means they can reprogram the Android hardware acceleration. Hardware acceleration is crucial to OpenGL games. Some browsers and calendar programs use this feature as well. Novice programmers and seasoned software developers are reprogramming Android operating systems to take advantage of what 2D hardware accelerated graphics has to offer. If you reprogram the Android hardware acceleration there are some dos and don’ts that you need to consider.

The first thing to do is to determine if you are using normal drawables or widgets. If you are reprogramming draw code you will need to make some modifications. By default hardware acceleration on the Android is in the off or disabled condition. Initiating or enabling Android hardware acceleration will force all draw operations to be processed on the GPU (Graphics Processing Unit). Developers use the term "rendering pipeline" to describe the conduit between a graphically intense Android application and the GPU. Do not ignore problems that may arise with applications using Android hardware acceleration. Do use the tools that the Android operating system provides. One of the tools is giving programmers an option to enable or disable 2D hardware acceleration for specific types of activity.

The Android 3 gives you the option of activating or deactivating 2D hardware acceleration at the Application, Activity, Window and View stages. You can even initiate acceleration for a particular window only when it needs to run or at "runtime." Do not attempt to release hardware acceleration on a window point. Do release on the view. When using a graphically intense application check to make sure the application is taking advantage of hardware acceleration when needed. There is command code that allows you to easily check. Do take advantage of this command code. Do not use the View command instead use the Canvas command to receive better results. Do be aware of the hardware acceleration commands that are not supported on the Android. Do be aware of commands that may act differently than expected on the Android. To get a list of the commands to be aware of go to this webpage.

Do reduce Views in an app. Do not overdraw and do not use draw methods to generate render objects. Do limit how many times you modify shapes. Do constrain bitmap modifications. Do be careful when using Alpha commands to limit GPU usage. To get details on the topics discussed in this article, go the "Android Developers Blog", read about and see actual code to use with your new Android 3.0 phone.