5

In my application i want to implement a trial and full version functionality for my application. In this trial version will be available to all and full version will be available to users who paid the full version. So please suggest me the ways by which i can implement such functionality?

Naveen Chauhan
  • 2,026
  • 8
  • 33
  • 40

4 Answers4

5

There are two ways to do this, that I can think of:

  1. Build 2 versions of apk files and publish twice to Android Market.
    • One will be trial version, with advertisements enabled OR with limited functinality
    • Second will be available as a paid app, with full functionality unlocked.
  2. Release the app as a trial version, and add support for in app purchases that will unlock full functionality of the app. This is usually referred to as a Freemium (http://en.wikipedia.org/wiki/Freemium) type of App.

I recommend the second way as the user will have to download the app only once.

Refer to Android's In-App Billing Documentation here : http://developer.android.com/guide/market/billing/index.html

Hope, this helps. Cheers!

Hari Krishna Ganji
  • 1,647
  • 2
  • 20
  • 33
  • But, please note that Google doesn't support Paid Apps/In-App Billing in a few countries. If you are based out a country, like India, that is not listed in this list (), then you are out of luck. Then you have to resort to third party integration for paurchases – Hari Krishna Ganji Jun 19 '12 at 10:06
  • +1 to @OvidiuLatcu. I think the Application Licensing will be a more elegant to achieve your purpose. Thanks! – Hari Krishna Ganji Jun 19 '12 at 10:13
4

The other answers is not what I would call a "Trial". The outlined solutions are more like a "Lite" vs "Pro" app approach.

I think of a trial as a full featured app that expires after X days/weeks.

Camille Sévigny
  • 5,104
  • 4
  • 38
  • 61
4

I've run into the same problem many times, so I've decided to develop a Android Trial Library which you can simply drop into your project and it will take care of all the server-side management for you (including offline grace periods).

To use it, simply

Add the library to your main module's build.gradle

dependencies {
  compile 'io.trialy.library:trialy:1.0.2'
}

Initialize the library in your main activity's onCreate() method

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    //Initialize the library and check the current trial status on every launch
    Trialy mTrialy = new Trialy(mContext, "YOUR_TRIALY_APP_KEY");
    mTrialy.checkTrial(TRIALY_SKU, mTrialyCallback);
}

Add a callback handler:

private TrialyCallback mTrialyCallback = new TrialyCallback() {
    @Override
    public void onResult(int status, long timeRemaining, String sku) {
        switch (status){
            case STATUS_TRIAL_JUST_STARTED:
                //The trial has just started - enable the premium features for the user
                 break;
            case STATUS_TRIAL_RUNNING:
                //The trial is currently running - enable the premium features for the user
                break;
            case STATUS_TRIAL_JUST_ENDED:
                //The trial has just ended - block access to the premium features
                break;
            case STATUS_TRIAL_NOT_YET_STARTED:
                //The user hasn't requested a trial yet - no need to do anything
                break;
            case STATUS_TRIAL_OVER:
                //The trial is over
                break;
        }
        Log.i("TRIALY", "Trialy response: " + Trialy.getStatusMessage(status));
    }

};

To start a trial, call mTrialy.startTrial("YOUR_TRIAL_SKU", mTrialyCallback); Your app key and trial SKU can be found on the developer dashboard.

Nick
  • 3,504
  • 2
  • 39
  • 78
2

You should also have a look at Android's Application Licensing. I am not sure if this fits exactly for what you had in mind, but I am sure that you can adapt your needs to make this work for you, and I would say that it would be the right solution.

Ovidiu Latcu
  • 71,607
  • 15
  • 76
  • 84
  • My understanding is that application licensing is an approach for user validation. So if, for example, a user buys your app on Google Play, and then gives it to a friend who side-loads it onto a device not associated with the purchaser's account, this system might detect the violation and prevent execution. However, I don't think that this facility itself supports the collection of money from a user, as in-app payments does, and if I'm correct, then that may make it inappropriate for your needs. – Carl Jun 27 '12 at 04:22