Developer Console
Appstore Blogs

Appstore Blogs

Want the latest?

appstore topics

Recent Posts

Archive

Showing posts by peter heinrich

September 25, 2013

Peter Heinrich

 

 Following up on the latest in a series of webinars covering Amazon devices, game services, and mobile applications, here’s a list of questions we collected during and after our presentation on the Amazon Mobile Associates API.

Q: Is the advertising fee fixed (6%) for all products?

A: Products belonging to certain categories have fixed fee rate ranging between 4-6%. Products in the General products category have a volume based fee rate between 4-6%. See Table 3 and 4 at the here.
 

Q: Do you plan to serve also the non-US users in the future?

A: Great request. We’ll be sure to pass this along to the product team.
 

Q: Does this mean we will not get credit for mobile users making purchases through our websites which use the regular api?  Can we use the new mobile API on our websites where we have both mobile and desktop users making purchases, and get credit for both?

A: The Mobile Associates API is available only for Native Android Apps. Mobile Associates is linked to a new Associates account that we create for you when you accept the Amazon Mobile App Distribution Agreement and create your developer account. Reporting for your Mobile Associates account is only available on developer.amazon.com. You can continue to use Associates Central to access your pre-existing Associates account information. If both your Mobile and pre-existing Associates account earn advertising fees, they will result in separate payments.
 

Q. How do I select and specify products I want to offer in my app?

A: You can either offer specific product(s) in your app or offer product(s) that fulfill certain criteria.

To offer specific products, first you need to select the products that you want to offer. You can do that by going to Amazon retail website, determining the products you want to offer, and looking up their products IDs. Product IDs are also called ASIN. You can find details of finding product IDs here.

You can also offer product(s) that fulfill certain criteria. You can do this by specifying a search keyword, and product category. The API will return product(s) that fulfill that search criteria in the given category. You also have the option to sort and filter the search results.
 

Q. How can I get product information including properly formatted price of a product?

A: You can retrieve a product information using search and searchByID(..). Search API allows you to search for products using keyword and category. As part of the search results the API also returns product information that includes productID, title, description, image URL, price, and rating. searchByID allows you to lookup product(s) using productID. As part of the response, the API returns product title, description, image URL, price and rating.

The product information returned by both methods, search(..) and searchByID(..) are part of the Product class. You can call Product.getPrice to get the Price object. You can use the Price object to retrieve the monetary value, currency and the properly formatted price.

Note: search and searchByID APIs are only available if you app is distributed though Amazon Appstore for Android
 

Q. Can I offer digital products like ebooks, digital video etc. in my app?

A: Yes, you can offer digital products like ebooks, digital video etc through the Mobile Associates. Digital products are available for sale through DIRECT_WITH_DETAIL and DIRECT_WITH_PREVIEW purchase experiences. Digital products are not available for digital bundling feature i.e grant a virtual item based on a purchase of a product from Amazon.
 

Q. How can I check if a product is in stock and available for sale?

A: You can check if the product is in stock and available for sale by calling searchByID API. You can specify the productID of the product you want to offer in the SearchByIDRequest. SearchByIDResponse object will be delivered to your app through the ShoppingListener.onSearchByIDResponse callback. You can call SearchByIDResponse.getUnavailableProductIDs to check the products that are unavailable in your SearchByIDRequst. As a best practice you must always check if the product is available before offering it to the users in your app.

Note: search and searchByID APIs are only available if you app is distributed though Amazon Appstore for Android
 

Q. How can I get information on products that are available in different colors and sizes?

A: Products that are available in different shape and sizes are called variations. You can find product ID of a specific variation of a product on Amazon retail website. You can offer variations of the same products in your app by specifying the product ID of each variation in your app.

The Amazon product detail page handles variations. If a product has variations, users will be able to find and select variations on the Amazon product page. The Amazon Product detail page is presented to the user when you call the purchase(..) API and with IN_APP or DIRECT_WITH_DETAIL purchase experience.

You cannot retrieve product variation programmatically through the Mobile Associates API.
 

Q. Can I search for certain class of products using the API?

A: Yes you can search for products by specifying keyword and category. You can programmatically retrieve search results using the search API. Note: the search API is only available if your app is distributed through Amazon Appstore.

You can direct users to a search result page on Amazon site using LinkService.openRetailPage method and OpenSearchPageRequest request object.
 

Q. What are the available search categories?

A: Available search categories and list of available sortType and filters are available here.
 

Q. Can I filter and sort the search results?

A: Yes, you can specify the sort type and filters for search results. The available sort types and filters depend on the product categories. You can find the complete list here.
 

Q. Do I need to track the current user?

A: If you are implementing a digital bundle, you should keep track of granted virtual items based on the current logged in use. If the user changes you should retrieve the purchase receipts for the current user by specifying offset.BEGINING in the getReceipt call and make sure that you grant the items owned by the new user. You would also want to ensure that the new user does not have access to items owned by the previous user. 
 

Q. When should I grant the digital item if I am implementing a Digital Bundle?

A: You should grant the digital bundle when the receipt for the purchase is delivered to your app. You will have to request for the receipt as part of the purchase call by setting the receiveReceipt flag to true. You should only set this flag to true if you are implementing a digital bundle.

When you set receiveReceipt to true, if the PurchaseResponse.Status is SUCCESSFUL in onPurchaseResponse, you can call PurchaseResponse.getReceipts() to retrieve the receipt for the purchase and grant the digital bundle. 

If you receive PurchaseResponse.Status as PENDING, you will have to rely on ShoppingService.getReceipts(..) to get the receipt for the purchase. You must call getReceipts in the onResume method of the main activity and also in onResume of any activity that implements the Mobile Associates API functionality. This will ensure that when the transaction goes through, your app receives the receipt and grants the digital bundle.

 

Q. What if the customer cancels the order or returns the product that has a digital bundle?

A: If a customer cancels the order or returns the product that has an associated digital bundle, the receipt for that order is marked as canceled and delivered to your app when you call ShoppingService.getReceipts(..).You may want to revoke the granted digital item in this case. Hence, when implementing a digital bundle, you must track the receipts (preferably on your server) for which you have granted a digital item. You must also de-dupe the receipts using receiptID to ensure that you do not grant or revoke a digital item multiple times.
 

Q. On a successful product purchase, how can I check the product that corresponds to the purchase request?

A: Note: You can only find the product corresponding to the successful purchase if you are implementing an IN_APP shopping experience and you specify receiveReceipt to true (i.e implement a digital bundle) in the ShoppingService.purchase(..) method.

If you are implementing an IN_APP shopping experience and you specify the receiveReceipt to true, you will be able to retrieve the receipt for the successful purchase by calling PurchaseResponse.getReceipts(..) in ShoppingListener.onPurchaseResopnse callback. By calling Receipt.getProductID(..) you can retrieve the product ID of the product that corresponds to the purchase request. 
 

Q. How do I test my implementation?

A: You do not require any additional tools to test your implementation for LinkService or DIRECT_WITH_DETAIL and DIRECT_WITH_PREVIEW purchase modes. However, to test IN_APP purchase mode and digital bundling functionality, you will need Amazon App Tester. Amazon App Tester enables you to test you IN_APP shopping and digital bundling feature in a production like environment.
 

Q. How do I get Amazon App Tester?

A: You can get the Amazon App Tester from Amazon Appstore for Android. See details here.
 

Q. What reporting is available for the Mobile Associates API?

A: Earnings and Payment reports for the Mobile Associates API are available through the Amazon Mobile App Distribution portal. You can view the earning reports based on shipped units, revenue, and net earnings. You can view sales, returns and net earnings for each of your app that integrates with the Mobile Associates API. You can also view this information for individual products that are sold through your app.
 

Q. How can I check at runtime what features of the Mobile Associates API are available?

A: You can check the available features at runtime by calling ShoppingService.getServiceStatus(..) method. This will result in a callback ShoppingListener.onServiceStatusResponse(..) with ServiceStatusResponse as a parameter. You can use ServiceStatusResponse to

  • Check if receipt functionality (digital bundles) are supported by calling ServiceStatusResponse.canGetReceipts()
  • Check if search functionality (search and searchByID) is supported by calling ServiceStatusResponse.canSearch()
  • Check the available purchase experiences by calling ServiceStatusResponse.getSupportedPurchaseExperiences()

Q: I am using b4a IDE to create android apps. The group using this IDE is considerably large. Can I use your API in our apps using this IDE.?

A: We do not provide specific support for b4a IDE. However, the Mobile Associates API is a standard JAVA library that should work with any IDE supporting Android development.
 

Q: Is it possible to integrate the API into non-Android devices like the iPhone/iPad? Or is there any way to do mobile affiliate linking for iOS? 

A: MAA does not work on iOS. We’ll be sure to pass this along to the product team. You can monetize your mobile website on iOS devices through our standard affiliate program.
 

Q: Most apps are trying to reach global market.  Would like to hear that Amazon is starting to think about how MMA can work in more countries.  Maybe even plans to support e.g. Europe & Japan once MMA is working smoothly in USA.

A: Great request. We’ll be sure to pass this along to the product team.
 

Q: Are there any plans to allow shopping with MA API for digital goods, or is there a process in place for applying for that ability today?

A: Mobile Associates provides the ability to offer both physical and digital goods
 

Q: Any more detail on using the war file to test receipts?

A: Please see the section on Testing you App here.
 

Q: Is there an Adobe AIR native extension available?

A: Not currently. We’ll be sure to pass this along to the product team.
 

Q: Is it possible to interact with wish lists via the API?

A: Great request. We’ll be sure to pass this along to the product team.
 

Q: If we have sales through our regular website using our regular api and the customer is using a mobile device will we still get the same fees?

A: The standard Associates Program now allows affiliates to earn advertising fees by referring traffic from mobile optimized websites in addition to traditional websites.
 

Q: Can we see sample apps that are making money with the Mobile Associates API?

A: Please check out the Mobile Associates API site for more information.
 

Don’t miss out on our next webinar event: 
Best Practices: How to Integrate Amazon Maps in Your App
on October 3rd, 2013 @ 10:00 AM
Pre-register here! 

 

 

September 24, 2013

Peter Heinrich

If you’re a developer, you know that practically everything has an online component today, including mobile applications. Going online is so fundamental to mobile development, right down to how apps are delivered, it’s no wonder that innovation in the cloud should so closely track the rise of mobile computing devices.

It may also explain the fact that mobile has already redefined software monetization, since mobile apps can reach an audience orders of magnitude larger than traditional software and take advantage of a network connection to keep them engaged. In-app purchases are cheap and convenient for customers, while developers can rely on cloud services to process transactions and make money at scale.

The landscape is always changing, though, which is one of the reasons we developed the Mobile and Gaming track at AWS re:Invent this year. It allows us to dive deep into new technologies that drive (and are driven by) mobile development like the Amazon Mobile Associates API, which extends In-App Purchasing to any physical or digital product sold on Amazon. The service creates new opportunities to monetize in your app, but it’s not the only one. Taking In-App Purchasing to the Next Level: Selling Physical Goods through Your App & Other Monetization Strategies will demonstrate through case studies and code samples how you can use this and other Amazon services to generate more revenue on mobile.

AWS re:Invent 2013 is fast approaching, so I hope you’ll take a moment to peruse the great mobile and gaming content available this year, then sign up before registration is full. It will be a fun and informative week in Las Vegas, November 12-15. See you there!

 

September 11, 2013

Peter Heinrich

The Mobile and Gaming track at this year’s AWS re:Invent conference is coming together! As our speaker list continues to grow, we’re adding more great content every day.  Topics like mobile game architecture, scaling, cutting-edge in-app purchasing, and cross-platform development are just a few of the areas we’ll explore, mixing case studies with technical deep dives and coding demonstrations.

We’ve also got some great practical sessions in store, like Coding Tips You Should Know Before Distributing your HTML5 Web App on Mobile Devices. The HTML5 state of the art is finally beginning to deliver on its cross-platform promise, with significant advances in performance, development tools, and support for native device APIs becoming available daily. This session will look under the hood and explain how to get the most out of the technology, especially when it comes to rendering and optimization.

We’ll also discuss new ways to profile and debug your web app directly on a mobile device, a process which has been non-trivial until now. If this has been a pain point in your web app development, Amazon’s Web App Tester tool may be just what you need. It extends web app tool support, even to apps running outside of the browser.

This is just one session of many at AWS re:Invent 2013 dedicated to mobile and game developers. Take a look at the sessions we have so far, and don’t forget about our pre-conference technical bootcamp. Register now and join me in Las Vegas this November.

September 10, 2013

Peter Heinrich

Does your mobile app or game offer in-app purchase? Did you know that you can easily add support for any physical or digital product available on Amazon? The new Amazon Mobile Associates API makes it possible, whether you distribute your app on the Amazon Appstore or elsewhere.

Join us live at 10am on Tuesday, September 17 for a webinar explaining Mobile Associates and how to integrate it into your own mobile Android applications. We’ll cover topics such as direct linking to Amazon product and search pages (optimized for the mobile experience), in-app product preview, and bundling virtual digital items with physical purchases. Be sure to stick around for live Q&A following the presentation.

Don't miss out:
Tuesday, September 17, 2013
10:00-11:00am PDT
Pre-register here!

 

 

 

September 09, 2013

Peter Heinrich

Mobile app and game developers, we want to hear from you! Please complete our brief survey to help define the session content offered at AWS re:Invent 2013 as part of a dedicated track on app and game development for mobile devices. We’ll also use your input to guide the agenda of our pre-conference bootcamp, which will combine presentations with hands-on coding for a full day of intense instruction.

Register now for AWS re:Invent 2013 and join us in Las Vegas, November 12-15. Read more about the sessions and activities we have planned, and don’t forget to tell us what else you’d like to see at the conference.

August 13, 2013

Peter Heinrich

Amazon GameCircle and the other game services we offer are designed to make mobile game development easier, but knowing where to start may still be difficult. To offer a bit of guidance, I thought it might be worthwhile to take a small, simple game and walk through the process of extending its functionality, one service at a time. Together we’ll gradually add features over the course of several posts, each one focusing on a specific way Amazon services speed development or reduce code complexity. At the end of the series, we’ll have a working game application that shows these services in action and demonstrates how you might incorporate them into other projects.

As the title implies, this post will kick off the series with a look at GameCircle, which supports leaderboards, achievements, and Whispersync for Games, a powerful mechanism to synchronize local and cloud data. Games have been saving progress and celebrating player success since the beginning, so GameCircle seems like a good place to begin our journey.

Prerequisites

Note that this blog series assumes that you are comfortable developing for Android using Java and Eclipse, and that your development environment is set up and working properly with the Android Developer Tools (ADT). Some Amazon services are available only on Kindle Fire, so that will be our target device throughout the series. You must install the Kindle Fire SDK add-ons in order to use those features. For more information, see the Get Started section of Kindle Fire Development Resources.

Importing the Monster Tag Project

Before we begin, we need a simple game that will serve as the base for our experimentation and improvements. Monster Tag displays a horde of monsters and asks the player to tag them as they bounce around the screen. Every time a monster is tagged, it gets startled and speeds off in another direction. The faster a monster is moving when it’s tagged, the more points are awarded to the player.

To import the Monster Tag project into Eclipse, download and extract the source bundle to a convenient location, then choose File | New | Project… from Eclipse’s main menu. Expand Android and select Android Project from Existing Code, then click Next

Click Browse… to navigate to the temporary location where you extracted the source code, then click OK. Check Copy projects into workspace and click Finish

Once the project has been loaded successfully, you will see it in the Package Explorer:

Launch the application in the debugger for the first time by selecting the MainActivity and choosing Run | Debug As | Android Application from Eclipse’s main menu. You should see a lot of little orange guys flying around, daring to be tagged.

Establishing Trust

We have a basic game application running, but we’re still not ready to integrate GameCircle and use it to track high scores online. The GameCircle service won’t accept connections from just any mobile application—it authenticates requests to ensure they’re coming from trusted apps. Every app or game that wants to access GameCircle (and some other Amazon services) must have an “API key,” which is associated with a security profile for that app. The key tells GameCircle that our app is trustworthy.

To establish a security profile and obtain an API key, we must first let Amazon know about our game, which we do on the Mobile Application Distribution Portal. Sign in or create a developer account there if you don’t already have one. (If you’re creating an account for the first time, you’ll be asked to supply some basic information and agree to some terms and conditions. If you intend to create paid apps, you’ll have to provide some extra info, as well.)

Once you’ve logged in, go to the Apps & Services tab and hover over the Add a New App drop-down, then select Add new Android App. Now we can tell Amazon the details of our game:

Generating a Security Profile

After clicking Save we could add more details, such as pricing, icons, and screenshots, but for now we’ll skip those steps and jump right to creation of a security profile. Follow the Security Profile link that appears under the app title on the next screen, then click the Create a New Security Profile button.

You’ll be asked to name the security profile. Note that you can share security profiles between applications, which we’ll discuss in a later post. For now, we’ll assume only Monster Tag will use this one, so we’ll name it accordingly:

Creating an API Key

Now we have a security profile, but no API key has been associated with it yet. Follow the API Keys link that appears after the profile name, then fill in the required fields and click Generate.

NOTE: What you enter in the signature field, below, will depend on your own development environment; you must supply the MD5 signature of your own debug keystore. You can find information about obtaining this value in the Debug application signature section of Getting Your OAuth Credentials and API Key. Typically this involves using keytool (installed as part of the JDK) from the command line:

keytool -list -v -alias androiddebugkey -keystore /path/to/debug.keystore

You should be asked to supply a password, which is “android” by default (no quotes). Check the output for the MD5 signature, highlighted below:

...

Certificate fingerprints:

         MD5:  D4:81:0C:AA:3D:45:DE:45:59:F2:BE:DE:95:A8:E1:65
         SHA1: A1:DF:DD:0D:89:77:81:24:E0:AF:47:AA:B6:55:B6:14:58:7D:4C:E4
         SHA256: 5:50:7F:6F:43:2C:3E:CD:D6:46:F1:F7:96:F2:ED:DE:E8:DD:3A:53:00
         Signature algorithm name: SHA1withRSA
         Version: 3

Adding an API Key to an Eclipse Project

Generating the API key will result in a long base64-encoded string. This is the magic value we need to include in our project to identify our app as trustworthy.

To add it to the project, create a new file called /assets/api_key.txt and paste in the value. Note that api_key.txt must be located in the /assets subfolder.

Enabling GameCircle Data for a Security Profile

Next, we must indicate that there will be GameCircle data associated with the security profile we just created, and that our Monster Tag game will use it. Go to the GameCircle configuration page, select the security profile we created and click Confirm.

Connect a Security Profile to the App

To connect our game to the correct GameCircle data, go to the My Apps tab of your profile, click the Monster Tag app, then follow the Security Profile link. Click the Monster Tag radio button and confirm the action by selecting Apply Profile on the dialog that appears.

Next Steps

Success! Our app is registered with Amazon, there’s a security profile associated with it, and we generated a corresponding API key and added it to our project. We’re ready to use GameCircle and it’s ready to accept requests from our mobile application.

In the next installment of this series, we’ll use GameCircle’s built-in leaderboard functionality to track high scores and let users compete with each other. Now that we have the app and security bookkeeping out of the way, it will be a cakewalk.

 

August 12, 2013

Peter Heinrich

It’s been three months since we launched Amazon Coins, and we’re already seeing quite a bit of customer and developer excitement around the new virtual currency.

At launch, we distributed 500 Amazon Coins to every Kindle Fire customer in the US to purchase apps, games and in-app items in the Amazon Appstore and on Kindle Fire. The customer reaction has been great. Customers already spent hundreds of millions of Amazon Coins, representing real dollars to developers, who still received their 70% revenue share.

Here are some results from real developers:

“We saw a significant increase in revenue after the Amazon Coins announcement. Revenue from Amazon Coins during the launch week was higher than previous week’s revenue. What was also interesting is that our cash receipts also saw a lift from Coins.”

— Halfbrick Studios Pty Ltd

“Amazon Coins accounted for more than half of our sales for the week of May 13th, which means our customers chose Coins two-to-one over cash. Our total weekly sales were also significantly higher after the launch of Amazon Coins.”

— PepiPlay

 “Our SMS texting and calling app revenues grew more than 300% on Kindle Fire the day after Amazon Coins went live, with a staggering 78% coming from Coins. We’re convinced that this virtual currency makes sense for developers no matter what category their app is in; it certainly does for us.”

— textPlus, Inc.

Halfbrick, PepiPlay and textPlus are just a few examples of developers already benefiting from Amazon Coins. In fact, for almost half of developers who monetized their Amazon apps using Coins, weekly revenue jumped more than 50% after the announcement.

As significant, the percentage of Amazon Coins spent on indie developer apps outpaced cash spent on the same segment. For some indie developers, Coins already account for the majority of their revenue.

These early signs show that customers are willing to use their Coins to try out and explore a new apps, games and in-app items. We don’t expect this trend to stop anytime soon. We recently introduced a new offer to Kindle Fire owners in the US. Every customer is now able to earn even more Amazon Coins when they buy select games.

Now is a great time for developers to submit their apps to the Amazon store and it’s easy to get started. Submit your apps today and take advantage of Amazon Coins.

August 08, 2013

Peter Heinrich

Mobile app and game developers are no strangers to working in the cloud, which is why Amazon has added a dedicated Mobile and Gaming Track to its AWS re:Invent conference this year. Held November 12-15 in Las Vegas, AWS re:Invent will offer dedicated sessions and a special bootcamp tailored to mobile app and game developers like you. Register early as the conference sold out last year!

Deep dive technical sessions and hands-on labs will teach you how to scale your mobile app or game on the AWS cloud, distribute on Amazon, reach millions, increase user engagement and monetization, and more. You’ll also have the opportunity to meet Amazon teams in person, get one-on-one support, and attend a special reception.

Technical sessions during the main conference will focus on AWS features and services that speed mobile development and increase your audience. You’ll also learn how to get the most from Kindle Fire hardware without sacrificing compatibility on other mobile devices. Developer case studies will explain the tips and tricks they used to successfully monetize their apps and games. Here’s a sample of sessions to be offered:

A pre-conference bootcamp will dive even deeper, with a full day of intensive instruction and live coding with the Amazon APIs, including GameCircle, A/B Testing, In-App Purchasing, and Mobile Ads. Starting with design patterns common to Games-as-a-Service and deployment to AWS, this workshop will move on to the specifics of implementation, publishing on the Amazon Appstore, and how to market your application or game on Amazon.com and Kindle Fire devices.

Join us in Las Vegas this November for the dedicated Mobile and Gaming track at AWS re:Invent 2013.

 

August 01, 2013

Peter Heinrich

Following up on the second in a series of webinars covering Amazon devices, game services, and mobile applications, here’s a list of questions we collected during and after our presentation on Amazon GameCircle, including Achievements, Leaderboards, and Whispersync for Games.

 

Does the developer have access to the GameCircle nickname?

Yes, you can call getLocalPlayerProfile(), which returns a structure containing player id and player alias (same as nickname/username). NULL is returned if the player is in guest mode (they have not logged in). Player id is unique for each player.

When updating Achievement Progress can you decrement it as well or does the GameCircleCient hold onto the latest highest progress value?

Achievement progress is strictly increasing, which means updates must be greater than the current value or they’ll be ignored. Note that you can reset achievement data for draft achievements (those that have not yet been published).

With the update, does GameCircle still support Kindle Fire 1?

Yes. The GameCircle system app must be updated to v1.1_1101110, however. This should have been delivered OTA. On KF2, the GC system app should be v2.5.2500310 or greater.

Can leaderboards/achievements be translated?

Not yet, but localization is in development and will be available in a future release.

Is the same game discovery mechanism on Kindle Fire available on all Android devices as well?

The dedicated Games Tab is built in to the games library on Kindle Fire only. It’s not available on other Android devices.

What is the minimum OS supported?

GameCircle supports API level 10 up to API level 16 on all Android devices.

Is GameCircle available internationally?

Yes, GameCircle works internationally. Players in China are limited to Guest mode for now, due to data storage requirements imposed by the Chinese government, but we will address that in a future release.

Is the old version of GameCircle still supported?

Yes, for legacy games. Games that have been published using GameCircle v1.x will continue to work. If you had a game in development when GameCircle v2.0 was released, you can proceed to publish it using the old version. Since the Mobile App Distribution Portal no longer provides direct support for GameCircle v1.x app whitelisting, however, you must contact us to add or update package name/signature pairs. See the Whitelisting Notice on the GameCircle configuration page for more information.

What happened to the FileSync and BlobSync from Whispersync?

We greatly simplified the Whispersync interface to make it easier to integrate and expand auto-resolution of data conflicts. As a result, we dropped support for the blob and multifile sync options. They were complicated to integrate and forced the developer to manually reconcile data on occasion (or to ask the customer to do so). The new Whispersync requires significantly less integration overhead and provides a better customer experience in most cases.

Can I migrate old Whispersync data to the new format?

Yes, there are two methods on the WhispersyncClient that can help in the migration process. migrateVersion1GameData() and unpackVersion1MultiFileGameData() will download and unpack data stored using the previous version, respectively. They’re only meant to be used by games that integrated Whispersync prior to July 1, 2013. See the Javadoc for more info.

Is there any way to integrate game circle in Air apps?

Amazon provided an Adobe Native Extension (ANE) for GameCircle v1.x, but none is yet available for the new version. We are actively researching an upgrade to the existing ANE, but don’t have an official timeline. Check back here or follow @peterdotgames for updates on the availability of a new ANE. In the meantime, you can continue to the existing extension with GameCircle v1.x for games currently in development.

Where can I learn more about Unity plugin for game circle?

Check out the Amazon Unity Plug-Ins page on the Amazon Mobile App Distribution Portal.

Do users need to login with Amazon account username and password to use the game services?

No, GameCircle now supports a Guest Mode for users who don’t want to log in to an Amazon account. In this case, data will not be synchronized to the cloud or across devices.

Is there a good game to play to check out the features?

There are many great games that include GameCircle features, including well-known blockbusters and high-quality indies. In the Amazon Appstore, look for the GameCircle badge to quickly identify games that use Achievements, Leaderboards, or Whispersync for Games.

 

Don’t miss out next webinar event: How to Integrate Amazon Mobile Ads and Lift Your App Revenues 
on August 15th, 2013 @ 10:00 AM.

Pre-register here!

July 23, 2013

Peter Heinrich

Save game data in the cloud to protect your customers’ progress and support play from multiple devices

In just a few short years, the explosion in popularity of smart phones and tablets has transformed gaming, as touch controls, geolocation, and micropayments enter the mainstream. Online storage is also becoming more common, as developers adjust to a major challenge of mobile devices: physical durability. Keeping your data in the cloud starts to look mighty attractive compared to keeping it on a device that’s easily misplaced, damaged, or stolen.

Blob storage is a common way to save data online (game data is simply written to the cloud as one big chunk). If two devices update the same data, though, one of the updates must be ignored or overwrite the other. You have to decide which update to keep (based on a timestamp or version number, perhaps), or maybe prompt the user to choose between them. Either way, data is lost.

Because of the overhead involved, many developers don’t even bother with this naïve approach. This is a huge disservice to the player, whose game progress is completely lost if anything happens to his or her mobile device. Whispersync for Games saves game data for you, and works across all Android devices (including Kindle Fire).

Mergeable and Non-mergeable Data

Whispersync was designed to prevent data loss, make developer or player intervention unnecessary when resolving conflicts, and be dead-simple to integrate and use. It doesn’t distinguish between online and local storage, so the programmer doesn’t have to handle separate cases for saving to disk and cloud. It does this by manipulating only mergeable data.

Game data is mergeable if a simple rule can be defined to resolve conflicting values. For example, the rule associated with the best completion time might be, “Take whichever value is smallest.” To keep track of a player’s best score, we might use, “Take whichever value is highest.” In some cases, the most recent value may be the most important, so the appropriate rule would be, “Take whichever value is newest.” These rules apply at a granular level; Whispersync doesn’t treat game data as one big chunk.

Not all game data can be resolved using simple rules, though, in which case we call it non-mergeable. The current state of a chess board, for example, requires a complex tree structure to describe it. Reconciling two versions of the board is more complicated than just choosing the “lowest” or “highest” one.

Describing Game Data Using Syncable Types

Fortunately, a lot of game data is naturally mergeable or can be adjusted to be so. Whispersync offers many different syncable types with several built-in rules to resolve conflicts. They can be used to model simple and complex game data.

  • SyncableNumber – A number that is the lowest, highest, or most recent.
  • SyncableString – A string that is the most recent.
  • SyncableAccumulatingNumber – A number that can be incremented and decremented.
  • SyncableNumberList – A list of numbers in ascending, descending, or latest order.
  • SyncableStringList – A list of strings ordered by most recent.
  • SyncableStringSet – A set of strings.
  • GameDataMap – A nested map, allowing hierarchical data.

A global GameDataMap object represents the root storage for your game, storing named values of the types above. Setting a value that doesn’t exist will create it on the fly. The accessor used to retrieve a value determines the conflict resolution strategy that will be associated with it.

  public static final String SKILLS = "skills";
  public static final String TOTAL_TIME = "totalTime";

  public static final String LEVEL_MAP = "levelMap";

  public static final int NUM_LEVELS = 5;
  public static final int MAX_ITEMS = 3;

  public static final String SCORE = "score";
  public static final String STARS = "stars";
  public static final String BEST_SCORES = "bestScores";
  public static final String BEST_TIMES = "bestTimes";

  GameDataMap gameDataMap;

  public void initGameData() {
    gameDataMap = AmazonGamesClient.getWhispersyncClient().getGameData();

    // These will be independent of level.
    gameDataMap.getStringSet(SKILLS);
    gameDataMap.getAccumulatingNumber(TOTAL_TIME);

    // Use nested maps to establish some per-level values.
    for (int i=0; i < NUM_LEVELS; i++) {
      GameDataMap levelMap = gameDataMap.getMap(LEVEL_MAP + i);

      // Each level will have its own copy of these values.
      levelMap.getLatestNumber(SCORE);
      levelMap.getHighestNumber(STARS);
      levelMap.getHighNumberList(BEST_SCORES).setMaxSize(MAX_ITEMS);
      levelMap.getLowNumberList(BEST_TIMES).setMaxSize(MAX_ITEMS);
    }
  }

In the example above, we use initGameData() to establish the structure of the data we’ll synchronize, even though we don’t actually set any values. (It can be helpful to define the data layout in one place like this, even if it’s not strictly required.) The code effectively says,

  • There will be a global set of strings called SKILLS. It will track every string added to it (strings may not be removed).
  • There will be a global running total of time in the game called TOTAL_TIME. It will accumulate deltas submitted from all devices used by a single player.
  • There will be NUM_LEVELS nested maps, each of which will have its own set of values:
    • SCORE will always reflect the last score submitted for that level.
    • STARS will always reflect the maximum stars attained for that level.
    • BEST_SCORES will always list the MAX_ITEMS highest scores for that level.
    • BEST_TIMES will always list the MAX_ITEMS fastest times for that level.

Updating and Retrieving Game Data

Whispersync abstracts all game data persistence, so we can update or retrieve values using simple getters and setters. We don’t have to worry about managing a network connection, saving to disk or the cloud, or reconciling local and online versions of variables we have in memory. When we add to the running total of time played, for example, Whispersync automatically saves the delta to disk and updates the cloud if connected. If the player’s device is currently offline, the update will be queued and delivered later.

  public void updateTotalTime(int timePlayed) {
    SyncableAccumulatingNumber totalTime = gameDataMap.getAccumulatingNumber(TOTAL_TIME);

    // Add the time played to the running total.
    totalTime.increment(timePlayed);

    // Output the new total to the console.
    System.out.println("Total Time Played = " + totalTime.asInt());
  }

Likewise, we can record skills as the player masters them and easily iterate over the set to display the ones learned so far:

  public void learnSkill(String skill) {
    SyncableStringSet skillSet = gameDataMap.getStringSet(SKILLS);

    // Add the new skill to the player's repertoire. Note that this list

    // can only expand; strings cannot be removed.
    skillSet.add(skill);

    // Output all skills to the console.
    for (SyncableStringElement s : skillSet.getValues()) {
      System.out.println("Skill = " + s.getValue());
    }
  }

Updating numbers and number lists is just as straightforward, so persisting all of the player’s progress at the completion of a level can be done in just a few lines:

  public void finishLevel(int level, int score, int stars, int time) {
    GameDataMap levelMap = gameDataMap.getMap(LEVEL_MAP + level);

    // Save the score for this level. Newer values will always overwrite
    // previous scores.

    levelMap.getLatestNumber(SCORE).set(score);

    // Try to set the new maximum stars attained on this level. If the
    // value is less than the current maximum, this call does nothing.

    levelMap.getHighestNumber(STARS).set(stars);

    // Try to add this score to the list of all-time bests. If it's not
    // high enough, this update will be ignored.

    levelMap.getHighNumberList(BEST_SCORES).add(score);

    // Try to add this completion time to the list of all-time bests. If
    // it's not low enough, this update will be ignored.

    levelMap.getLowNumberList(BEST_TIMES).add(time);
    updateTotalTime(time);
  }

The accessors on GameDataMap and Whispersync’s syncable types make it easy to manipulate game data and define how conflicts should be resolved.

Think Mergeable!

Whispersync for Games automatically resolves conflicts for data it can merge, which makes it worthwhile to describe game data using syncable types when possible. Since Whispersync supports high, low, and most recent numbers and number lists; running totals; latest strings and string lists; sets of strings; and nested maps supporting hierarchical structures, a wide range of game data can be modeled.

Thinking about your game data in mergeable terms lets you push a lot of overhead out of your code. Let Whispersync handle the heavy lifting. For more information on integrating Whispersync into your game, see the online documentation

 

July 17, 2013

Peter Heinrich

Some of the most exciting feedback that we’ve heard from developers is the fact that paid apps are a bigger percentage of total downloads on the Amazon Appstore than on Google Play. The latest great example is from Zinkia in Spain.

Zinkia is the creator of entertainment brands such as Pocoyo, a popular kids' character in Spain. Zinkia's goal is to develop global brands on all mobile app platforms.

When we told Zinkia that Amazon Appstore was already available in Spain, they immediately decided to submit their “Pocoyo” apps. One of the factors in their decision was the low cost to get from other Android marketplaces to the Amazon marketplace. However, they didn’t have high expectations in terms of revenue because of how new the Amazon Appstore is in Spain.

Zinkia was pleasantly surprised, however, when they saw the first results in March: in absolute terms, their paid apps made almost the same money on Amazon Appstore as on other Android platforms.

Compared to other Android application stores, for Zinkia, the Amazon Appstore has a much higher proportion of paid downloads, which accounts for this positive result. When downloading “Talking Pocoyo” from Tienda Apps, for example—a game with free and paid versions—customers purchased the paid version more than 15% of the time, compared to less than 1% on other Android app stores. So while Amazon Apps is still ramping up the total volume of downloads for Spanish developers, it already leads to impressive paid vs free app downloads.

Why do customers using the Amazon Appstore purchase paid apps at a higher rate than in other Android app stores? It’s because of  the Amazon Appstore includes popular Amazon features like personalized recommendations, Customer Reviews, 1-Click payments and the fact that Kindle Fire devices purchased from Amazon are pre-registered.

% of paid (Pro) and free downloads of Talking Pocoyo

 

July 04, 2013

Peter Heinrich

Continuing our series of success stories from developers around the world, we go to France, where developers are witnessing strong positive results less than a year after the launch of the Amazon Mobile App Distribution Program in August 2012.

Ubisoft’s PC and console titles have been available on Amazon for a long time, helping to build a great partnership between both companies over the years. As Ubisoft strengthened its mobile offering, it was a natural progression for their Android games to be made available on Amazon and to Kindle Fire users. Dominique Tardieu, Sales and Marketing Director at Ubisoft Mobile, explains: “Amazon and Kindle Fire tablets hold a significant potential for our mobile games as they become more and more widespread. Also, Amazon has developed a meaningful ecosystem for Kindle Fire games via Amazon GameCircle. This gives us the possibility to leverage the social aspects of our games, through Player vs Player functionality and leaderboards, for instance.”

Since September 2012, Ubisoft has successfully launched a variety of best-selling games on Amazon, including Rayman Jungle Run, Prince of Persia, and (more recently) Nutty Fluffies. An important element of these games’ success so far has been Amazon personalization and recommendations. Tardieu says, “The experience they bring in terms of customer relationship management and knowledge of the industry has made it possible for us to ensure a successful launch for all our titles. Amazon clearly benefits from the know-how acquired over the years working on Ubisoft’s console and PC games and has learned how to harness it to successfully promote the right content to the right consumers.”

About Ubisoft:
Ubisoft is a leading producer, publisher, and distributor of interactive entertainment products worldwide and has grown considerably through a strong and diversified line-up of products and partnerships. Ubisoft has offices in 26 countries and operates in more than 55 countries around the globe. It is committed to delivering high-quality, cutting-edge video game titles to consumers. For the 2011-12 fiscal year, Ubisoft generated sales exceeding €1 billion. To learn more, please visit: www.ubisoftgroup.com

 

July 03, 2013

Peter Heinrich

Following up on the first in a series of webinars covering Amazon devices, game services, and mobile applications, here’s a list of questions we collected during and after our presentation on Amazon Device Compatibility and Optimization.

Is it possible to test the compatibility of my existing android app with an emulator?

Yes, you can and should use the Kindle Fire emulators to test compatibility of your Android app. The Kindle Fire emulator consists of:

  • The Android emulator, which is part of the Android SDK.
  • Android Virtual Devices (AVDs).
  • Kindle Fire system images.

The Kindle Fire system images provide the additional code needed to emulate Kindle Fire tablets.

Note: We provide ARM and x86 system images for the Kindle Fire emulator as SDK add-ons. If your development computer can run the x86 system images, which are available for all tablets except Kindle Fire (1st Generation), you should use them for faster emulation. For more information, see Understanding the Kindle Fire Emulator.

How does DRM and license validation work in the Amazon store? Can we verify it’s working once the app is live?

When submitting your app, on the Binary Files tab, developers can choose Apply Amazon DRM? If selected, only customers who have purchased the app may use it. If not, your app may be used by anyone without restrictions. To test this once the app is live, sign in to the Amazon store with a different user account (or simply sign out of the Amazon store client) and try to open the app on the device. If DRM is active, your app is protected and an error will be reported.

What versions of Adobe AIR are available? When will new AIR versions become available?

The original Kindle Fire runs Gingerbread and therefore ships with AIR 2.7. The second generation Kindle Fire, including all Kindle Fire HD devices, run IceCreamSandwich and ship with AIR 3.1. Developers that need newer versions of AIR 3 in their apps can do so by leveraging captive runtime.

Is there a low-tech solution to creating a screen-size that will work for Kindle Fire and Kindle Fire HD, like 600x600?

Please see Screen Layout and Resolution for information on designing for the different Kindle Fire screen. The simplest option would be to test each layout on the Kindle Fire emulators to confirm and tweak them as necessary. See Running the Kindle Fire Emulator for more information.

When you say unsigned apk, is that the same as not exporting the apk in Eclipse?

Yes. That is correct. We are referring to an apk not built for release.

Is there a rule, or recommendation about package names in different App Stores? Can they be the same?

Yes, they can be the same.

Can I apply a signature to my app?

All applications must be digitally signed with a certificate. The default signature applied to your app is a certificate supplied by Amazon that is unique to your developer account. If your signing strategy requires that a different certificate be applied, you may do so by submitting a request using the Contact Us form. Please indicate the title of the app for which you are submitting the request.

Is the certificate different from .keystore?

Yes. The type of certificate used by Amazon to sign a developer's application is the same type generated by standard tools like keytool or jarsigner.

 

Don’t miss out next webinar event: Integrating GameCirle in Your Games on July 25th, 2013 @ 10:00 AM.

Pre-register here!

June 30, 2013

Peter Heinrich

We just released a major update to Amazon GameCircle, our free game service providing achievements, leaderboards, and Whispersync for Games. Games on all Android devices (including Kindle Fire, of course) can now integrate GameCircle, which is easy because we support Java, JNI, and Unity3D. Whether you submit your game to Amazon or Google, customers will benefit from the GameCircle experience. In addition, Whispersync has been dramatically improved, becoming the first and only cloud-save service to:

1) Automatically resolve data conflicts between mobile devices and the cloud,

2) Queue updates to support offline operation, and

3) Offer a simple interface that can be integrated in minutes.

The result: Your customers’ game data will automatically sync across devices—even if they play your game while temporarily offline—and you can concentrate on using the data instead of persisting it. You’re not locked in, though; you retain ownership and can always get a copy of the data you store.

We also give you flexibility when it comes to GameCircle display options, with no intrusive splash screen and configurable notification toasts. You’re in control and choose where they appear.

I’ll provide more technical details about these enhancements in future posts, but for now, let’s take a closer look Whispersync and explore its powerful new features and simplified interface.

Whispersync for Games

Whispersync does the heavy lifting when it comes to synchronizing local data to and from the cloud. It handles the tricky scenarios that you would normally have to deal with yourself, like conflicting updates from multiple devices or sync requests from a device that’s temporarily offline. You can also stop worrying about scalability; behind the curtain, Whispersync (and all of GameCircle) is powered by Amazon Web Services like S3 and DynamoDB.

Using Whispersync is easy through an API that has been completely redesigned, providing an interface similar to SharedPreferences. Saving game data to the cloud and synchronizing it between devices is as easy as retrieving a variable from a map and using (or changing) its value:

    // Get the global game data map for the current player.
    GameDataMap gameDataMap = AmazonGamesClient.getWhispersyncClient().getGameData();

    // Look up the object representing the player’s skill rating.
    // If none exists, one will be created.

    SyncableNumber skillRating = gameDataMap.getHighestNumber("skillRating");
    System.out.println("skillRating = " + skillRating.asLong());

    . . .

    // Update the value. As long as this device is online (or as soon as
    // it is), local and cloud storage will be synced.

    skillRating.set(MAX_SKILLRATING);

Whispersync maintains a singleton instance of GameDataMap that acts as the root of your game data. It can track numbers, strings, simple lists, and other maps, and gives you complete freedom in how you represent your game data using these basic syncable types. You add new variables simply by retrieving them by name; if they don’t exist, they’ll be created on the fly and synchronized from that point on.

How Whispersync applies updates and resolves conflicts depends on the way you access each syncable variable. For example, suppose you want to retrieve the current user’s best (highest) level across all devices:

    GameDataMap gameDataMap = AmazonGamesClient.getWhispersyncClient().getGameData();
    SyncableNumber bestLevel = gameDataMap.getHighestNumber( "bestLevel" );
    System.out.println( "bestLevel = "  + bestLevel.asLong());

In this case, because “bestLevel” is retrieved as a highest number, it will always reflect the maximum value ever assigned to it, from anywhere, on any device.

String values can also be synced. You could easily set the name of the latest power-up collected:

    gameDataMap.getLatestString( "lastPowerUp" ).set("Super Boingo"); 

The syncable string associated with “lastPowerUp” will always reflect the value most recently assigned to it.

The online documentation and Javadoc included with the SDK have more information on the syncable types Whispersync supports, as well as the ways in which each may be accessed.

Practical Applications

Let me provide a few more examples to illustrate just how straightforward synchronization can be.

Recording Star Count for Several Levels

A common pattern in many games is to show stars and unlock status for each level on a level selection screen. Here’s an example of using Whispersync to track individual star values for multiple levels:

  SyncableNumber[] getLevelStars() {
     GameDataMap gameDataMap = AmazonGamesClient.getWhispersyncClient().getGameData();
     SyncableNumber[] stars = new SyncableNumber[NUM_LEVELS];

     // Get the star counts for all levels.
    
for (int i = 0; i < stars.length; i++) {
        stars[i] = gameDataMap.getHighestNumber("levelStars" + i);
     }

     return stars;
  }

The first time the score values are accessed (from anywhere), Whispersync will create entries for them in the cloud, so there’s no need to declare them ahead of time.

Accumulating a Running Total

Some progress, like coins collected or time played, represents a running total that is always updated using a delta amount. Instead of setting the value directly, you just submit the amount by which it should change. Whispersync automatically adds or subtracts this value to update the current total. For example:

 void addTimePlayedToTotal(long timePlayed) {
    GameDataMap gameDataMap = AmazonGamesClient.getWhispersyncClient().getGameData();
    SyncableAccumulatingNumber totalTime =        gameDataMap.getAccumulatingNumber("totalTime");

    // This object may be incremented/decremented with long, double, and
    // BigDecimal values.

    totalTime.increment(timePlayed);
    System.out.println("Total time played: " + totalTime.asLong());
 }

Keeping a Map of Maps

By embedding a map within a map, you can create a hierarchical data structure. If your game has multiple worlds, for example, you might keep a separate GameDataMap for each one. Each of these might contain additional maps—say, one for each level.

 GameDataMap getWorldData(String name) {
    GameDataMap gameDataMap = AmazonGamesClient.getWhispersyncClient().getGameData();

    // Get all the string keys associated with top-level GameDataMap objects.
    Set<String> worldNames = gameDataMap.getMapKeys();

    // Look for a match among the maps.
    for (String currentName : worldNames) {
       if (currentName.equals(name)) {
          // A map exists for the name specified.
          return gameDataMap.getMap(currentName);
       }
    }

    // No match found. Don't create one.
    return null;
 }

Maintaining a List of Numbers

A racing game might save a player’s top three best times using a syncable number list. In this case, you could create a list for low numbers—they decrease as times improve—but you could easily choose to retain a collection of the highest or most recent values in other situations.

 // We'll initialize this once the application has launched.
 AmazonGames agsGameClient;
 GameDataMap agsGameData;
 SyncableNumberList agsBestTimes;

 // Create a callback to handle initialization result codes.
 AmazonGamesCallback agsGameCallback = new AmazonGamesCallback() {
    @Override
    public void onServiceReady(AmazonGamesClient client) {
       agsGameClient = client;
       agsGameData = AmazonGamesClient.getWhispersyncClient().getGameData();

       // Establish how many slots will be allocated and preserved.
       agsBestTimes = agsGameData.getLowNumberList("bestTimes");
       agsBestTimes.setMaxSize(3);
    }

    . . .
 };

  void finishLap(double time) {
   // Every time a lap is completed, try to add the lap time
   // to our list of best times. Only the lowest three will
   // ever be preserved.

   agsBestTimes.add(time);
 }

Every time the player finishes a lap, finishLap() would be called to update the number list. The value specified will be discarded unless it is lower than one of the current entries.

More to Come

The GameCircle improvements released in the latest update deserve more attention than the brief overview I’ve given here, so I’ll add details in the coming weeks. Look for articles dedicated to JNI; advanced API features; and using GameCircle with frameworks such as Unity3D, Cocos2d-x, and Marmalade. I’ll also dive deeper into Whispersync, discussing the difference between mergeable and non-mergeable data (and why it’s important), considerations when synchronizing currency across offline devices, and migration from the previous version. Stay tuned!

In the meantime, check out the new GameCircle release and give it a whirl. You’ll benefit whether you use the simplified Whispersync API and its expanded functionality, create a universal build to run on Kindle Fire and Android, or take advantage of the other features included with this update.

June 27, 2013

Peter Heinrich

Our A/B Testing service just added support for A/B/n tests, allowing more than two variations in a single experiment. This feature makes it even easier to quickly optimize your app in the field—without having to republish your APK. A/B/n testing saves you time since one experiment can now test up to five variations at once.

For example, suppose you have four ideas for how to label a Buy button – Buy, Purchase, Add to Cart, and Get it Now! – and want to know which label leads to the most purchases. You start by setting up an A/B test as you normally would (if you’re new to A/B testing on mobile, learn more about getting started) and click Add Variation for each new variation:

New A/B/n Test

A/B/n testing saves time, since standard A/B testing of four variations would require completing multiple A/B tests one after the other. The experiment above, for example, would require three separate tests, with the winning test becoming the new control each time.

A/B Test

A/B/n testing lets you compare all four variations at once, so only one test is necessary:

When planning an A/B test it is important to consider the size of the daily active user base you want to affect and how long you can wait for the test to complete. If a variation’s slice of the data is small, the A/B test may take a long time to achieve statistical significance. Apps with a large audience can likely distribute most customers to Variation A (Control) without sacrificing test time or significance. Apps with a smaller audience will want to distribute tests evenly across all variations as shown below:

A/B/n Testing Test Type

After you identify the winning variation, the A/B Testing service allows you to launch it to customers with a simple button click on the Mobile App Distribution Portal. There’s no need to republish your app. You can simply indicate which variation the service should distribute to customers from now on.

If you’re an Android developer, explore this update to the free Amazon A/B Testing service. We’re interested in hearing your feedback on A/B Testing. Please take this short survey to help us improve the service.

Want the latest?

appstore topics

Recent Posts

Archive