SlideShare uma empresa Scribd logo
1 de 20
Android Apps Network Optimization
Optimized Network for
Better Performance
What is Android Network Optimization?
Android Network Optimization is about implementing best practices to
optimize android network performance for android apps. Mostly the requests
sent by apps to network turn on power intensive mobile radios. Some more
power is also consumed to keep mobile radio awake other than power required
to send and receive packets. Even a small network request can keep awake the
mobile radio for long periods
What is Android Network Optimization?
Proper optimization of network is possible after knowing the source of the
traffic. Network activity generated by the app is reasonable when it is
responding to user actions but, incase if app is not in the foreground or lying
idle inside user pocket then network activity is not required
Methods for Android Apps Network
Optimization
1) Data Compression
2) Cache Files Locally
3) Optimization of User-Initiated Network Use
Pre-fetch Network Data
1) Optimization of App-Initiated Network Use
Implement Effective Network Batching
1) Optimization of Server-Initiated Network Use
Data Compression
The very basic and effective step for network optimization is data compression.
GZIP compression is helpful compression technique to compress data smartly. A
smaller on-the-wire packet size and faster encoding and decoding time can be
ensured using binary serialization formats like Protocol Buffers or FlatBuffers
Cache Files Locally
Duplicate data download can be avoided with caching. Obviously, reading data
from device is quite faster than reading the same data from the network. If
data will be used multiple times then fetching it directly through network than
storing it on device is more effective. This will also ensure that upcoming
requests need not to re-download the file.
Cache Files Locally
Cache Files Locally
HTTP responses is disabled in android application. By turning on the cache by
using the HTTP response cache class which will enable app to to decide a
location on the device for physical file storage as well as the max size for cache.
Enabling it means every HTTP response will be cached on file system for the
application.
Cache Files Locally
Cache Files Locally
Caching is applicable to API like URL as well as HTTP URL connections and other
code snippets too. It is as well applicable to all those HTTP request made via
libraries that are bundled within the applications.
Optimization of User-Initiated
Network Use
When user action requires network access then quick handling of user requests
is imperative to ensure smooth user experience. Specially when network use is
dependent upon user action then low latency should be prioritized over power
consumption for providing quick and efficient handling of user request for good
user experience.
Pre-fetch Network Data
Pre-fetching the data will reduce the quantity of independent data transfer
session running on the app. Pre-fetch process is helpful in ensuring which data
will be required for the upcoming series of user actions when an action is taken
by user on the app and will fetch that data in bulk.
Pre-fetch Network Data
Pre-fetch Network Data
As the app will pre-fetch the data when mobile radio is awake due to user
actions hence no need to wake up the mobile radio additionally. This will limit
separate requests to wake mobile radio again and again and boost the battery
life
Optimization of App-Initiated Network Use
After the request the cellular radio wait for about a minute extra for server
response hence consumes more power and if there are multiple network
request it will keep radio alive for very long duration and this will consume
even greater battery power. Network data initiated by app can be optimized by
planning which network resources are needed and accordingly these can be
scheduled for accessing. Smart scheduling will ensure good number of rest
periods for device radio which will eventually save substantial amount of
power.
Optimization of App-Initiated Network Use
Implement Effective Network Batching
Batching is an effective way to combine these requests which will wake up and
keep radio alive only once.
Batching means to intercept the outbound requests and keep them under
pending list of actions which will be made in future. There are various
complexities in scheduling but, GCM network Manager is a Google Play Services
API to schedule network oriented tasks and handle batching as well. In this
manner batching will not only optimize network request for better battery
performance but will also improve the app performance for users.
Optimization of App-Initiated Network Use
Optimization of Server-Initiated Network Use
It is quite challenging to optimize the network traffic sent by the servers.
Although the app can periodically check for updates by polling the server but it
will result in significant loss of network connection and power whenever app
starts the radio of device.
An excellent solution to this problem is Google Cloud Messaging (GCM) which
enables servers to send notifications to instances of the app on installation
thereby ensuring better network efficiency and significantly lessening the
power usage.
Optimization of Server-Initiated Network Use
With GCM the app server will notify the app about availability of new data by
implementing the message-passing mechanism. In this manner app will not
have to perform any network traffic by contacting backend server for new data.
GCM service discards any not required connections where polling might not
return any updates at the same time it avoids running periodical network
request that will power up the device radio. Interestingly, GCM can be
implemented by multiple apps.
Best Way of Network Optimization for Android App

Mais conteúdo relacionado

Mais de Singsys Pte Ltd

Introduction to facebook sdk
Introduction to facebook sdkIntroduction to facebook sdk
Introduction to facebook sdkSingsys Pte Ltd
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginnersSingsys Pte Ltd
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designersSingsys Pte Ltd
 
Joomla 3 installation and management guide
Joomla 3 installation and management guideJoomla 3 installation and management guide
Joomla 3 installation and management guideSingsys Pte Ltd
 
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialSingsys Pte Ltd
 
Technical seo tips for web developers
Technical seo tips for web developersTechnical seo tips for web developers
Technical seo tips for web developersSingsys Pte Ltd
 
WordPress Website Design and Development
WordPress Website Design and DevelopmentWordPress Website Design and Development
WordPress Website Design and DevelopmentSingsys Pte Ltd
 
Points for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websitesPoints for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websitesSingsys Pte Ltd
 

Mais de Singsys Pte Ltd (13)

SoLoMo
SoLoMoSoLoMo
SoLoMo
 
Introduction to facebook sdk
Introduction to facebook sdkIntroduction to facebook sdk
Introduction to facebook sdk
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Joomla 3 installation and management guide
Joomla 3 installation and management guideJoomla 3 installation and management guide
Joomla 3 installation and management guide
 
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation Tutorial
 
Basic of web design
Basic of web designBasic of web design
Basic of web design
 
Embedded Technology
Embedded TechnologyEmbedded Technology
Embedded Technology
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
Technical seo tips for web developers
Technical seo tips for web developersTechnical seo tips for web developers
Technical seo tips for web developers
 
WordPress Website Design and Development
WordPress Website Design and DevelopmentWordPress Website Design and Development
WordPress Website Design and Development
 
Being a designer
Being a designerBeing a designer
Being a designer
 
Points for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websitesPoints for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websites
 

Último

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Último (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Best Way of Network Optimization for Android App

  • 1. Android Apps Network Optimization Optimized Network for Better Performance
  • 2. What is Android Network Optimization? Android Network Optimization is about implementing best practices to optimize android network performance for android apps. Mostly the requests sent by apps to network turn on power intensive mobile radios. Some more power is also consumed to keep mobile radio awake other than power required to send and receive packets. Even a small network request can keep awake the mobile radio for long periods
  • 3. What is Android Network Optimization? Proper optimization of network is possible after knowing the source of the traffic. Network activity generated by the app is reasonable when it is responding to user actions but, incase if app is not in the foreground or lying idle inside user pocket then network activity is not required
  • 4. Methods for Android Apps Network Optimization 1) Data Compression 2) Cache Files Locally 3) Optimization of User-Initiated Network Use Pre-fetch Network Data 1) Optimization of App-Initiated Network Use Implement Effective Network Batching 1) Optimization of Server-Initiated Network Use
  • 5. Data Compression The very basic and effective step for network optimization is data compression. GZIP compression is helpful compression technique to compress data smartly. A smaller on-the-wire packet size and faster encoding and decoding time can be ensured using binary serialization formats like Protocol Buffers or FlatBuffers
  • 6. Cache Files Locally Duplicate data download can be avoided with caching. Obviously, reading data from device is quite faster than reading the same data from the network. If data will be used multiple times then fetching it directly through network than storing it on device is more effective. This will also ensure that upcoming requests need not to re-download the file.
  • 8. Cache Files Locally HTTP responses is disabled in android application. By turning on the cache by using the HTTP response cache class which will enable app to to decide a location on the device for physical file storage as well as the max size for cache. Enabling it means every HTTP response will be cached on file system for the application.
  • 10. Cache Files Locally Caching is applicable to API like URL as well as HTTP URL connections and other code snippets too. It is as well applicable to all those HTTP request made via libraries that are bundled within the applications.
  • 11. Optimization of User-Initiated Network Use When user action requires network access then quick handling of user requests is imperative to ensure smooth user experience. Specially when network use is dependent upon user action then low latency should be prioritized over power consumption for providing quick and efficient handling of user request for good user experience.
  • 12. Pre-fetch Network Data Pre-fetching the data will reduce the quantity of independent data transfer session running on the app. Pre-fetch process is helpful in ensuring which data will be required for the upcoming series of user actions when an action is taken by user on the app and will fetch that data in bulk.
  • 14. Pre-fetch Network Data As the app will pre-fetch the data when mobile radio is awake due to user actions hence no need to wake up the mobile radio additionally. This will limit separate requests to wake mobile radio again and again and boost the battery life
  • 15. Optimization of App-Initiated Network Use After the request the cellular radio wait for about a minute extra for server response hence consumes more power and if there are multiple network request it will keep radio alive for very long duration and this will consume even greater battery power. Network data initiated by app can be optimized by planning which network resources are needed and accordingly these can be scheduled for accessing. Smart scheduling will ensure good number of rest periods for device radio which will eventually save substantial amount of power.
  • 16. Optimization of App-Initiated Network Use Implement Effective Network Batching Batching is an effective way to combine these requests which will wake up and keep radio alive only once. Batching means to intercept the outbound requests and keep them under pending list of actions which will be made in future. There are various complexities in scheduling but, GCM network Manager is a Google Play Services API to schedule network oriented tasks and handle batching as well. In this manner batching will not only optimize network request for better battery performance but will also improve the app performance for users.
  • 18. Optimization of Server-Initiated Network Use It is quite challenging to optimize the network traffic sent by the servers. Although the app can periodically check for updates by polling the server but it will result in significant loss of network connection and power whenever app starts the radio of device. An excellent solution to this problem is Google Cloud Messaging (GCM) which enables servers to send notifications to instances of the app on installation thereby ensuring better network efficiency and significantly lessening the power usage.
  • 19. Optimization of Server-Initiated Network Use With GCM the app server will notify the app about availability of new data by implementing the message-passing mechanism. In this manner app will not have to perform any network traffic by contacting backend server for new data. GCM service discards any not required connections where polling might not return any updates at the same time it avoids running periodical network request that will power up the device radio. Interestingly, GCM can be implemented by multiple apps.