Question

I tried to implement a "pro key" for my android app to unlock features which should be locked at "trail version" (the same app without the key)...

I found some ideas and some explained code (e.g. this), but if I test this stuff it wouldnt do any thing. My app doesnt recognize the "package".

The in-app-billing solution by google is much to complicated for me. I read the documentary a lot of times but it looks so weird to me. puhhh. :-/

Oh man... I spent so many days and weeks for my app and now the release is the most frustrating task to do.

I hope somebody could help me.

Best wishes from Germany Martin

Edit: I try to implement this in my SharedPreferences like this way:

if (isProInstalled(this)) {
        addPreferencesFromResource(R.xml.settingsactivity);
        PreferenceManager.setDefaultValues(SettingsActivity.this,
                R.xml.settingsactivity, false);
        for (int i = 0; i < getPreferenceScreen().getPreferenceCount(); i++) {
            initSummary(getPreferenceScreen().getPreference(i));
        }
    } else {
        addPreferencesFromResource(R.xml.settingsactivity_pro);
        PreferenceManager.setDefaultValues(SettingsActivity.this,
                R.xml.settingsactivity_pro, false);
        for (int i = 0; i < getPreferenceScreen().getPreferenceCount(); i++) {
            initSummary(getPreferenceScreen().getPreference(i));
        }
    }
}
Was it helpful?

Solution

You will have to make a Pro and a Non-pro edition of he app, and sell them seperatelly. The only way to do this without doing so is to enable in-app purchases and follow google's guide for in-app purchases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top