Tuesday, July 2, 2019

Updated our Motivational Quotes App to include "Night Mode" feature and to add Author Links.


I have released new version (versions 1.11) of our Motivational Quotes App  with below features.

  • Added Night Mode /Dark Mode Option.
  • Added Clickable Links to Author Names.
  • Optimized the Code to reduce file size.

A lot of people downloaded our Quotes App from Google play store. It is good to know that more than 20K people installed it in their mobile devices. But the DAU (Daily Active Users) and Active Installations are very low.
Based on the users' feedback, I thought adding Night Mode option can fix this user retention problem.


I had provided navigation buttons, shuffle button and Rate button at bottom of the screen for this App. Since there is no space available for adding any additional button, I decided to add Tool bar / Action bar menu for including Night Mode feature.

I added the Toolbar by including below piece of code in the layout xml file of the main activity.

<androidx.appcompat.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentTop="true"
android:background="?attr/colorPrimary"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"

/>
Then changed the Apptheme as Theme.AppCompat.DayNight.NoActionBar


And, then called setSupportActionBar at the starting of the onCreate in the main activity.

//for showing Toolsbar/Action bar
Toolbar my_toolbar = findViewById(R.id.my_toolbar);
setSupportActionBar(my_toolbar);

Then I created, menu.xml to include the menu items.  I added few other menu items in addtion to the Night Mode menu.


<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/menuNightMode"
android:title="Change Night Mode" />

<item
android:id="@+id/menuBooks"
android:title="Quotes Books" />

<item
android:id="@+id/menuVideo"
android:title="Quotes Video" />
<item
android:id="@+id/menuPrivacy"
android:title="Privacy" />
</menu>

Added below function for creating the menu by populating the menu items.

//For showing Tool bar menu
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.menu.menu, menu);
return true;
}

For implementing the menu action, I added below piece of code.

@Override
public boolean onOptionsItemSelected(MenuItem item) {

switch(item.getItemId()){
case R.id.menuNightMode:
if (AppCompatDelegate.getDefaultNightMode()==AppCompatDelegate.MODE_NIGHT_YES) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}
else {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);

}
this.recreate();
break;

case R.id.menuBooks:
open_url("https://www.thequotes.net/motivational-ebook/");
break;

case R.id.menuVideo:
open_url("https://www.youtube.com/watch?v=7pfwBa9Ibvw");
break;
case R.id.menuPrivacy:
open_url("https://www.blog.qualitypointtech.com/p/android-app-privacy-policy.html");
break;


}
return true;
}

I used AppCompatDelegate for setting the Night Mode option. I came to know that the Night mode change will come into the effect only after restarting the Activity. I spent a lot of time in adding code for restarting the activity without losing the state.
Finally, I found that it can be done by just using recreate() method.

It was working properly. i-e The current page was brought back while restarting the activity. But I found a problem when using Shuffle button. It was not keeping the shuffled order after the restart. So, I included the suffled data into the savedInstanceState bundle by overriding onSaveInstanceState.

protected void onSaveInstanceState(Bundle savedInstanceState) {

super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putStringArray("pagedata", pageData);

}
And, within onCreate(), I included below piece of code the load the shuffled quotes when restarting the Activity.

//Get the data to be swiped through
if (savedInstanceState != null) { //reload the quotes to keep the same order when restarting the activity
pageData=savedInstanceState.getStringArray("pagedata");
}
else //load data first time only
{
pageData = getResources().getStringArray(R.array.quotes);
}
Now I hope everthing is working fine. Let me know if you find any error.

As I explained in my previous post, I added clickable links to the Authors. It will help the App Users to know more about the Author of the Quote and read more Quotes of that Author.

I had to work really hard to add the Author links to around 900 Quotes. Let me know if you find any incorrect or broken links.

And, I optimized the code to reduce the file size as explained in my previous post. I replaced the Android support libraries with equivalent AndroidX libraries

You can install/update the app from Google Play Store here

Let me know if you have find any error when using this App. And, if you like this app, Review/Rate it and refer this to your Friends.

I am planning to add the Night Mode feature to my other apps also.

Read more ...

Friday, June 28, 2019

Released an Android App to show Famous English Proverbs


I had published this Proverbs Video many years back, and more than 40K People watched this video. But reading Proverbs on Video may not be convenient as everyone will be reading the text at a different speed.



So, I released an Android app to read these Proverbs conveniently. You can freely download it from the Google Play store.

This Proverbs app provides a lot of Famous English Proverbs. We can read them simply by swiping them or by tapping the Right/Left arrow buttons. And, read a Random Proverb by pressing the "Shuffle" button.

It is a very simple App. So, the download Size will be less. And, it won't occupy more space on your device, and it will work offline.


Download it now and if you like this app, add your Rating and Review comments at the Play Store page.
Read more ...

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.

Read more ...

Friday, June 21, 2019

Released Free Android App for showing Business Motivational Quotes


A few years back, I had published an Android App for showing Motivational Quotes. I am not having much experience with Android App development. So, I developed this App with simple features as an attempt to start learning Android App development.

Surprisingly this App was downloaded by many People and it is getting good review comments and ratings. So, I realized that many people like simple Apps though a lot of apps with many amazing features available in the play store.

It made me to release Bible Quotes App based on the same code. This one is also performing well.

https://play.google.com/store/apps/details?id=com.qualitypointtech.businessquotes

So, recently I decided to publish an App for showing Business Quotes as I thought this App will be useful to tell about our Timesheet Offer to the potential customers easily.

I created this Business Quotes App similar to my previous App except adding a clickable hyperlink to the author name.

Initially, I thought adding clickable hyperlink will be easy. But I had to refer various articles to know the way for doing it. Finally I found this page helpful for completing this.

As suggested in that page, I had to do below things.

First I had to use the HTML entity encoding while specifying the link and text in the String Resource.



And, I had to set the below option in the TextView.

android:linksClickable="true"

Apart from doing these two things, I had to use setMovementMethod before using the setText.

((TextView) findViewById(R.id.your_text_view)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView) findViewById(R.id.your_text_view)).setText(Html.fromHtml(getResources().getString(R.string.string_with_links)));

It is working properly during my testing. But I am not sure if it will work for all devices. Let me (rajamanickam.a@gmail.com) know if you find any issue when using this Business Quotes App.

If everything is going smoothly, I am planning to do the same thing for my previous Motivational Quotes App also.

Read more ...

Friday, June 14, 2019

Future technology that will shape higher education in India


This Article is a Guest Post.

One of the most significant factors in defining a country’s future is education. India - a country famous for its many educational institutions - is facing a change in this sector due to evolution in technology. We are rapidly shifting towards test apps, online learning platforms, and other resources available on the internet.

Preparation of IAS exam has not been untouched from this paradigm shift. Hi-tech classrooms for preparation, digital books, apps and online learning platforms are taking the IAS preparation to the next level. Candidates can also make use of study materials available on websites and other online communities.

Here are some of the trends that indicate how technology is going to be a significant factor in higher education in India:
Read more ...

Follow By Email