• Don Peter

How to detect and report bugs in Android apps

One of the challenges mobile app developers face is collecting as much relevant data to reproduce bugs reported during testing and more so production. In production even detecting bug occurrences becomes a challenge. Manual bug detection and data collection in Android mobile apps during testing and development environment is time consuming and in production it is near impossible. Here is where tools like Finotes aid the developers. Finotes is an automated, light-weight bug reporting SDK for Android apps that helps developers to reduce the bug fixing time by providing clear and crisp issue reports with detailed data points for effective root cause analysis.


First things first, Finotes has an easy three step integration process.


  1. Register with Finotes using the ‘Get Started’ button in https://finotes.com and login to the dashboard. 

  2. Use ‘Add App’ to link your Android app to Finotes.

  3. Integrate Finotes SDK to your app as a gradle library.


For a more detailed integration guide, visit our documentation pages for Android (Java & Kotlin).


Finotes is capable of reporting multiple bug types in Android apps. Some of the main types of bugs in Android apps are,



Types of Issues captured and reported by Finotes


Memory Leaks


Memory Leaks occur in Android apps when unused objects are not cleared from the device’s memory. Finotes SDK has out of the box capability to detect memory leaks in Android apps. and reports it to the dashboard with data points like class stack, activity trail, device and device state info. 

Memory Leak in Android


Crashes


App Crashes are fatal and will affect the user experience, which may lead to user’s uninstalling the app. 

App Crash in Android

With basic integration, Finotes SDK is capable of reporting crashes along with data points like device and device state data, activity trail and full stack trace.



API Failures


With a single line of code, Finotes SDK is capable of reporting API issues like status code errors, delayed API call executions or even duplicate API calls. Finotes reports API failures with detailed data points including network parameters like full URL, request-response headers and request body. 

API Issue in Android


Abnormal memory usage


When an app consumes a high amount of device’s memory, Finotes SDK immediately reports it. Activity trail in issue report will enable developers to identify the reason for the spike in memory usage.

Abnormal Memory Usage in Android



Function failures


Issues in code level functions like unexpected return value, delay in function execution are called function failures. Finotes SDK provides a single line API to track code level function failures. Data points like function parameters are sent along with each issue report with will aid developers in fixing the issue fast.

Function Failure in Android


Feature failures


Using the function tracking API, SDK allows developers to chain multiple functions. Once chained Finotes will monitor if the second function is executed within the stipulated time (can be set by the developer) after the execution of the first function. If not, then Finotes SDK reports it as an issue. This will enable developers to report any app feature failures.

Feature Failure in Android

Bug reports will include data points like activity trail, function parameters and return values.



Custom issues


Finotes SDK provides a single line API for developers to report any custom issues. 

Custom Issue report in Android


ANR


ANR or App Not Responding occurs due to frame rate issues in Android, that block the UI thread for more than 5 seconds. By tracing the Activity trail events, developers can reproduce and can fix ANR issues fast. 

ANR report in Android


Screen loading delay


Delay in loading of any activity or fragment will be automatically reported by Finotes SDK. 

Screen Loading delay in Android



Now, let us take a look at the data points in bug reports of Finotes that help developers to reproduce the bugs effectively. 


Data Points Explained


Error insights


Error insights help the developers to find commonalities across occurrences for faster root cause analysis. Error insights consist of information like bandwidth strength, battery level, low memory warning, OS versions, device names, country name and timezone offsets. 

Error Insights from an issue report in Android


Activity Trail


Activity trail is a list of chronologically ordered app events, that helps developers to identify where the issue occurred. It consists of three components, 

  • The Activity segment, that has the details of the app event.

  • The timestamp segment, that has time at which the event got recorded.

  • The memory segment, that shows the percentage of free memory.

Activity-trail from an issue report in Android


Stack trace


Stack trace helps the developers to track the exact line of code where the crash occurred.

Stack trace from an issue report in Android


Network Parameters


Network parameters provide in-depth information on network request and response data. Network parameters will have request headers, request body, request body size, response headers, status code and response body size. 

Network parameters from an issue report in Android


Device & Device State info


Device & Device state info gives the developer information about the device and the state of the device at the time of bug occurrence.

Device and Device State data from an issue report in Android


Function Parameters


Function parameters section of data points will contain parameter value and data type of all the parameters passed to the function being tracked during runtime.

Function parameters from an issue report in Android



Data Security & Data Privacy


Finotes SDK is architectured in such a way that all our app users remain anonymous to the system as we do not collect any PII which ensures data privacy. All data collected, sent and stored by Finotes are secured with end to end encryption. Finotes is also GDPR compliant.



Call back mechanism


For every issue that is raised by the Finotes SDK, a callback function will be triggered, which allows developers to handle the issue gracefully. You can read more about the same in our Java and Kotlin documentation pages.


Finotes is also available as Objective-C and Swift frameworks for iOS and watchOS. 

Visit finotes.com to know more about Finotes Detailed documentation is available at docs.finotes.com.