IStoreAssets

Boris Spektor edited this page Mar 21, 2016 · 3 revisions

IStoreAssets is the interface that represents your application-specific information. android-store needs you to implement this interface with your own class and initialize SoomlaStore with it.

Interface

  • int getVersion()

    This value will determine if the saved data in the database will be deleted or not. Bump the version every time you want to delete the old data in the DB. If you don't bump this value, you won't be able to see changes you've made to the objects in this file.

    NOTE: You can NOT bump this value and just delete the app from your device to see changes. You can't do this after you publish your application on the market.

    For example: If you previously created a VirtualGood with name "Hat" and you published your application, the name "Hat will be saved in any of your users' databases. If you want to change the name to "Green Hat" than you'll also have to bump the version (from 0 to 1). Now the new "Green Hat" name will replace the old one.

  • VirtualCurrency[] getVirtualCurrencies()

    Create an instance of all your desired _VirtualCurrency_s. For every currency, you'll have to provide: name, description and itemId.

  • VirtualGood[] getVirtualGoods()

    android-store requires that you provide a list of VirtualGoods. This needs to be an exact representation of your game's virtual goods.

  • VirtualCurrencyPack[] getVirtualCurrencyPacks()

    You're also required to provide android-store with a list of your VirtualCurrencyPacks. The virtual currency packs are representations of currency packs that the user can purchase from Google Play.

  • VirtualCategory[] getVirtualCategories()

    We believe that VirtualGoods are always categorised. If you don't categorize your VirtualGoods, just add one 'GENERAL' VirtualCategory as we do in our MuffinRush example.


All the model objects above are described in Economy Model Objects.


Usage Example

See MuffinRushAssets