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

旧时模样 提交于 2019-12-13 12:23:23

问题


I would like to distribute my app for free, and then sell extra features that can be added-on later. Is it possible to do this?


回答1:


If you're talking about in-app payment, you should take a look at PayPal, which offers In-App-Payment for Android:

http://www.x.com

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

If you want to distribute your app via Android Market, you would need to offer each add-on as an invididual app. Probably not a convenient way.




回答2:


Yes you can do it. There are addons all over the market for the better keyboard app.




回答3:


You have different ways you can do this, here are two ways I already tried.

1) You could implement all the features in the app and a key app that unlocks this features. Here is a simple and insecure implementation, the key app and the main app need to be signed with the same key:

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

Check MarketEnabler on market-enabler.googlecode.com to see how I used it (not not a secure way but a starting point).

2) You include the plugin app as intent into a subview so it looks like just one app splitted to multiple apk's.

Check http://speakerproximity.googlecode.com where I used it to include the settings view inside the mainview:

....
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;
        }
...

Note that I extend ActivityGroup and not Activity ;-)



来源:https://stackoverflow.com/questions/4083965/android-is-it-possible-to-sell-add-ons-for-apps-in-the-market

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!