If you’ve gone through the process of releasing an app to Google Play (formerly called the Android Market), you know the frustrations of a completely user centric rating system. User ratings play a huge role in where your app ranks on Google’s coveted top 500 list, and it influences new users who are considering downloading your app. Yet it’s often tough to get users to rate your app, because there is no incentive and the process of navigating to an app in the market in order to review it is a bit clunky.

There is also a problem of misuse of the market in regards to ratings. Often users who don’t know better will use the market along with a low rating in an attempt to elicit tech support from a developer. This is flawed for everyone involved; it lowers the rating of the app, scares away new users, and worst of all, as a developer I have no way to get in touch with users who rate my app. (Per Google privacy policies, the raters remain anonymous.)

Last week, I was discussing this issue with a buddy and fellow engineer. I was particularly peeved because a user gave my app low marks, stating that he would be happy to re-evaluate once I added a help screen. The problem is the app already has a help screen. Trying my best to accommodate, I made the help button more prominent on the home screen and pushed out an update. As is often the case however, the user didn’t update the rating or his review, and Google provides no mechanism for developers to remove incorrect or irrelevant user comments.

After tossing some ideas around, my buddy and I came up with a proposed solution. We had two goals: (1) to make it easier for users to find and rate an application in the marketplace, and (2) to re-route users who should be contacting tech support before entering something inappropriate or inaccurate in the market ratings.

This tutorial is a very crude implementation of an algorithm that attempts to address the aforementioned issues with Google’s current market rating schema. Feel free to download the source code, or follow along with the step-by-step instructions provided below. Keep in mind this is a work in progress; I’ve yet to push the solution out to my own production apps, and I have a couple of enhancements planned before I do. In the meantime, I would love to hear from TechRepublic readers, particularly if you have tried a similar approach and, if so, what level of success you’ve had.

1. Start a new project in Eclipse. Target Android 1.6 or higher. Rename the activity created by the wizard to Main.java.

2. Before going to production, more than likely you would want to implement the algorithm using a dialog. However, just to keep this proof of concept short, I’m using a full-screen activity. That said, whether you’re extending the dialog or activity class, the first task is to define a layout. Below is my /res/layout/main.xml file.

main.xml
?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:paddingTop="20dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="16sp"
android:textColor="#00ff00"
android:text="Demo Rating Schema" />
<TextView
android:layout_margin="15dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Taking a few seconds to rate an app is very important for the developer. It allows us to continually improve the experience, and, helps other users decide whether an app is right for them. How about telling us what you think?" />
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="*"
android:layout_margin="15dip"
android:gravity="center">
<TableRow >
<Button
android:id="@+id/i_love_it"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:width="0dip"
android:text="I love it!"/>
<Button
android:id="@+id/needs_work"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:width="0dip"
android:text="Needs work!"/>
<Button
android:id="@+id/maybe_later"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:width="0dip"
android:text="Maybe later."/>
</TableRow>
</TableLayout>
</LinearLayout>

3. Now we can move on to our Main.java file. The implementation is nothing more than wiring up a couple of button handlers and launching intents in response to those buttons.

Main.java
package com.authorwjf.rate_me;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class Main extends Activity implements OnClickListener{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
findViewById(R.id.i_love_it).setOnClickListener(this);
findViewById(R.id.needs_work).setOnClickListener(this);
findViewById(R.id.maybe_later).setOnClickListener(this);
}
@Override
public void onClick(View v) {
Intent i = null;
switch (v.getId()) {
case R.id.i_love_it:
//use your app id below!
i = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.authorwjf.cheese"));
startActivity(i);
break;
case R.id.needs_work:
i = new Intent(android.content.Intent.ACTION_SEND);
//use your e-mail address below!
i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"ob1@cheesejedi.com"});
i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Needs Improvement!");
i.setType("plain/text");
startActivity(i);
break;
case R.id.maybe_later:
//Go ahead and continue with your application
break;
}
}
}

If you’d like to run this project for yourself, you will have to load it to an actual device; some of the intents don’t work properly on various emulator combinations.

After so much build-up, you were probably expecting something more revolutionary, but remember that in software engineering not all problems are technical ones. We had two goals from the onset: get users who like the app to the market to rate it, and get feedback from those who have an issue with the app to the developer.

In the sample source code, when a user clicks “I love it!” they are sent directly to my app in the market without any fuss or searching. If a user clicks “Needs work!” an email is started, with all the necessary fields pre-populated. In my production version, I plan to keep track of which users have rated the app and which haven’t, so that I can pop up periodic reminders. Perhaps getting rid of a “nag” dialog will provide users with some extra incentive to rate my application, or perhaps it will lead to me getting an inbox full of “Needs Improvement!” emails. Either way, I hope to open a communications channel for a meaningful dialogue with my users.

Figure A

Figure B

Figure C