简体   繁体   English

在Android Market上发布android应用程序

[英]Publishing android application on android Market

I have a requirement for an android application whereby the application is sold as modules. 我需要一个Android应用程序,其中应用程序作为模块出售。 In summary the application will have 3 modules and users can choose to buy 1, 2 or all of the 3 modules. 总之,该应用程序将有3个模块,用户可以选择购买3个模块中的1,2个或全部。 For example user A can choose to buy only module 1 where he gets only features A and B. User B buys 2 modules and he gets Features A, B, C,D and user C buys all 3 modules and they get all the features of the whole application. 例如,用户A可以选择只购买模块1,他只获得功能A和B.用户B购买2个模块,他获得功能A,B,C,D,用户C购买所有3个模块,他们获得了所有功能整个申请。

The 3 modules all pertain to the same application. 3个模块都属于同一个应用程序。

How can we implement the licensing for this type of application so that the user can choose to buy 1, 2 or all 3 modules. 我们如何实现此类应用程序的许可,以便用户可以选择购买1,2或全部3个模块。 Any help will be greatly appreciated. 任何帮助将不胜感激。

您可以创建一个免费应用程序,然后让用户使用androids In-app Billing购买不同的模块或模块组合

you can check for the installed package, I use this in one of mine where a barcode scanner is nessesary: 你可以检查已安装的软件包,我在我的一个条码扫描器是必需的:

public final class MainActivity extends Activity {

    private static final String BARCODE_PACKAGE = "com.google.zxing.client.android";

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
        }

        if (checkForBarcodeApp() == false) {
            Button installBtn = (Button) findViewById(R.id.bt_Install);
            installBtn.setOnClickListener(mInstall);
            installBtn.setVisibility(View.VISIBLE);

            TextView installTxt = (TextView) findViewById(R.id.tv_Install);
            installTxt.setVisibility(View.VISIBLE);
        }
        else {
            Button installBtn = (Button) findViewById(R.id.bt_Install);
            installBtn.setVisibility(View.INVISIBLE);

            TextView installTxt = (TextView) findViewById(R.id.tv_Install);
            installTxt.setVisibility(View.INVISIBLE);
        }

    public final Button.OnClickListener mScanQRCode = new Button.OnClickListener() {
        public void onClick(View v) {

            checkForBarcodeApp();
            try {
                Intent intent = new Intent(
                        "com.google.zxing.client.android.SCAN");

                intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
                startActivityForResult(intent, 0);
            } catch (ActivityNotFoundException e) {
                Toast.makeText(
                        MainActivity.this,
                        "You need to install the barcode scanner first",
                        Toast.LENGTH_SHORT).show();
            }
        }
    };
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM