android.permission.INTERNET
Allows the app to create network sockets and use custom network protocols. The browser and other applications provide means to send data to the internet, so this permission is not required to send data to the internet.
android.permission.GET_ACCOUNTS
Allows the app to get the list of accounts known by the phone. This may include any accounts created by applications you have installed.
android.permission.USE_CREDENTIALS
Allows the app to request authentication tokens.
android.permission.ACCESS_NETWORK_STATE
Allows the app to view information about network connections such as which networks exist and are connected.
android.permission.ACCESS_WIFI_STATE
Allows the app to view information about Wi-Fi networking, such as whether Wi-Fi is enabled and name of connected Wi-Fi devices.
android.permission.CHANGE_WIFI_STATE
Allows the app to connect to and disconnect from Wi-Fi access points and to make changes to device configuration for Wi-Fi networks.
android.permission.WRITE_EXTERNAL_STORAGE
Allows the app to write to the SD card.
android.permission.READ_SYNC_SETTINGS
Allows the app to read the sync settings for an account. For example, this can determine whether the People app is synced with an account.
android.permission.READ_SYNC_STATS
Allows an app to read the sync stats for an account, including the history of sync events and how much data is synced.
android.permission.VIBRATE
Allows the app to control the vibrator.
android.permission.NFC
Allows the app to communicate with Near Field Communication (NFC) tags, cards, and readers.
com.google.android.providers.gsf.permission.READ_GSERVICES
Allows this app to read Google service configuration data.
android.permission.READ_CALENDAR
Allows the app to read all calendar events stored on your phone, including those of friends or co-workers. This may allow the app to share or save your calendar data, regardless of confidentiality or sensitivity.
android.permission.WRITE_CALENDAR
Allows the app to add, remove, change events that you can modify on your phone, including those of friends or co-workers. This may allow the app to send messages that appear to come from calendar owners, or modify events without the owners' knowledge.
android.permission.WRITE_SYNC_SETTINGS
Allows an app to modify the sync settings for an account. For example, this can be used to enable sync of the People app with an account.
android.permission.WAKE_LOCK
Allows the app to prevent the phone from going to sleep.
com.google.android.c2dm.permission.RECEIVE
Allows apps to accept cloud to device messages sent by the app's service. Using this service will incur data usage. Malicious apps could cause excess data usage.
com.google.samples.apps.iosched.permission.C2D_MESSAGE
Unknown / User defined
com.google.samples.apps.iosched.permission.MAPS_RECEIVE
Unknown / User defined
android.permission.READ_EXTERNAL_STORAGE
Allows the app to read the contents of your SD card.
com.google.samples.apps.iosched.explore.ExploreIOActivity
com.google.samples.apps.iosched.myschedule.MyScheduleActivity
com.google.samples.apps.iosched.explore.ExploreSessionsActivity
com.google.samples.apps.iosched.settings.SettingsActivity
com.google.samples.apps.iosched.ui.SearchActivity
com.google.samples.apps.iosched.feedback.SessionFeedbackActivity
com.google.samples.apps.iosched.welcome.WelcomeActivity
com.google.samples.apps.iosched.videolibrary.VideoLibraryActivity
com.google.samples.apps.iosched.videolibrary.VideoLibraryFilteredActivity
com.google.samples.apps.iosched.session.SessionDetailActivity
com.google.samples.apps.iosched.map.MapActivity
com.google.samples.apps.iosched.social.SocialActivity
com.google.samples.apps.iosched.about.AboutActivity
com.google.samples.apps.iosched.ui.TaskStackBuilderProxyActivity
com.google.samples.apps.iosched.debug.DebugActivity
com.google.samples.apps.iosched.debug.actions.ViewFilesInAppFolderActivity
com.google.samples.apps.iosched.receiver.SessionAlarmReceiver
com.google.android.gms.analytics.CampaignTrackingReceiver
com.google.samples.apps.iosched.gcm.GCMRedirectedBroadcastReceiver
com.google.samples.apps.iosched.sync.TriggerSyncReceiver
com.google.samples.apps.iosched.appwidget.ScheduleWidgetProvider
com.google.samples.apps.iosched.service.SessionAlarmService
com.google.samples.apps.iosched.service.SessionCalendarService
com.google.android.gms.analytics.CampaignTrackingService
com.google.samples.apps.iosched.gcm.GCMIntentService
com.google.samples.apps.iosched.sync.SyncService
com.google.samples.apps.iosched.service.DataBootstrapService
com.google.samples.apps.iosched.appwidget.ScheduleWidgetRemoteViewsService
com.google.samples.apps.iosched.feedback.FeedbackWearableListenerService
Android Activities are one of the most important part of application's overall lifecycle. The way activities are launched and how developers manage all them together is a fundamental part of the platform's application model.
In order to improve performance, developers should try to provide interface to users avoiding create several activities and consuming resources when is not needed.
All non-trivial Android applications are made up of a number of different functional screens and hence multiple activities. Although multiple screens allows us to build complex applications, they also require careful management. In particular, developers need to deal with activities that are no longer visible since Android OS will place them into the background and may terminate activities that are not used for a period of time. The use of multiple activities also requires us to think about the interaction and navigation model that the user will experience.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 16 |
Samsung Galaxy S III (GT-I9300) (4.3): | 16 |
LG G2 (LS980) (5.0.2): | 16 |
Google Nexus 10 (5.1.1): | 16 |
Lenovo A369i (4.2.2): | 16 |
ZTE Zinger (Z667T) (4.4.2): | 16 |
Google Nexus 4 (5.0.1): | 16 |
Acer Iconia A1-810 7.9" (4.2.2): | 16 |
HTC One (M8) (4.4.2): | 16 |
Google Nexus 7 (5.0.2): | 16 |
Creating multiple activities causes Android to put them into the 'Back Stack' in order to save states such as text form, scroll position and other data. Multiple tasks can be held in the background at once. However, if the user is running many background tasks at the same time, the system might begin destroying background activities in order to recover memory, causing the activity states to be lost.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 0 |
Samsung Galaxy S III (GT-I9300) (4.3): | 3 |
LG G2 (LS980) (5.0.2): | 1 |
Google Nexus 10 (5.1.1): | 1 |
Lenovo A369i (4.2.2): | 2 |
ZTE Zinger (Z667T) (4.4.2): | 0 |
Google Nexus 4 (5.0.1): | 4 |
Acer Iconia A1-810 7.9" (4.2.2): | 1 |
HTC One (M8) (4.4.2): | 0 |
Google Nexus 7 (5.0.2): | 2 |
Layouts are a key part of Android applications that directly affect the user experience. If poorly implemented, your layout can lead to a memory hungry application with slow UIs.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 45 |
Samsung Galaxy S III (GT-I9300) (4.3): | 48 |
LG G2 (LS980) (5.0.2): | 7 |
Google Nexus 10 (5.1.1): | 7 |
Lenovo A369i (4.2.2): | 45 |
ZTE Zinger (Z667T) (4.4.2): | 55 |
Google Nexus 4 (5.0.1): | 67 |
Acer Iconia A1-810 7.9" (4.2.2): | 42 |
HTC One (M8) (4.4.2): | 45 |
Google Nexus 7 (5.0.2): | 36 |
It is a common misconception that using the basic layout structures leads to the most efficient layouts. However, each widget and layout you add to your application requires initialization, layout, and drawing.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 15 |
Samsung Galaxy S III (GT-I9300) (4.3): | 15 |
LG G2 (LS980) (5.0.2): | 9 |
Google Nexus 10 (5.1.1): | 9 |
Lenovo A369i (4.2.2): | 15 |
ZTE Zinger (Z667T) (4.4.2): | 15 |
Google Nexus 4 (5.0.1): | 15 |
Acer Iconia A1-810 7.9" (4.2.2): | 16 |
HTC One (M8) (4.4.2): | 15 |
Google Nexus 7 (5.0.2): | 15 |
External library code is often not written for mobile environments and can be inefficient when used for work on a mobile client. At the very least, when you decide to use an external library, you should assume you are taking on a significant porting and maintenance burden to optimize the library for mobile. Plan for that work up-front and analyze the library in terms of code size and RAM footprint before deciding to use it at all.
Deprecated libraries shown in this section means that you are probably using libraries that are not up to date. In the other hand, abandoned ones, are libraries without support or pending bugs time ago. Usually, library updates are important in order to improve security, performance, compatibility & bug fixes.
An Android application is a single installable unit that can be started and used independently of other applications.
Every application could have one application class which is instantiated as soon as the application starts and it is the last component stopped during shutdown.
Your app must declare its components in AndroidManifest.xml ('manifest' file), There are four different types of components: Activities, Services, Content providers and Broadcast receivers. Each type serves different purposes and has its own lifecycle that defines how the component is created and destroyed. When the system start a component, it starts the process for that app (if it's not already running) and instantiates the classes needed for the component.
Memory usage and launch time are in the top of developer's performance concerns. In the other hand, users expect you app to load in 3 seconds. If your app doesn't launch fast enough, you may lose them.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 1529ms |
Samsung Galaxy S III (GT-I9300) (4.3): | 2158ms |
LG G2 (LS980) (5.0.2): | 715ms |
Google Nexus 10 (5.1.1): | 554ms |
Lenovo A369i (4.2.2): | 1249ms |
ZTE Zinger (Z667T) (4.4.2): | 1660ms |
Google Nexus 4 (5.0.1): | 1061ms |
Acer Iconia A1-810 7.9" (4.2.2): | 932ms |
HTC One (M8) (4.4.2): | 390ms |
Google Nexus 7 (5.0.2): | 738ms |
When building an application, it's important to consider exactly what your graphical demands will be. Varying graphical tasks are best accomplished with varying techniques. For example, graphics and animations for a rather static application should be implemented much differently than graphics and animations for an interactive game. No matter what type of application it is, there are certain situations that affect the user experience (response rate, fluency, use of resources, battery etc.). Times drawn reflect possibly some things are not performing in the best possible shape for the type of service you want to provide with this.
To achieve fluid rendering (60 fps) each frame must be completed in less than 16ms. If not, application creates a disruption in the animation and sometimes it 'freeze'. Also, elevated drawing to the screen needs high CPU and/or GPU usage in order to maintain a constant rate, causing battery drain.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 2frames |
Samsung Galaxy S III (GT-I9300) (4.3): | 6frames |
LG G2 (LS980) (5.0.2): | 1frames |
Google Nexus 10 (5.1.1): | 0frames |
Lenovo A369i (4.2.2): | 15frames |
ZTE Zinger (Z667T) (4.4.2): | 2frames |
Google Nexus 4 (5.0.1): | 13frames |
Acer Iconia A1-810 7.9" (4.2.2): | 25frames |
HTC One (M8) (4.4.2): | 1frames |
Google Nexus 7 (5.0.2): | 2frames |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 40ms |
Samsung Galaxy S III (GT-I9300) (4.3): | 111ms |
LG G2 (LS980) (5.0.2): | 18ms |
Google Nexus 10 (5.1.1): | 14ms |
Lenovo A369i (4.2.2): | 298ms |
ZTE Zinger (Z667T) (4.4.2): | 48ms |
Google Nexus 4 (5.0.1): | 230ms |
Acer Iconia A1-810 7.9" (4.2.2): | 433ms |
HTC One (M8) (4.4.2): | 31ms |
Google Nexus 7 (5.0.2): | 43ms |
Video - Rendering Performance 101
Video - Perf Primer : CPU, GPU and your Android game
Video - Make your Android UI Fast and Efficient
Training - Improving Layout Performance
Video - Tool - Profile GPU Rendering
Blog - Android Performance Case Study: Falcon Pro
Video - Android UI and the GPU
Video - Writing zippy Android apps
Video - Understanding Overdraw
Video - Building High-Performance Applications
Video - Accelerated Android Rendering
The CPU is the unit responsible for carrying out all instructions of an application and all the necessary instructions for running different subsystems that maintain running the Android OS (multimedia, audio, render, etc.)
When the CPU usage is high, the user may experience sluggishness or higher battery usage (among some other symptoms). Since the CPU usage is a shared resource, abuse of CPU usage may prevent other running services work incorrectly, affecting the user experience as the proper functioning of Android (and the applications that run there). With higher levels of instructions, the CPU increases its speed with a consequent increase in use of voltage that causes the battery to drain faster
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 93% |
Samsung Galaxy S III (GT-I9300) (4.3): | 78% |
LG G2 (LS980) (5.0.2): | 22% |
Google Nexus 10 (5.1.1): | 16% |
Lenovo A369i (4.2.2): | 89% |
ZTE Zinger (Z667T) (4.4.2): | 88% |
Google Nexus 4 (5.0.1): | 58% |
Acer Iconia A1-810 7.9" (4.2.2): | 97% |
HTC One (M8) (4.4.2): | 71% |
Google Nexus 7 (5.0.2): | 67% |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 2% |
Samsung Galaxy S III (GT-I9300) (4.3): | 6% |
LG G2 (LS980) (5.0.2): | 7% |
Google Nexus 10 (5.1.1): | 5% |
Lenovo A369i (4.2.2): | 13% |
ZTE Zinger (Z667T) (4.4.2): | 12% |
Google Nexus 4 (5.0.1): | 4% |
Acer Iconia A1-810 7.9" (4.2.2): | 6% |
HTC One (M8) (4.4.2): | 6% |
Google Nexus 7 (5.0.2): | 3% |
Random-access memory (RAM) is one of the most valuable resource in any software development environment, but it's even more valuable on several mobile operating system where physical memory is constrained.
To maintain a functional multi-tasking environment, Android sets a fixed limit on the Dalvik heap size for each app. The exact Dalvik heap size limit varies across devices, based on how much RAM the device has available overall. If your app has reached the heap capacity and tries to allocate more memory, it will receive an OutOfMemoryError.
Android | API Level | Bitmap Pixel Data Alloc* | Default Heap Size Limit | Large Heap Size Limit** |
---|---|---|---|---|
Android 1.x - Alpha / Beta | 1 to 7 | Native Heap | 16MB | NA |
Android 2.2.x - Froyo | 8 | Native Heap | 24MB | NA |
Android 2.3.x - Gingerbread | 9 to 10 | Native Heap | 32MB | NA |
Android 3.x - Honeycomb | 11 to 13 | Dalvik Heap | 48MB | 128MB |
Android 4.0.x - Ice Cream Sandwich | 14 to 15 | Dalvik Heap | 64MB | 128MB |
Android 4.1.x/4.2.x - Jelly Bean | 16 to 17 | Dalvik Heap | 128MB | 128MB |
Android 4.3.x/4.4.x- Jelly Bean/KitKat | 18 to 19 | Dalvik Heap | 128MB | 256MB |
Android 5.x- Lollipop | 20 to 22 | Dalvik Heap | 128MB | 256MB |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 41MB |
Samsung Galaxy S III (GT-I9300) (4.3): | 50MB |
LG G2 (LS980) (5.0.2): | 19MB |
Google Nexus 10 (5.1.1): | 10MB |
Lenovo A369i (4.2.2): | 33MB |
ZTE Zinger (Z667T) (4.4.2): | 16MB |
Google Nexus 4 (5.0.1): | 52MB |
Acer Iconia A1-810 7.9" (4.2.2): | 17MB |
HTC One (M8) (4.4.2): | 68MB |
Google Nexus 7 (5.0.2): | 52MB |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 19MB |
Samsung Galaxy S III (GT-I9300) (4.3): | 24MB |
LG G2 (LS980) (5.0.2): | 17MB |
Google Nexus 10 (5.1.1): | 9MB |
Lenovo A369i (4.2.2): | 22MB |
ZTE Zinger (Z667T) (4.4.2): | 10MB |
Google Nexus 4 (5.0.1): | 16MB |
Acer Iconia A1-810 7.9" (4.2.2): | 7MB |
HTC One (M8) (4.4.2): | 21MB |
Google Nexus 7 (5.0.2): | 23MB |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 42% |
Samsung Galaxy S III (GT-I9300) (4.3): | 78% |
LG G2 (LS980) (5.0.2): | 7% |
Google Nexus 10 (5.1.1): | 5% |
Lenovo A369i (4.2.2): | 34% |
ZTE Zinger (Z667T) (4.4.2): | 33% |
Google Nexus 4 (5.0.1): | 27% |
Acer Iconia A1-810 7.9" (4.2.2): | 17% |
HTC One (M8) (4.4.2): | 35% |
Google Nexus 7 (5.0.2): | 27% |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 31% |
Samsung Galaxy S III (GT-I9300) (4.3): | 59% |
LG G2 (LS980) (5.0.2): | 0% |
Google Nexus 10 (5.1.1): | 0% |
Lenovo A369i (4.2.2): | 28% |
ZTE Zinger (Z667T) (4.4.2): | 29% |
Google Nexus 4 (5.0.1): | 0% |
Acer Iconia A1-810 7.9" (4.2.2): | 16% |
HTC One (M8) (4.4.2): | 0% |
Google Nexus 7 (5.0.2): | 0% |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 0 |
Samsung Galaxy S III (GT-I9300) (4.3): | 0 |
LG G2 (LS980) (5.0.2): | 0 |
Google Nexus 10 (5.1.1): | 0 |
Lenovo A369i (4.2.2): | 0 |
ZTE Zinger (Z667T) (4.4.2): | 0 |
Google Nexus 4 (5.0.1): | 0 |
Acer Iconia A1-810 7.9" (4.2.2): | 0 |
HTC One (M8) (4.4.2): | 0 |
Google Nexus 7 (5.0.2): | 0 |
Video - Memory Churn and performance
Blog - Android Memory Management
Video - Performance Cost of Memory Leaks
Training - Managing Your App's Memory
Training - Managing Bitmap Memory
Tools - Investigating Your RAM Usage
Blog - Memory Analysis for Android Applications
Blog - Track memory allocations
Using the wireless radio to transfer data is potentially one of your app's most significant sources of extra fees, poor user experience and battery drain. To minimize the associated effects with network activity, it's important that you understand how your connectivity model will affect the underlying radio hardware.
If your application performs a lot of network operations, you should provide user settings that allow users to control your app's data habits, such as how often your app syncs data, whether to perform uploads/downloads only when on Wi-Fi, whether to use data while roaming, and so on.
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 1822kB |
Samsung Galaxy S III (GT-I9300) (4.3): | 1486kB |
LG G2 (LS980) (5.0.2): | 586kB |
Google Nexus 10 (5.1.1): | 170kB |
Lenovo A369i (4.2.2): | 3992kB |
ZTE Zinger (Z667T) (4.4.2): | 1872kB |
Google Nexus 4 (5.0.1): | 1397kB |
Acer Iconia A1-810 7.9" (4.2.2): | 711kB |
HTC One (M8) (4.4.2): | 1962kB |
Google Nexus 7 (5.0.2): | 1385kB |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | 271kB |
Samsung Galaxy S III (GT-I9300) (4.3): | 234kB |
LG G2 (LS980) (5.0.2): | 23kB |
Google Nexus 10 (5.1.1): | 6kB |
Lenovo A369i (4.2.2): | 351kB |
ZTE Zinger (Z667T) (4.4.2): | 211kB |
Google Nexus 4 (5.0.1): | 151kB |
Acer Iconia A1-810 7.9" (4.2.2): | 218kB |
HTC One (M8) (4.4.2): | 172kB |
Google Nexus 7 (5.0.2): | 174kB |
If your app stops responding, users get a dialog that allows them to wait or close the app. When these dialogs appear, they're known as 'Application not responding' errors or ANRs.
Android will display the ANR dialog when it detects one of the following conditions:
No response to an input event (such as key press or screen touch events) within 5 seconds.
A BroadcastReceiver hasn't finished executing within 10 seconds.
When your app stops responding (ANR) Android generates dump files containing CPU and Threads information. This enables devs to identify CPU usage on each process at the moment that the app freezes and provides a snapshot containing threads information (thread, mutex and stack information).
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | None |
Samsung Galaxy S III (GT-I9300) (4.3): | None |
LG G2 (LS980) (5.0.2): | None |
Google Nexus 10 (5.1.1): | None |
Lenovo A369i (4.2.2): | None |
ZTE Zinger (Z667T) (4.4.2): | None |
Google Nexus 4 (5.0.1): | None |
Acer Iconia A1-810 7.9" (4.2.2): | None |
HTC One (M8) (4.4.2): | None |
Google Nexus 7 (5.0.2): | None |
An application typically crashes when it performs an operation which is not allowed by the operating system. The operating system then triggers an exception or signal in the application.
An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. A exception contains a snapshot of the execution stack of its thread at the time it was created. It can also contain a message string that gives more information about the error.
Device | Value |
---|---|
Google Nexus 7 (5.0.2): |
Device | Value |
---|---|
Motorola G (XT1031) (4.4.4): | None |
Samsung Galaxy S III (GT-I9300) (4.3): | None |
LG G2 (LS980) (5.0.2): | None |
Google Nexus 10 (5.1.1): | None |
Lenovo A369i (4.2.2): | None |
ZTE Zinger (Z667T) (4.4.2): | None |
Google Nexus 4 (5.0.1): | None |
Acer Iconia A1-810 7.9" (4.2.2): | None |
HTC One (M8) (4.4.2): | None |
Since battery is one of the top appreciated resources by users in their phones and tablets, developers should take care about battery consumption and need to know key-factors involved in battery drain.
High CPU usage means more frequency and more power needed to feed battery. Bad image rendering with high GPU or CPU usage, sensor usage and tracking location are also relevant factors to improve power consumption. More often, when using wireless radio to transfer data, the way to do it and how often your app uses radio is critical to minimize power consumption.
Video - Battery Drain and Networking
Video - Understanding Battery Drain on Android
Training - Optimizing Battery Life
Video - Battery Drain and WakeLocks
Training - Optimizing Downloads for Efficient Network Access
Training - Transferring Data Without Draining the Battery
Book - Optimizing Battery Life – Page 177:
Android version:
Manufacturer:
Model:
CPU Architecture:
Dalvik heap size limit:
Dalvik large heap size limit:
Screen orientation:
Screen resolution:
Layout size:
Display density:
OpenGL ES:
APK
Install
Process
Uninstall
Time Elapsed:
Application startup time: