如何解锁premium功能的应用程序的关键

如何解锁premium功能的应用程序的关键

本文介绍了如何解锁premium功能的应用程序的关键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图执行一个亲键我的Andr​​oid应用程序进行解锁,应在试用版(相同的应用程序没有密钥)...

锁定功能

我发现了一些想法和一些解释code(例如的),但如果我测试这个东西它难道不做任何事情。我的应用程序犯规承认包。

在应用程序的计费解决方案,由谷歌是太多复杂的我。我看了纪录片了很多次,但它看起来太奇怪了我。 puhhh。 : - /

哦的人...我花了这么多天,周,我的应用程序,现在发布的是最令人沮丧的任务来完成。

我希望有人能帮助我。

德国最良好的祝愿
马丁

编辑:
我试着在我的共享preferences这样的方式来实现这一点:

 如果(isProInstalled(本)){
        加preferencesFromResource(R.xml.settingsactivity);
        preferenceManager.setDefaultValues​​(SettingsActivity.this,
                R.xml.settingsactivity,FALSE);
        的for(int i = 0; I<获得preferenceScreen()获得preferenceCount();我++){
            initSummary(GET preferenceScreen()获得preference(I));
        }
    }其他{
        加preferencesFromResource(R.xml.settingsactivity_pro);
        preferenceManager.setDefaultValues​​(SettingsActivity.this,
                R.xml.settingsactivity_pro,FALSE);
        的for(int i = 0; I<获得preferenceScreen()获得preferenceCount();我++){
            initSummary(GET preferenceScreen()获得preference(I));
        }
    }
}


解决方案

您将不得不作出一个亲和的应用程序,他的非专业版,并seperatelly卖给他们。要做到这一点,而不这样做的唯一方法是使应用内购买,并按照谷歌的指南应用内购买。

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 GermanyMartin

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));
        }
    }
}
解决方案

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.

这篇关于如何解锁premium功能的应用程序的关键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 14:21