One of the core benefits of Java that she is a garbage-collected language. That means we can create objects, and the garbage collector will take care of allocating and freeing up the memory for us.
Although we have the garbage collector, unfortunately, we can prevent him from doing his job by making some code mistakes. Those mistakes are causing memory leaks. The leaks can affect our android app by wasting unreleased memory and eventually causes to out of memory exceptions and lags.
Failure of releasing unused objects from the memory
That means there are unused objects in the application that the garbage collector cannot release from memory. So the memory unit is occupied until the end of the application/method. …
A Powerful library to control and simplify the usage of shared preference in android which provides utility on top of Android’s normal SharedPreference class.
So simple if you want to access preference file there is two option.
Preference preference = PowerPreference.getDefaultFile();
Preference preference = PowerPreference.getFileByName("name");
There is no need to pass context the library uses a provider to catch the context when the application is start.
Before moving to save and getting preferences. Let us check which data we can store in preferences
To Write data to preference file all you should do is to call put method with key and value that you want to store in the file. …
With the announcement of Android Oreo, Google focuses on giving the users an extensive suite of customization, they have taken a step further with two new capabilities: notification channels and notification dots. Everything was running great on the app until I started getting bad feedback.
Last week I got some negative reviews and feedback about a strange issue, the users complained that the app makes the phone restart.
In the beginning, it sounded illogical having this issue in the production. Indeed we have 100,000+ monthly active users and just a few of them actually reported this problem. But the users are always right! So we gave a high priority to solve the problem and be able to answer the users ASAP. First of all, we collected the needed data in order to reproduce the problem and to understand what happened to these users. …