Amazon Developer Blogs

Showing posts tagged with Amazon

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.

June 19, 2013

Mike Hines

I had to take a class in accounting before I understood the difference between sales and earnings. Fortunately, learning about Amazon Mobile App Distribution Program sales and earnings reporting is quite a bit simpler than that accounting class. 

While there are 7 possible reports to choose from, in this blog post, we’ll cover three popular financial reports:

  • Sales reports – show basic sales less returns over customizable time periods and countries.
  • Earnings reports – show more details (including adjustments) in a fixed one-month period.
  • Payment Reports – show you what you are actually paid every month.

Sales Reports show trends in sales and returns over standard or custom time periods. You can get daily breakdowns in CSV reports, and you can see sales broken out by individual marketplace or by the almost 200 countries in which you app could be sold. Data in sales reports are updated every few hours but do not reflect processed financial data for the current month. They do not include adjustments and other data that will affect your payment.

Below are two examples of reporting that can be customized by app and international marketplace. The first is a map view. Note the drop-down buttons for ‘Date’, ‘All Apps’ and ‘All Marketplaces’. These let you show a specific date range and show sales by marketplace (like amazon.co.uk or amazon.fr) or by the country (such as Brasil or Norway).

The next example shows a tabular view of the Sales report with detail such as Units Sold, Units Returned, Units Refunded and Gross Revenue.

Sales Report

Sales Summary

Earnings Reports represent the sales, refunds, app earnings and adjustment data used to calculate royalties earned during a given month. Data in earnings reports are released on a monthly basis once royalties earned in the previous month have been processed and approved. Monthly summary information is available in the Amazon Mobile App Distribution Portal and daily breakdowns are available through CSV export.

Earnings Report

Payment Reports represent the actual disbursement of funds from Amazon. Monthly summary information is available in the Amazon Mobile App Distribution Portal on the payment reports section.

Accessing Reports Getting these reports is easy. Log in to the Amazon Portal and click on the Reporting link (shown below). Then select the report you want, then select your customization filters below that.

(Note: of the seven reports shown in the screen shot below, all but the Beta Engagement report now allow reporting by country of sale)

Accessing Reports

The Amazon Moblie App Distribution Program gives you useful reporting data that is pretty easy to access and understand. My accounting teacher would be proud. Try getting a few reports now, and see how easy it is to get data on your apps today.

June 12, 2013

Mike Hines

It’s easy to see how hackathons can spawn creative teams and fantastic ideas, but I’ve also seen great ideas die because bad pitches sink good hacks.

In a Hackathon event like AngelHack, developers, designers and entrepreneurs gather on a Saturday morning to mingle and meet like-minded folks, form teams, and decide on a cool project to work on. These teams will then spend all night building the project they design. Sunday afternoon, it’s pencils down time, and the teams get between 3 and 5 minutes to present what they’ve done to a panel of judges, who in the case of AngelHack, will decide who to send to the Bay Area to meet with venture capitalists for potential funding.

To be sure, hackathons are won with great hacks. Liam Boogar, hackathon judge and the brains behind rudebaguette.com, says “For me, people win hackathons with awesome hacks, not thoroughly thought out business models. A business model is a means to justify the long-term growth of an amazing product - without the amazing product, the business model is useless.”

Point well made. No business or presentation wizardry will save your team if you have a worthless hack, but a great hack that understands the business end will beat a great hack that doesn’t. 

Questions You Need to Answer:

The good news is that communicating the business side is as easy as addressing these 5 questions:

  1. Who is going to use your app and what is their need?
  2. How does your hack address that need? (this is where you demo your awesome hack)
  3. How does the user acquire the solution? (if the monetization approach is clever, demo it here)
  4. Is your hack unique? How is it unique?
  5. Can the hack be scaled to be a viable business?

Most teams miss one or more of the points above, and a few teams miss all of them. So even if you copy/paste this list to a document, write the answers underneath, and then read that doc to the judges, you’ll be doing better than most. (Seriously, don’t worry if you’re not a great public speaker. At one event, a team whose speaker read the entire presentation from his laptop still progressed to the finals because it was a good hack and the judges understood the business.)

Building the Demo:

Once you have answers to the 5 questions above, it’s time to build the presentation and demo. This does not have to be complicated, and it shouldn’t take long. Here is some guidance from AngelHack judges:

PowerPoint or not? Some teams use a slide deck, some don’t. I’ve seen valuable and impactful presentations done both ways.  Just make sure you demo what you have built. I was on a judging panel where the team showed only slides. Great business model, but the hack was completely missing. That did not turn out well!

Demo the hard part. Most solutions have easy parts and hard parts. Rendering a simple list on the screen isn’t a hard part. Getting the correct data to render often is. If you try to hand-wave your way around the hard problems, you’re in trouble. Don’t show loading screens or other trivial stuff. Liza Kindred, AngelHack Judge and founder of Third Wave Fashion, says via Twitter: “We don't want to watch you log in! Have it ready to go, your three minutes are too short!”

Tell a story. If you can, weave the points above into a story.   Here is how one team used a story to weave in a lot of points in short time:

One speaker told a story about how his grandmother couldn’t respond to text messages even though she wanted to stay in touch more often (Question 1, time: 15 seconds). He showed the hack, demonstrating how their project removed the barriers that prevent the elderly from using technology (Question 2, time: 2 minutes). The speaker described the ways that grandma might come to own their product (Question 3, time: 20 seconds). 

The only part of their message they didn’t weave into a story was their product’s differentiating factors and how they scale to be a viable business. Whether or not the judges agreed that this was the right solution for helping grandma doesn’t matter. We all remembered the story. We talked about the story. Stories work.

If you can’t tell a story.  Some projects or some teams just don’t work with stories. That’s okay. You’ll just need the discipline to avoid detail overload when outlining your points. Good hacks can get great scores even without a story.

Discuss what you built over the weekend. Rebecca Lovell, CEO at Vittana.org, says: “We want to know what you were actually able to accomplish over the weekend. If it's an existing company and you built a Kindle app, tell us. If you just thought of the whole idea this weekend, we'll be duly impressed with whatever you were able to hack over such a short period of time.  Above all: be transparent with the status of your product development and achievements.”

Presentation Time Management Tips

As long as you end up covering all of your points, you’ll have a good demo. These tips are designed to help you make sure you can get your message across in what seems like no time at all.

  • Practice your presentation. For goodness sake, practice the whole thing, end to end, with demo components. You’ve only got 3-5 minutes to pitch your hack at these events. Many teams fail to complete their presentation due to poor time management. Practicing will help alleviate this.
  • Leave enough time to demo your hack. …and then be sure to demo the hard stuff, not splash pages, loading screens, or login dialogs. I’d suggest leaving no less than half your time to demo the hack. I’ve seen speakers go into so much detail describing how they built the solution that they leave only 30 seconds to show it!  We need to see the great hack if you’re going to win a hackathon.
  • More than your name may not matter. Don’t spend time with introductions longer than your first name unless it’s describing experience directly relevant to the project.
  • Don’t let your knowledge hurt you. When you have a great deal of domain expertise, it’s easy to get caught up in details that may be important, but not necessarily relevant for a short pitch.
  • Be prepared for unmitigated disaster.  At one hackathon, there were some technical problems with the HDMI cable to the room projector, and it flustered some folks so much that they didn’t do as well as they might have otherwise. Be ready to walk a device around to the judges if you have to.
  • Practice your presentation. I’ve seen at least a dozen teams plan how they will do their presentation and call that practicing. It’s not. Rehearsing in your head is not practicing either. Actually finding a place to speak the whole thing quietly to a teammate is practicing. Just 10 to 15 minutes will make a big difference.
  • Have Fun! Rebecca at Vittana.org says: “We know you're sleep deprived and hopped up on Red Bull, but make sure to sell it!  Show your passion!”

So, after all is said and done, you need a great hack to win a hackathon. And the great hack that clearly communicates business basics will beat a great hack that doesn’t.

Before Mike Hines was a Technical Evangelist for Amazon, he founded a financial services company and an education software company. Join Mike Hines and Amazon at the Silicon Valley AngelHack in San Jose, CA on June 15 and 16. You can follow Mike on Twitter @MikeFHines

 

June 05, 2013

Peter Heinrich

Game development is an art, like any other. It can be personally rewarding, and like other forms of artistic expression, great games can come from anywhere. Powerhouse game studios don’t hold a monopoly on inventiveness or creativity, and some of the best games of all time were created on a shoestring by two or three people with a shared vision.

It’s hard to get noticed, though. If you’re an indie game developer, it’s usually a headache to get your game in front of people, both gamers and reviewers. Amazon recognizes this. As part of our commitment to independently developed games, Amazon is launching the Indie Games Store, a new category on Amazon in the Digital Video Games Store, designed specifically to address this problem.

The Indie Games Store is a dedicated storefront designed to specifically help indie game developers with promoting their PC, Mac, and browser-based games while helping gamers discover a large and growing selection of innovative indie games.

The dedicated indie-specific storefront offers indie developers several programs to increase discoverability and promote their PC, Mac, and browser-based games while helping customers discover a large and growing selection of innovative indie games including “Don’t Starve” by Klei Entertainment, “FTL: Faster than Light” by Subset Games, and “The Bridge” by The Quantum Astrophysicists Guild.

To celebrate the launch, we’ll also be offering features and promotions starting today to encourage customers to engage with the indie game scene:

  • Indie Spotlight – The Indie Spotlight puts the focus on developers with Q&A and featured bios to give customers a glimpse of each developer’s style and personality. We’ll feature a different indie developer every week starting today with Gaijin Games.
  • Indie Bundles – Starting today until July 23rd, gamers can get great deals on Indie Bundles and increase their collection. These bundles are made up of 5, 6, or 10 games each, and will cost $9.99, which is a discount of up to 90% off if purchased separately.
  • Gift with Purchase – Starting today until July 17th, customers who purchase any indie title from the Indie Games Store, will receive codes to redeem 3 pre-selected titles for free. The games change daily and each purchase entitles customers to 3 free games, so customers are encouraged to check often.
  • Indie Gamer’s Choice– To help connect gamers and developers, we're introducing the Indie Gamer’s Choice program, where gamers can get involved. The Indie Gamer’s Choice positions two indie games head-to-head and allows players to vote on their favorite title to become the Indie Gamer’s Choice, which is featured in the store.

This is a great time for you to check out the Indie Games Store and participate in prominent merchandising on the new storefront. If you are interested in selling your games on the Indie Games Store, contact Amazon Digital Video Games at find-more-gamers@amazon.com.

 

June 03, 2013

Mike Hines

Starting today, customers can now buy apps and games directly from PCs and Macs for their Android phones, tablets, and Kindle Fire. You can now reach the millions of customers visiting Amazon.co.jp, either by automatically being included in recommendations on product detail pages or product search results, or featured on the Amazon Appstore for Android web storefront. Plus, you can now directly link to your app or game to promote its availability on Amazon.co.jp—learn more about linking to your apps and games on Amazon here.

This comes on the heels of our recent announcements of the opening of our store in nearly 200 countries worldwide, and Kindle Fire HD becoming available for pre-order in those countries as well. The shop is open today, and available at www.amazon.co.jp/apps.

 

May 30, 2013

Peter Heinrich

It’s no secret that customer satisfaction is key to Amazon’s success. It’s something we obsess about, and we constantly tweak everything from product selection to payment options to website design. We experiment, we measure, and we decide whether or not a change improves the user experience. One of the most powerful tools at our disposal is something we call a Web Lab, which allows us to test two (or more) different versions of a webpage, or roll out a new feature to a limited audience.

Perhaps this concept is less familiar to mobile application and game developers than to those who write web code, but it shouldn’t be. In fact, it’s so useful and important that Amazon’s A/B Testing service was one of the first we made available to mobile developers (If you haven’t tried the service yet, check out Getting Started with A/B Testing for a quick introduction).

Now a significant enhancement has just been released: Segmentation offers greater flexibility and control over who sees your experiments, allowing you to limit your tests to a set of users based on any dimensions you care to associate with them.

User dimensions

A “dimension” in this sense is simply a named characteristic whose value is a number or a bit of text. The UserProfile singleton object manages the dimensions you define, keeping track of their values for the current user. It’s these values that determine whether the current user is a member of a particular segment, and it’s entirely up to you how they are chosen, named, and initialized.

For example, say I want to test a new wine feature in my restaurant review app. I don’t want everyone to see it—just my beta testers—so I define a dimension called “isBetaTester” and initialize it based on some information I know about the current user:

        // Determine if the current user is actually participating in the beta,

        // based on my own definition of “participating.”

        boolean isBetaTester = validateUserAsBetaTester();

 

        // Set the dimension for the current user.

        UserProfile.addDimensionAsString("isBetaTester", String.valueOf(isBetaTester));

 

        // Initialize the Insights SDK to enable A/B Testing.

        AmazonInsights.withApplicationKey(MY_APPLICATION_KEY)

                      .withPrivateKey(MY_PRIVATE_KEY)

                      .withContext(getApplicationContext())

                      .initialize();

                 . . .

In this case, validateUserAsBetaTester() is a helper method I define to assist me in deciding whether the current user is a beta tester or not. This could be a preferences setting, or perhaps a check against an email whitelist.  Regardless, I’m responsible for setting the value, which I do before initializing the A/B Testing system.

Create a segment

Now that I’ve established a dimension to differentiate users, I need to define a segment that actually refers to it. The segment may be associated with any A/B test, limiting access to users who match (or don’t match) along the relevant dimension. From the Amazon Mobile App Distribution Portal, I navigate to the A/B Testing tab of my app, then click Add a New Segment.

Next, I fill in the segment information, paying special attention to the dimension information, since that must correspond to the name (“isBetaTester”) and type (String) I use in my application. In this case, I define a segment called “Beta Testers” that will include anyone whose isBetaTester dimension is a string equal to “true”:

Limit a test

With a segment defined, I can now use it to limit the scope of an A/B test. Let’s say I want to experiment with the length of user-submitted wine reviews. (I’d like to give people more space, but have to balance the storage required against the benefit of more detailed content.) When I create the test, the last setting allows me to specify the user segment I want to target. In this case, I choose my beta testers, whom I just identified:

When the test is started, beta users will begin to see variations of wineReviewLen, subject to the distribution I specify.  In my app, I can initialize a variable with the maximum allowable review length for the current user:

        ABTest.getVariationsByProjectNames("Wine Reviews")

            .withVariationListener("Wine Reviews", new VariationListener() {

                public void onVariationAvailable(Variation variation) {

                    maxReviewLen = variation.getVariableAsInt("wineReviewLen", 256);

                }

            });

For users outside the Beta Testers segment, the control variation will always be allocated. However, these users will never be included when the results of the experiment are calculated.

Complex segment criteria

In this simple example, a single boolean value was enough to distinguish segment members, but segmentation supports much more complicated criteria. You can easily attach more than one variable or change how variables are evaluated. String equality works as demonstrated (numeric equality is identical), but it’s also possible to create a segment based on a numeric range or set membership.

For example, perhaps I want to further segment my beta testers by those who have made a past purchase. I can create a numeric value called purchasesToDate and define the valid range as any non-zero value—note that I just have to start at 0 (exclusive) and omit the upper bound:

If I wanted to create a segment of customers in the Pacific Northwest, but only those who have used the app in 2012 or 2013, I could combine two tests for set membership:

Important note: users retain the variation they are initially allocated, even if their dimensions change later on.  This means that once a user has been identified as a member of one segment, they never move to another for the duration of the test, even if their dimensions change. This ensures a consistent experience; significant changes to features or interface could be jarring. (If a new test is started, the dimensions will be re-evaluated.)

That’s it!

Setting up segments is simple and adds a lot of flexibility to your experiments.  Give it a try the next time you’re considering A/B testing.  For information, be sure to check out the Insights documentation.

May 24, 2013

Mike Hines

Today we announced Engagement Reports, a free zero-integration service that provides data on app usage. This has been a popular request from developers, who want to better understand how customers interact with their apps. Engagement Reports include daily and monthly active devices, installs, sessions, average revenue per device, and retention. Each report can be filtered by marketplace, viewed in chart form, or downloaded as a CSV.

You can find the Engagement Reports within the “Reporting” tab of the Mobile App Distribution Portal. The full list of Engagement Reports is:

  • Overview: A summary of key usage data for your app or game
  • Average Revenue: Daily and Monthly Average Revenue per Device (ARPD) and Average Revenue per Paid User (ARPPU) for In-App Items
  • Retention: Daily Retention for days 1-3-7 and Weekly Retention for weeks 1-2-3
  • Active Devices: Daily Active Devices (DAD), Monthly Active Devices (MAD), and Sticky Factor (DAD/MAD)
  • Sessions: Total Daily Sessions and Average Sessions Per Device
  • App Installs: Daily Installs and Uninstalls

Engagement Reports are available for apps submitted and published after October 25, 2012. If you haven’t updated your app since then, you’ll need to republish or submit an update before data can be collected. No other action is required. Engagement Reports include data from the Kindle Fire HD, the new Kindle Fire, and Android devices that use the latest version of our store.

 How to access and view your Engagement Reports

From within the Distribution Portal, you can access Engagement Reports by selecting “Reporting” (1) and then “Engagementbeta” (2). Or, click here to go directly to Engagement Reports.

Engagement Reports are separated into three sections. (3) Criteria Selection: Allows you to select the app, date range, and marketplace. Engagement Reports default to your first app in an alphabetically sorted list and display the most recent 14 days of data. (4) Report Selection: Allows you to select from five different reports: Overview, Active Devices, Sessions, ARPD (In-App Items), and Retention. (5) The Overview report highlights key performance metrics such as Daily Active Devices and 1-Day Retention across a selectable date range and lifetime totals for your app or game.

Criteria Selection, Report Selection, Overview report

The example image below shows the Active Devices report (6) with a graph of Daily Active Devices (DAD) and Monthly Active Devices (MAD) over a 14 day period.

Active Devices report, FAQ

Developers that want to learn more about each report, including how data is collected, can review the Engagement Reports FAQ (7).

We encourage you to explore Engagement Reports and provide feedback via the “Send Feedback” link on the Engagement Reports page.

May 23, 2013

Mike Hines

As of today, customers can buy your apps on Amazon in nearly 200 countries worldwide using online and mobile stores in the US, Canada, Germany, France, Spain, and Italy. It was also announced that Kindle Fire HD is available for pre-order starting today, shipping to over 170 countries on June 13. This is a great opportunity for you to reach millions of new customers who can now discover your apps and games online through the Amazon website and on Android and Kindle Fire HD devices. This launch expands developer reach and monetization potential to Amazon customers around the world. For more information see the press release here.

It’s easy to make your apps available in all of these countries. If you are creating a new app, it will be available in all countries by default. You can select country and territory availability for each of your apps if you want to limit their availability. First, go to the Availability and Pricing tab in the distribution portal then select “Only in the following countries…” at the top of the page. You’ll see a list of continents that you can expand to make your selection. The number of countries you have selected in this manner will show up in parenthesis at the continent level. You can set the list price for your apps for each marketplace where Amazon sells apps, or you can have Amazon calculate a list price for you automatically using your base list price. Finally, to help report on all of this international goodness, your sales reporting now reflects your sales by country.

Please be sure to check that your existing apps are for sale in the countries in which you wish them to be sold, and have fun in all the new countries!

(See the International Program Overview FAQ here for more details.)

May 21, 2013

Mike Hines

Amazon Device Messaging, a free service that allows you to send cloud-based push notifications to Kindle Fire customers, is now out of Beta and is in general availability.

You can use ADM to send encrypted real-time notification to update users on breaking news or let them know that a new game task is available for them to complete. You can also use ADM for instant messaging functionality or social networking notifications within your app.

Messaging Overview

  • Deployment. We have documentation, sample code, tools, and FAQs to help you integrate ADM. Adding ADM to your app is easy. You obtain your ADM credentials and key (remember, this is an encrypted message), include the ADM library as an external JAR file, update your manifest, store your key as an asset, and implement your broadcast receiver. (we have sample code that shows this). To send a message, your server needs the app registration ID and a security token. You can find more implementation details here.
  • Simple. ADM delivers message data to your app on the device, and your app can decide what to do on receipt of that data like download content or display a notice. Your message should be no greater than 6KB in size and sent in the form of JSONObject key:value pairs.
  • Delivery. Messages expiration is one week by default, but can be configured to persist for one month if required. ADM will wake up the device to deliver messages, so messages can be sent and received during off-peak hours when the device is likely to be asleep. We use Amazon Web Services as a backend for this service, so we can scale up quickly and reliably.
  • Compatibility. ADM is supported on Kindle Fire HD 8.9" 4G, Kindle Fire HD 8.9", Kindle Fire HD 7", and Kindle Fire (2nd Generation) devices.
  • Free. Enough said.

Getting Started

Get started with Amazon Device Messaging by downloading the SDK here and reviewing our documentation, sample code, and FAQs. Submit your ADM-enabled app through the Amazon Amazon Mobile App Distribution Portal today!

Feedback from the Beta

During the ADM beta, we had big and small companies try the service, and we got international developer feedback as well. Here is some of the feedback we received:

From Wooga, a social game developer based in Berlin:

“The decision to integrate Amazon Device Messaging into Diamond Dash was a cinch – it is a clear win”, said Soenke Bullerdiek, Senior Manager Strategic Platform Partnerships, from Wooga, “Even better, it was easy to enable and only took a few days of work to start sending push notifications to our users.”

From Gameloft, a world-wide game developer based in the U.S.:

“We decided to use Amazon Device Messaging as a new way to engage our Oregon Trail American Settlers customers on Kindle Fire.  The documentation and sample code was easy to understand for our studios.” Baudouin Corman, VP Americas Gameloft.

May 14, 2013

siwapin

Adding advertising to your apps is easy. Integrating ads doesn’t require a major redesign of your app and has minimal impact on your app’s functionality.  It is as simple as making space for the ad on the screen.  The Amazon Mobile Ads API (Beta) enables you to display high-quality ads provided from the Amazon Mobile Ad Network in a matter of minutes.  This article explains how to place ads into an existing app using the Amazon Mobile Ads API.

Set Up Your Payment Information

First and foremost, submit your payment information through the Payment Information Page and your tax information through the Tax Identity Interview. You can skip this step if you have already submitted this information through the Amazon Mobile App Distribution Portal. This is required to receive ads.

Retrieve Your Application Key

The Amazon Mobile Ads API utilizes a unique Application Key to identify and interact with an app.  Every app will have its own Application Key.  If your app is already on the Distribution Portal, you can find your Application Key on the app’s detail page.  Otherwise, create a new app and fill in the “App title” and “Category” fields.  Locate the Application Key value and set that aside.  We will use that later to register with the Amazon Mobile Ad Network.

Application Key

Incorporate the Amazon Mobile Ads API Into to Your Project

Next, you will need to add the Amazon Mobile Ads API to your project.  For the purposes of this example, we will use Eclipse.

Download the Amazon Mobile Ads API (Beta) from here (this should link to our API landing page which has the file for download and the legal verbiage) and unzip it locally.

Add the JAR to Your Project

Modify the build path of your project and add the amazon-ads-<x.y.z>.jar found in the zip under the /Ads/lib folder.

  • In the Eclipse project explorer, right-click on your project and open the properties
  • Navigate to Java Build Path in the left pane
  • Choose the “Libraries” section
  • Press the “Add External JARs…” button
  • Choose the amazon-ads-<x.y.z>.jar from the zip

Java Build Path

  • Choose the “Order and Export” section
  • Check the box on the amazon-ads-<x.y.z>.jar

Order and Export

Add the amazon_ads_attr.xml to Your Project

This step is required to set up ads through the xml layout.  Copy the amazon_ads_attr.xml file from the zip located in /Ads/res/values/ into your project’s res/values/ folder.

Add the amazon_ads_attr.xml

Modify the ApplicationManifest.xml

The Amazon Mobile Apps API requires the following permissions and activities:

  • Add the following permissions to your manifest

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

  • Add the following activities within the application tag

 <activity android:name="com.amazon.device.ads.MraidBrowser" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.amazon.device.ads.VideoActionHandler" android:configChanges="keyboardHidden|orientation|screenSize"/>

Place the Ad in Your Project Layout

Now that the project is set up to use the Amazon Mobile Ads API, the next step is to add an ad to the application layout. 

  • Open the layout xml you want to display your ads on from your project’s res/layout folder
  • Add the following namespace to the parent layout filling in with your package name

xmlns:Amazon=http://schemas.android.com/apk/res/<my.package.name> 

  • Add an AdLayout into your layout and configure the adSize attribute.  You can find the supported ad size values here
  • Set the layout_width and layout_height to match the adSize.

<com.amazon.device.ads.AdLayout
        android:id="@+id/adview"
        Amazon:adSize="1024x50"
        android:layout_width="1024dp"
        android:layout_height="50dp"/>

Modify Your Activity Code

Now we can call the Amazon Mobile Ads API to load ads.

Import the Ads Classes

import com.amazon.device.ads.*;

Register with Your Application Key

Time to put that Application Key to work.  In your activities onCreate, call the AdRegistration method to register your app and then call the Amazon Mobile Ads API to load an ad.  Please note that you may only use an Application Key to display ads on the specific app for which it was issued. 

//Register App with the Ad Network
AdRegistration.setAppKey(getApplicationContext(), APP_ID); 

  //Load ad on to AdLayout
adview = (AdLayout)findViewById(R.id.adview);
adview.loadAd(new AdTargetingOptions());

Publish Your App

Submit your app to Amazon to display ads to your U.S. users and follow the attribution guidelines set forth here. The Amazon Mobile Ads API can also be used with apps that are distributed through any Android stores. Apps that use the Amazon Mobile Ads API may be distributed through any Android store as long as they are distributed through Amazon.

Congratulations!

Your app is ready to display high-quality ads from the Amazon Mobile Ad Network.  This is the simplest of configurations but the Amazon Mobile Ads API has several features for customizing your   ad layout, ad targeting, error handling, debugging, and more.  Read more about the many features of the Amazon Mobile Ads API (Beta) here.

Recent Posts


Archive