I downloaded the latest version of the Mobile Buy SDK Android from this https://github.com/Shopify/mobile-buy-sdk-android/releases/ , and I successfully completed the sample project by following the following steps https://docs.shopify.com / mobile-buy-sdk / android / integration-guide .
What I've done
When you select a specific product from the list of displayed products, it will go to
ProductDetailsActivity
and there is the possibility of a checkout
product. therefore, it is currently useful for purchasing a single product.
ProductListActivity.java
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (useProductDetailsActivity) {
launchProductDetailsActivity(products.get(position));
} else {
createCheckout(products.get(position));
}
}
});
SampleApplication.java
public void launchProductDetailsActivity(Activity activity, Product product, ProductDetailsTheme theme) {
ProductDetailsBuilder builder = new ProductDetailsBuilder(this, buyClient);
Intent intent = builder.setShopDomain(buyClient.getShopDomain())
.setProduct(product)
.setTheme(theme)
.setShop(shop)
.setWebReturnToUrl(getString(R.string.web_return_to_url))
.setWebReturnToLabel(getString(R.string.web_return_to_label))
.build();
activity.startActivityForResult(intent, 1);
}
the above code fragment was used to purchase one product.
What I need
: "- EditText
<< → " Button
ProductDetailsActivity
, nos, . , .
launchProductDetailsActivity()method
SampleApplication.java
buy-1.2.0. , add Cart
quantity
.