@instabug__ released a State of Mobile App Quality report on their website, which states that they analyzed 100 million bugs from 30 thousand apps. With this data I'll summarize the most common bugs that you may come across in apps and provide some suggestions to improve performance.
1. Device Orientation: Most people use apps in portrait mode and many apps don’t support landscape mode. During development, portrait mode is typically prioritized and landscape mode often isn’t optimized. Issues occur in landscape mode because of the Activity Lifecycle in Android. When the device is rotated, the UI is drawn again and a new network request maybe made, this slows down the app as it is trying to execute a number of operations at once. A suggestion would be to use onSaveInstanceState to save the state of the app on rotation.
2. Memory: The data shows that more bugs are reported at higher levels of memory usage. Reduced performance or unresponsiveness may be experienced if your app handles a lot of operations on the main thread. As a best practice, all network requests, database transactions and other resource heavy operations should be done on a background thread.
3. Disk Storage: Many apps crash when they attempt to execute tasks because of low or full disk space, so they either crash or engage in unexpected behavior that results in bugs. It's true that we cannot control the disk space on a users device, but there are other alternatives to saving information. For example, instead of saving data on the device, you can store it on a server in the cloud. Firebase has a number of cloud storage options with a bunch of handy features as well.
Let me know which bugs you come across and if you find these tips helpful😉