Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android In-App-Purchase of Plugins?

I'm working on an Android app which requires plugins. These plugins are essentially asset packs for my application to use. I'll probably be creating most of these asset package plugins initially, but I want other developers to be able to create (and sell) these asset packages for my app. If you need to, think of these asset plugins as texture packs for Minecraft. These asset packs will be around 50 MB each, so it doesn't make sense to package them with the app.

The way I WANT to do it:

  1. Developer creates plugin asset APK named something specific (org.name.app_name.plugin.{MY_ASSET_PACK})
  2. Developer applies for their own Google Play developer account and lists the asset pack (free or paid) under their own name in the "Libraries and Demo" section.
  3. My app queries Google Play for all apk packages (free or paid) which match the query string (org.name.app_name.plugin.*) and lists them in a "filtered-market-view" for users of the app, allowing them to easily find plugins for the app.
  4. The user can click on these entries in my "filtered-market-view" and be redirected directly to the Google Play market and make the purchase through Play, and the developer can be compensated through this transaction. The purchased asset plugin apk is downloaded to the user's device and does not show up in the launcher. (See How to Release Application Plugin)
  5. My app indexes the packages on the phone which match the query string (org.name.app_name.plugin.*) and places them in a "plugin-selector-view" for the user to pick.
  6. My app loads and uses assets from this plugin (See How to Release Application Plugin)

The Problem

The problem exists at step 4. I can't find any way to query the store from within my app (even without wildcards). I did find this "android-market-api" project which would allow me to query the market from within my app, but it seems to require a Google Services username and password which I would have to query from the user. This is a non-starter.

Questions

  • Is there an easy way to solve this problem and get market queries in a listing directly within my app?
  • Is this the wrong way to handle application plugins?
  • Is there any way to use the existing In-App Purchase API to handle this without maintaining my own server for these packages?
like image 251
Griffin Avatar asked Aug 09 '12 22:08

Griffin


1 Answers

  • Is there an easy way to solve this problem and get market queries in a listing directly within my app?

No. This is not supported by Google and the Android API project is just a reverse engineering of the Protbuff objects that are used by the market. It can (and will!) break at any moment. Besides, it's most likely illegal. The better way is to emit a search query to the Playstore and let it handle it. It's not a big deal breaker because you will get a filtered list directly in the Playstore anyway. Don't reinvent the wheel.

  • Is this the wrong way to handle application plugins?

No, it's fine and secure.

  • Is there any way to use the existing In-App Purchase API to handle this without maintaining my own server for these packages?

No. You cannot see all purchases that a user has, only the ones that come from your own App.

like image 154
meredrica Avatar answered Oct 05 '22 10:10

meredrica