簡體   English   中英

android:是否可以在Market中銷售應用程序的附件?

[英]android: Is it possible to sell add-ons for apps in the Market?

我想免費分發我的應用程序,然后出售可以在以后添加的額外功能。 是否有可能做到這一點?

如果你在談論應用內付款,你應該看看PayPal,它提供Android的In-App-Payment:

http://www.x.com

https://www.x.com/community/ppx/sdks

如果您想通過Android電子市場分發您的應用,則需要將每個插件作為一個應用提供。 可能不方便。

是的,你可以做到。 市場上有各種插件,可用於更好的鍵盤應用。

您有不同的方法可以執行此操作,這是我已經嘗試過的兩種方法。

1)您可以實現應用程序中的所有功能以及解鎖此功能的關鍵應用程序。 這是一個簡單且不安全的實現,關鍵應用程序和主應用程序需要使用相同的密鑰簽名:

 public boolean isPackageAvailable(String packageName) {
                int sigMatch = getPackageManager().checkSignatures(getPackageName(), packageName);
                return sigMatch == PackageManager.SIGNATURE_MATCH;
        }

檢查market-enabler.googlecode.com上的MarketEnabler,看看我是如何使用它的(不是一種安全的方式,而是一個起點)。

2)您將插件應用程序作為意圖包含在子視圖中,因此它看起來只是一個分為多個apk的應用程序。

訪問http://speakerproximity.googlecode.com ,在其中我將其用於在主視圖中包含設置視圖:

....
public class SpeakerProximity extends ActivityGroup {
....
mainLayout.addView(getViewFromIntent("preferences", new Intent(
                                        this, PreferenceScreen.class)));
....
public View getViewFromIntent(String tag, Intent intent) {

                /** start an activity inside an ActivityGroup and get the window handler **/
                final Window w = getLocalActivityManager().startActivity(tag, intent);

                /** extract the view out of the window handler **/
                final View wd = w != null ? w.getDecorView() : null;

                return wd;
        }
...

請注意,我擴展了ActivityGroup而不是Activity ;-)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM