Monday, June 24, 2019

Updated our Business Quotes Android App


Recently I released an Android App for showing Motivational Quotes for Business People.
The aspiring Entrepreneurs can freely download it from play store and share your review comments.

After publishing this App, I have noticed a small issue. When sharing the quotes to social media using the Share button, the app was showing the HTML code of the link. It was not looking good and occupying more space.

I fixed this issue by striping the HTML using below code as suggested here.
public String stripHtml(String html) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY).toString();
} else {
return Html.fromHtml(html).toString();
}
}


And, Google play console suggested me to set the Android Target API version 28 i-e Android 9 (Pie).
So, I updated the target version and updated the related dependencies.



Also, Google play suggested me to optimize the app for reducing the file size by enabling code shrinking and obfuscation.

It was showing below the message.
Enable code shrinking (also known as minification) to remove unused code and resources from your release build. Enable obfuscation to shrink class, method, and field names to reduce app size and help prevent reverse engineering of your app

So, I updated the gradle file by including below code as specified here.

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}

It helped to reduce the file size of the App.


And, finally added a few more Business Quotes and updated the app to the play store after testing it on my mobile and Android emulator and then on Firebase Lab.

You can download it from here and let me know your feedback.

Apart from doing these things, I  did a detailed analysis about firebase notification behaviour. I found that FCM notification was not working on latest android devices if the App is closed (i-e running on background). It seems there is no suitable solution to handle this issue other than asking the users to enable auto-start for the app. I am still exploring options to find appropriate solution to manage the nofication effectively. 

No comments:

Search This Blog