Android Buy SDK
The Android Buy SDK makes it easy to create custom storefronts in your mobile app. The SDK connects to the Shopify platform using GraphQL, and supports a wide range of native storefront experiences.
Requirements
锚的链接部分题为“需求”Before you can use the Android Buy SDK, you'll need the following:
- Android SDK Level 14 (Ice Cream Sandwich 4.0) or higher
- JDK 1.7
- Android Studio 2.1.xrecommended
Step 1: Generate an access token
Anchor link to section titled "Step 1: Generate an access token"To generate an access token, you create a custom app eitherusing OAuthorin the Shopify admin.
The access token is generated when you install the custom app. You include the access token with any requests made from your app to Shopify.
Step 2: Make your products and collections available
Anchor link to section titled "Step 2: Make your products and collections available"After you've generated an access token, you need to make products and collections available to your custom app to access them from your app. After the products and collections are available, you can retrieve them using their respective IDs.
Make a product available
Anchor link to section titled "Make a product available"- From your Shopify admin, go toProducts.
- From theProductspage, click the product you want to make available.
- Next toSALES CHANNELS AND APPSclickManage.
- In theSales channels and appsdialog box, select the box next to the name of your custom app.
Make a collection available
Anchor link to section titled "Make a collection available"- From your Shopify admin, go toProductsand clickCollections.
- From theCollectionspage, click the collection you want to make available.
- Next toSALES CHANNELS AND APPSclickManage.
- In theSales channels and appsdialog box, select the box next to the name of your custom app.
Step 3: Set up Android App Links
Anchor link to section titled "Step 3: Set up Android App Links"You can set upAndroid App Linksto integrate your app with Android web browsers. When an Android user taps a link to your website, they're redirected to your app if they have it installed.
From your Shopify admin, go toApps.
ClickDevelop apps.
Click the name of your app.
ClickAPI的集成.
In theStorefront API integration教派ion, clickConfigure.
- 如果哟u've previously assigned any Storefront API scopes, then clickEdit.
Expand theAndroid Buy SDK configuration教派ion.
Enter yourAndroid application IDand yourSHA-256 certificate fingerprints.
Step 4: Access the Android Buy SDK
Anchor link to section titled "Step 4: Access the Android Buy SDK"The GitHub repository and each release include the Android Buy SDK and a sample app that shows how you can use the SDK.
Checkout on mobile
Anchor link to section titled "Checkout on mobile"You can use Shopify’s web checkout for your mobile app.
Using Shopify’s web checkout makes sure that your customers always have access to the latest version of the checkout, which is optimized for speed, conversion, and customer experience.
Where to get help
Anchor link to section titled "Where to get help"Mobile app development falls outside the scope of our support service. This means that Shopify support can't help if you run into problems, unless they're specifically related to the Android Buy SDK itself. Below are the ways you can get help with the Android Buy SDK.
Open an issue in the GitHub repository.
Visit our forums to connect with the community and learn more about the Shopify API and app development.
Find a Shopify Partner for hire in our ecosystem of talented development agencies.