GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Fire OS Developer Docs
  • Fire Tablets

This view

  • Original page
  • New address

GeezerVison is showing developer.amazon.com — Set Up Your Environment (Fire Tablets) | Fire Tablets

Amazon Developer
Alexa
Amazon Appstore
Ring
AWS
Documentation

Console

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases

Console

as

Fire OS Developer Docs
Home
Develop
Test
Publish
Monetize
Engage users
Device specifications
Resources
Fire Tablets

Collapse All | Expand All


  • << Fire OS Developer Docs
    • Get Started
      • Get Started with Fire Tablets
      • Set Up Your Development Environment for Fire Tablets
      • Create Your First Fire Tablet App
      • Connect to Fire Tablet through ADB
      • Get started with Amazon Stylus SDK
      • UX Specifications
      • User Agent Strings for Fire Tablets
      • Supported Android Intents
      • FAQs for Fire Tablets
    • Fire OS for Fire Tablets
      • Fire OS 8 for Fire Tablets
      • Fire OS 7 for Fire Tablets
      • Fire OS 6 for Fire Tablets
    • Android Apps
      • Screen Layout and Resolution
      • Device Orientation
      • Soft Key Bar
      • Button Size and Placement
      • Graphics Performance
      • Data Transfers and Mobile Networks
      • Launcher Icon Guidelines
      • App Installation Location
      • Advertising ID
      • Resources for International Locales
    • Test your Android Apps
      • Run Your App on a Fire Tablet
      • Test Without an Amazon Device
      • Take Screenshots on Fire Tablets
    • Web Apps
      • Get Started with Web Apps
      • Set up Development Environment
      • Best Practices for Developing Web Apps
      • Web App FAQs
      • Detect the Device Display Characteristics
      • Force the Device Orientation
      • Handle Device Orientation
      • Automatically Scale an Element to Fill the Screen
      • HTTP Caching
      • Protect Your Web App
      • Capture Media from Device Sensors
      • Use Geolocation Data
    • Test Your Web Apps
      • Install and Use the Amazon Web App Tester
      • Debug Your Web App
      • Use the Debug APK to Test Your App
    • HTML5 Hybrid Apps
      • HTML5 Hybrid Apps
      • Build and Test Your HTML5 Hybrid App
      • HTML5 Hybrid App FAQs
    • React Native for Fire Tablet
      • Get Started with React Native (Fire Tablets)
      • Supported React Native Libraries (Fire Tablets)
    • Accessibility
      • Assistive Technologies for Fire OS
      • Implement Accessibility in Fire OS
      • Accessibility Features
        • Implement Reading and Subscribing to AD/CC Settings

    Set Up Your Environment (Fire Tablets)

    Follow these guidelines and instructions to set up the environment for your web app.

    • Include the Amazon API JavaScript Library
      • Hosted Apps
      • Packaged Apps
      • Create Packaged Apps
    • Use the Amazon API JavaScript Library
    • Specify the Launch Path
      • Hosted Apps
      • Packaged Apps
    • Web App Permissions
      • Test Your Packaged Web App
      • Submit your HTML5 Packaged Web App to the Amazon Appstore

    Include the Amazon API JavaScript Library

    If your web app uses Amazon APIs such as in-app purchasing (IAP), include the Amazon API JavaScript library in your code to use those APIs.

    Hosted Apps

    For hosted apps, the Amazon API JavaScript file is hosted at this URL:

    https://resources.amazonwebapps.com/v1/latest/Amazon-Web-App-API.min.js
    

    Add a <script> tag to the end of your HTML <body> to include this file with your web app:

    <script src="https://resources.amazonwebapps.com/v1/latest/Amazon-Web-App-API.min.js"></script>
    

    Packaged Apps

    Create Packaged Apps

    Creating a new packaged app is as simple as creating any other type of zip file. Make sure the app has an index.html file as its starting page, or show the path to the app's main launch page when submitting the app. To make sure the app works offline, include all those assets as well.

    You can use a GUI application like WinZip, or using zip from the command line. This command for zipping a folder results in the basic zip file you need: $ zip -r project.zip ./project

    A packaged HTML5 app project looks and works like a normal web project folder on a server.

    For packaged apps, the Amazon API JavaScript file is automatically injected at the root level of your .zip file. Use a relative URL in your <script> tag to refer to that file.

    For example, if your app's files are at the top level of the .zip archive, like this:

    Package.zip/
      index.html
      js/index.js
      css/index.css
      html/other.html
      images/image1.png
    

    The Amazon-Web-App-API.min.js is added at the same level as index.html. Use the following <script> tags to include Amazon-Web-App-API.min.js in these HTML files:

    From within index.html: <script src="Amazon-Web-App-API.min.js"></script>

    From within html/other.html: <script src="/Amazon-Web-App-API.min.js"></script>

    If your app's files are inside a folder in the .zip archive, like this:

    Package.zip/
       MyApp/
          index.html
          js/index.js
          css/index.css
          html/other.html
          images/image1.png
    

    The Amazon-Web-App-API.min.js is added at the same level as the MyApp folder. Use the following <script> tags to include Amazon-Web-App-API.min.js in these HTML files:

    From within MyApp/index.html: <script src="/Amazon-Web-App-API.min.js"></script>

    From within MyApp/html/other.html: <script src="/Amazon-Web-App-API.min.js"></script>

    Use the Amazon API JavaScript Library

    Any code in your web app that uses an Amazon API must be called after the amazonPlatformReady event has been raised from the Amazon HTML5 framework.

    document.addEventListener('amazonPlatformReady', function () {
      //API code goes here
    });
    

    Specify the Launch Path

    The launch path of your app is the path to the file that should be loaded when your app first starts.

    Hosted Apps

    For hosted apps, the launch path is the URL of your web app. When you submit your hosted app to the Amazon Appstore, specify the URL of the page to be loaded when the app starts.

    Packaged Apps

    For packaged apps, the launch path is the HTML file that should be loaded when your app first starts, relative to the root of the .zip archive. For example, if you want to launch index.html when your app first starts, and that file is at the root level of your zip archive, you would use /index.html. If the file is within a subdirectory called MyApp/ the launch path is /MyApp/index.html. When you submit your app to the Amazon Appstore, specify this URL as the launch URL.

    Web App Permissions

    If your app uses one or more features that need customer permission, select the appropriate checkbox during the submission flow. If your app requires any customer permission (In-App Purchasing or User Login), you must configure the associated page to use SSL. The following table specifies the features that require permissions:

    Feature Permission
    In-App Purchasing Allows the web app to use Amazon's In-App Purchasing API
    Geo Location Allows the web app to use location features
    Storage Allows the web app to read/write from external storage

    In protect customers, we require that you serve your web app using SSL if your app uses In-App Purchasing or requires authentication. For more information, refer to Protecting your Web App.

    Test Your Packaged Web App

    The Amazon Web App Tester has been upgraded to handle packaged web apps as well. If you're not familiar with the Web App Tester, check out this blog post, Getting the most out of the Web App Tester, which shows you how to use it to test your web app before submission, including enabling and using the Remote Development Tools and other tips and tricks.

    In addition to entering URLs for hosted web apps, developers can now load their zipped web app files on to the device, which will be pulled in by the Web App Tester for viewing/debugging. Using the Android File Transfer tool, copy the zipped web app files you want to test to a folder in the root of the device: /amazonwebapps

    The app package file should then show up in Web App Tester, where you can click Extract and use the app as per normal. You can also enter a URL pointing to a packaged zip file instead and follow the same steps.

    Submit your HTML5 Packaged Web App to the Amazon Appstore

    1. Log in to your Amazon account.
    2. Go to the New Web App Submission page.
    3. Choose whether to submit a hosted web app or a packaged web app. (In this case, the latter).
    4. Upload the web app files (HTML, JavaScript, CSS, content files/resources) as a zip file on the Upload Your App File screen.
    5. Provide additional details about the packaged web app on the remaining app submission screens.
    6. On the Review & Submit screen, click Submit App.

    Last updated: Oct 02, 2023


    • Include the Amazon API JavaScript Library
      • Hosted Apps
      • Packaged Apps
      • Create Packaged Apps
    • Use the Amazon API JavaScript Library
    • Specify the Launch Path
      • Hosted Apps
      • Packaged Apps
    • Web App Permissions
      • Test Your Packaged Web App
      • Submit your HTML5 Packaged Web App to the Amazon Appstore
    Follow us:

    Resources

    • Appstore developer blog

    • Technical documentation

    • Amazon Developer Huddle

    Supported devices

    • Amazon Fire TV

    • Fire tablets

    Other services & APIs

    • Small Business Accelerator Program

    • Developer Promotions Console

    • Alexa for video publishers

    • Login with Amazon

    • Frustration-Free Setup

    • Amazon Incentives API

    • Amazon Merch on Demand

    • Amazon Music

    • Fire TV Partners

    Support

    • Appstore Developer Community

    • FAQs

    • Contact us

    Legal

    • Terms & agreements

    • Privacy Notice

    amazon_developer_logo

    © 2010-2026, Amazon.com, Inc. or its affiliates. All Rights Reserved.

    Terms

    Amazon Developer Blog

    Contact Us

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.