The ultimate product information API, enabling a new breed of product-centric apps. This project contains the Android SDK. We also provide SDKs for iOS and Java.
See ProductLayer in action in our prod.ly app.
https://www.cocoanetics.com/2018/04/productlayer-post-mortem/
compile 'com.productlayer.ply-android-sdk:0.5.1'
compile 'com.productlayer.ply-android-common:0.5.1'
<dependency>
<groupId>com.productlayer</groupId>
<artifactId>ply-android-sdk</artifactId>
<version>0.5.1</version>
</dependency>
<dependency>
<groupId>com.productlayer</groupId>
<artifactId>ply-android-common</artifactId>
<version>0.5.1</version>
</dependency>
Get your API key from developer.productlayer.com
PLYRestClientConfig config = new PLYRestClientConfig();
config.apiKey = "YOUR_API_KEY";
PLYAndroid client = new PLYAndroid(config);
ProductService.searchProductsByBrand(client, "Apple", null, null,
new PLYCompletion<Product[]>() {
@Override
public void onSuccess(Product[] result) {
// display results
}
@Override
public void onError(QueryError error) {
}
}
);
This will run asynchronously, querying our API for all products by brand Apple.
To view the full functionality of our API please visit developer.productlayer.com.
The demo app showcases some of the components found in the common library:
- ScannerActivity, a barcode scanner and lookup of a product on ProductLayer
- GlobalTimelineFragment, a feed of the latest products and opinions
- ProductFragment, everthing about a specific product: facts, opinions, images
The common library includes even more components to facilitate usage of the SDK: adapters, dialogs, views as well as full-blown UI fragments.