Sunday, June 29, 2014

How to Submit android app to Amazon app store

If you are new to android development and specifically planning to launch your app to Amazon app store. Then you must be feeling a little bit left behind, because there you won't find much over net apart from Amazon's own material. 

Although it is mentioned on their site clearly, I thought of repeating it, because it will just some one else to find the right thing :

So if you want to add the ad api so here is the way : 

1.  Download sdk from here.
2.  Now add the Jar in Eclipse using Install New Software. After that add this link as name Amazon.
3.  Now Import your android project, remove all the google play service api from it, and add Amazon api. To do that right click on your project, and click on Properties. And then in that click on Amazon Mobile app SDK. 
4. There you can select whatever you want to use, Mobile Ads, ADM, In-App purchasing etc.
5. Now it comes to the coding part. Wherever you want to use it, include the following code :

AdRegistration.setAppKey("37de83fd21234ed4811e241507876542F"); // put your Application id
    
   this.adView = (AdLayout) findViewById(R.id.adview);
   
   AdTargetingOptions adOptions = new AdTargetingOptions().enableGeoLocation(true);
   // Optional: Set ad targeting options here.
   this.adView.loadAd(adOptions); // Retrieves an ad on background thread

And you have to create corresponding entry in xml :

 
    android:id="@+id/adview"
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"/>

6. And you are good to go. 
7. Use Test your app option on Amazon before uploading your apk to Amazon app store.

I hope this blog help you to publish your first App on Amazon app store.

No comments: