<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kodeflap</title>
    <description>The latest articles on DEV Community by Kodeflap (@kodeflap).</description>
    <link>https://dev.to/kodeflap</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F935652%2F7f0acedc-0bd5-4a6d-b874-da16cfc0d382.jpg</url>
      <title>DEV Community: Kodeflap</title>
      <link>https://dev.to/kodeflap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kodeflap"/>
    <language>en</language>
    <item>
      <title>It's Hacktoberfest time - Time to gear up your skill</title>
      <dc:creator>Kodeflap</dc:creator>
      <pubDate>Sat, 01 Oct 2022 17:11:53 +0000</pubDate>
      <link>https://dev.to/kodeflap/its-hacktoberfest-time-time-to-gear-up-your-skill-21i7</link>
      <guid>https://dev.to/kodeflap/its-hacktoberfest-time-time-to-gear-up-your-skill-21i7</guid>
      <description>&lt;h2&gt;
  
  
  It's Hacktoberfest time - Time to gear up your skill
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F4000%2F1%2AXEi0v47dU8hPH9zmlk5MWg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F4000%2F1%2AXEi0v47dU8hPH9zmlk5MWg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hacktoberfest is a 1-month long fest to promote open source contributors. The event is made by DigitalOcean community. Developers from across the world can take part in this event. It is not even limited to age, experience, or coders. Anyone can participate and can scale up their skills. This blog post is all about getting a glimpse of open source and also how can you be part of Hacktoberfest and what is it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Open Sorce?
&lt;/h2&gt;

&lt;p&gt;Open source projects are the projects that are hosted as publicly accessible. Being a publicly active repository it can have a border number of communities and developers.&lt;/p&gt;

&lt;p&gt;Don't limit it when hearing about open source because many software like Linux, Mozilla Firefox, WordPress, Android, VLC, and many more are the result of open source.&lt;/p&gt;

&lt;p&gt;Open source has a large number of non-coders, coders, maintainers, and contributors. It doesn't have certain boundaries to contribute. If you like to contribute just fork and run and write a good commit and make some good pull requests (PR).&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Does it limit to coders?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The straight answer is no anyone if you want to do some contributions you can have contributions. Good copywriting, finding issues, having discussions, making a new feature, testing, designing, mentoring, or organizing events for a big community. It doesn't mean you have to be too much experience. If you have a will go according and scale up your skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hosting Open Source Project- GitHub, GitLab
&lt;/h2&gt;

&lt;p&gt;GitHub and GitLab are the main two platforms used to host the repositories. Though it sounds like a replica, we can either choose GitHub or GitLab on the basis of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If looking for collaborating with a large community, it is better to choose GitHub&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the project matters in cost and likes to integrate third-party tools then GitLab is the best option.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hacktoberfest
&lt;/h2&gt;

&lt;p&gt;Basically, Hacktoberfest occurs every year at the time of October. The event's main aim is to encourage open source and to develop an interest in open source contribution. As I said it is not bound to coders even non-coders can also participate. Even if you are new to it just try to contribute to what you like.&lt;/p&gt;

&lt;p&gt;You can also be a maintainer, contributor, or event coordinator. Mainter is the person who makes a public repository according to the following conditions and welcomes contributors and can also merge and maintains the open source project. Contributors can take part and contribute to code, documentation, test, and design anything by following the code of conduct, contributing guidelines making a good commitment, and pulling requests for it. Coordinators can conduct workshops, and seminars if you take part as a coordinator&lt;/p&gt;

&lt;p&gt;Check out the official hacktoberfest site and know more about it.&lt;br&gt;
&lt;a href="https://hacktoberfest.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Hacktoberfest 2022&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a part in the event in any role you want as a maintainer, contributor, or coordinator.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to do your first contribution in hacktoberfest&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Check out the repositories participating in the event using the below link&lt;br&gt;
&lt;a href="https://github.com/topics/hackoctoberfest" rel="noopener noreferrer"&gt;&lt;strong&gt;Build software better, together&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can also search using the search bar by typing **hacktoberfest **you can also add the documentation keyword to give a contribution to the documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;According to your choice sort, the result is based on the good first issue, language, etc&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you like to contribute to app development in kotlin check out my repos&lt;br&gt;
&lt;a href="https://github.com/kodeflap/Algo_Guide" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub - kodeflap/Algo_Guide: Android application to visualize algorithms&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kodeflap/MyNotes" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub - kodeflap/MyNotes: 📓My notes is for organizing your notes.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s all for today. Wishing a great day to all 👋👋👋👋&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
      <category>github</category>
      <category>android</category>
    </item>
    <item>
      <title>Improving App Performance</title>
      <dc:creator>Kodeflap</dc:creator>
      <pubDate>Sat, 01 Oct 2022 17:07:31 +0000</pubDate>
      <link>https://dev.to/kodeflap/improving-app-performance-14an</link>
      <guid>https://dev.to/kodeflap/improving-app-performance-14an</guid>
      <description>&lt;h2&gt;
  
  
  Improving App Performance
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pjfm5upI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2APMHMt_aMiNvyIGRIA8MXaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pjfm5upI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2APMHMt_aMiNvyIGRIA8MXaA.png" alt="" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to app success no one can deny the factor of app performance. It doesn't matter if your app has smooth animations, transitions, appealing images, features, etc…none of them matter if app performance lags. It matters as a second priority first performance is always how app performance. App performance metrics are always to be considered to bring a better user experience. Many bottlenecks cause &lt;strong&gt;bad performance&lt;/strong&gt;, the developers need to consider, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When it comes to size always every one prefers a small-sized APK which saves extra space for their phone. It is obvious as a user that we choose a 10 MB space-consuming app than a 100 MB which offers the same functionality. Not only 4G or 5G does exist for everyone even still 2G and 3G are also to be considered in the big picture to promote more downloads.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Launch time&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you wait for an app to launch for more than 5 seconds? Usually, we will not think for any other seconds to uninstall faster than the time taken to download or report in the app store and give a 1-star rating.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Speed&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A poor speed always affects the app. Speed is measured by the app response time, loading of contents, etc… App with poor speed performance is mostly nicknamed to be the worst app.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Size of images and video&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Images and videos with low quality distort the app. The images with the usage of JPEG, and PNG format usually are not fit for all sizes of screens creating images for each screen makes the app size bigger. In the case of videos when the user has the least bandwidth and seeing buffering is the expected result.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Screen Resolutions&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are so many devices like mobiles, tab, smart tv, and wearable of various shapes and sizes. App with poorly managed in size and orientation creates buzz. So there are some situations the layout designed will not work the same on all device sizes. Some apps will provide a great experience on one mobile and if the app doesn't give the same effect while using different mobile. Poor designs usually affect speeds creating slow app performances.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Memory usage&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To do multitasking for users Android sets limits on RAM usage for apps. Although the given limits are not static they will always change according to the mobile usage by each app. If the apps are still running in the background unnecessarily and use memory always and are not freed up creates a problem called a **&lt;em&gt;memory leak. **Developers giving less importance to memory leaks leads to the drain of battery life.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Poor Networking&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Heavy usage of data and WiFi consumes a lot of battery causing power drain. Today every app relies on networks either in case of getting media or connecting with cloud service, backend networks are needed. Lots of network traffic are used to achieve the desired result in the app which directly leads to battery consumption and sometimes the app will not adjust according to your network connectivity like 2G, 3G, 4G, and 5G.&lt;/p&gt;

&lt;p&gt;The primary goal while considering networking is a faster response with less battery consumption.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Offline model&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Users will get irritated if it is an app is not properly managed in offline mode also. It creates a horrible user experience without proper **caching **which affects the app performance. There will be also a consideration for the offline state also. Users prefer a smooth transition when there is a sudden network change from offline to online state and always prefer sync when it becomes online. So it prefers to save basic data in local storage and it will not affect it while going through online. For example, if an app is online and the user is editing sudden network change led to offline a good app always offers to edit offline and save locally and when the network regains all the editing changes should be visible online. Either than repeatedly doing everything once again from scratch it is preferred to use an offline model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good ways to improve app performance
&lt;/h2&gt;

&lt;p&gt;Can a developer figure out and solve it? The straight answer is yes. Making 1 app with a good feel user experience is equivalent to making 100 similar apps. So, giving extra time to tackle it is always better.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Reduce app size&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Reducing the app size mainly includes &lt;em&gt;two processes the *first thing is to *analyze&lt;/em&gt; the size of an app like how much space is utilized by it. The second thing is to *take steps to reduce the size *sometimes size increases because of code, and images likewise so let's take a look into solutions to shrink app size.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;1.1 Analyze&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;App size (APK Analyzer)&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Using Analyze APK option&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Android studio has a default option to analyze the APK. To do this go to&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build &amp;gt; Analyze APK &amp;gt; dialog box opens &amp;gt; select your APK(ProjetcName.apk) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You will get a report of your app with information including the name of APK, files in your app like manifest, res, etc, and details of downloadable size likewise. If your app is for production and planning for updating with versions you can also compare your current version with the previous one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Profile or Debug APK option&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Android Studio also has another method in the file section you can navigate in the following order&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;File &amp;gt; Profile or Debug APK &amp;gt; Dialog box opens &amp;gt; select your app APK file &amp;gt; OK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;A similar report will you get as I said above with pieces of information like downloadable size, res file, etc…&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitor CPU, Memory, Network, and Battery (Android Profiler)
&lt;/h2&gt;

&lt;p&gt;Android Studio has Android Profiler to monitor the CPU, memory, network, and battery used by the android app. To open it follow the instructions&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;View &amp;gt; Tool Window &amp;gt; Profiler &amp;gt; Dialog box opens &amp;gt; select device which you want to profile your app performance (Emulator, or your mobile using USB Debugging)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;By doing so you can see all the particular reports depicting the CPU, memory, battery, and network usage of your app on the selected device. So by monitoring it you will get clarity on whether your app is using its minimal or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;1.2 Improve performance- Take necessary actions&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;So by analyzing we get an idea of where is the size of the app increases. So we can take the steps mentioned below to reduce app size&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Upload app with App Bundles(.aab)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;App Bundle is a publishing format. From August 2021 apps are required to publish in App Bundle format in Google Playstore. The format includes all your app code and resources. The APK generation and signing to Google Play are postponed in this format. App bundle is used to generate and serve optimized APK for each user's device configuration. So they download only the code and resources that are needed to run your app which results in a smaller app size. So we don't need to build, sign and maintain separate APK for different device configurations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Remove unused Resources (Proguard, R8[Gradle 3.4.0 and higher])&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To make the app size small it is a must to shrink your code by doing it all unused resources and code will be removed.&lt;/p&gt;

&lt;p&gt;Proguard and R8 help to shrink the code. But now R8 is commonly used before the release of Gradle 3.4.0 Proguard has been used but now R8 comes to the big picture to shrink. What all things does it shrinks:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 Code
2 Resource
3 Shortening class and members name
4 optimize code by rewriting 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Use R8 for all release builds&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Compress PNG and JPEG files&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your app really wanted to use images in format PNG or JPEG always compress them without losing the image quality by using appropriate online or offline tools you prefer some of the tools you can use is&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pngquant.org/"&gt;https://pngquant.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/google/zopfli"&gt;https://github.com/google/zopfli&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use WebP or SVG type&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is recommended that &lt;em&gt;WebP&lt;/em&gt; is the best format for images in android because it supports both lossless(PNG) and lossy (JPEG) compression. WebP is fully supported on web browsers and is considered safer on Android.&lt;/p&gt;

&lt;p&gt;SVG is a vector graphic format supported by the web browser. It is ideal for logos, illustrations, and other graphics which can scale without losing quality.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use Vector Drawable for images, icons, and animated images&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Vector graphics can be used to create icons, images, and animated images which make shrink in android app size. In Android Studio there is an option to create your media in a vector object which is represented as &lt;strong&gt;&lt;em&gt;VectorDrawable.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Minimize the usage of external libraries&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While building an app to add external features we include external libraries. But when using it we avoid that fact like some of the class or members are not required for your application. When external libraries have referred the classes associated with them are also called and some of them are not actually required which eventually increases app size by consuming space that is not needed for the app.&lt;/p&gt;

&lt;p&gt;So it is preferred to use libraries provided by Google and well-maintained libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Decreasing App launch time
&lt;/h2&gt;

&lt;p&gt;When it comes to launching time the average top lunchtime on Google PlayStore is between 800ms to 4.5s. So definitely more users prefer launch time between 800ms to 4.5s and less. How can we launch our app faster?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Don’t use too many views on the launch screen&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don’t initialize code in the app object&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use garbage collection as possible&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid using UI that is not required for the initial screen&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the Firebase performance monitor to check the launch time&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Optimizing Screen Resolution
&lt;/h2&gt;

&lt;p&gt;There is not only a mobile screen with only one screen size. The layout structure should be different for small to big size screens. So while creating an app always remember&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Design layout in a way that it can be accessible on portrait, landscape, large, or small-size screens.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimize for different screen densities MDPI and HDPI&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement bitmaps to scale with views&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modularize fragments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build alternative layouts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check with different android emulators to confirm that it is complementing different screen resolutions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Improve memory usage
&lt;/h2&gt;

&lt;p&gt;When it comes to memory developers also need to consider the memory leaks associated with it. Sometimes developers only focus on features and avoid factors like memory usage of the app. Memory leaks should also be taken care of for better performance. Poorly handled memory leaks led to unpleasant app performance.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Memory leaks are caused when unused objects occupy unnecessary space in memory. The unused spaces are still referred and not freed by Garbage collector&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;How to solve it&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use LeakCanary or Android Profiler to detect memory leaks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Release UI resources when users move to different UI&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write memory-efficient codes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Minimize usage of the third-party library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose static inner class&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unregister listeners and events&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make yourself understand with architecture using&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't use a static reference&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Review your code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Optimize network usage
&lt;/h2&gt;

&lt;p&gt;Consuming more data in your app drains more battery power. Getting the best networking performance in an app requires optimizing its usage. Most of the app use networks for loading images, making API calls, etc so optimizing it in a to way to minimize battery usage is the best solution for it.&lt;/p&gt;

&lt;p&gt;How to achieve it&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Load text first and images second&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For images use libraries like Picasso, Glide&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cache data and resources&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use Jetpack WorkManager to sync and load data that your app needs and used later when the user is off the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Design an efficient API that has reduced workloads and consistency.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Cache Whenever possible — Configure the Offline model
&lt;/h2&gt;

&lt;p&gt;Sometimes the app may affect by a bad network connection and hinder the user experience app should be able to display information offline. Caching comes as the main frame of topic in the offline model because when a user loses network connection, caching helps the user use the app even offline and make a smooth transition when the network is connected.&lt;/p&gt;

&lt;p&gt;How to make this possible&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Make a few HTTP requests&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Store data offline which helps to access data offline by storing it in a local server or browser where the device can access it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Making to edit offline and sync online&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The text should load first and the image second&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use image caching&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;App performance is a vital part of app development sometimes we lack in the area leads to poor user experience. Giving a certain amount of time to figure out and rectify it requires some effort. But to achieve a good outcome additional effort should also be taken.&lt;/p&gt;

&lt;p&gt;Do you also feel your app also needs improvements before launching? So what’s your thought about it?&lt;/p&gt;

&lt;p&gt;Happy coding hours………….👋👋👋👋👋👋👋&lt;/p&gt;

</description>
      <category>android</category>
      <category>performance</category>
      <category>kotlin</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
