- Initialize SDK your Application level
- API: Getting Album/PDP contents
- API: Getting a PXLPhoto with an album photo id
- API: Upload a video of a photo
- API: Analytics for album/product
- API: Analytics for Ecommerce
- UI Components
You must do this before using this SDK!!
- Before accessing any Pixlee API, you must initialize the
PXLClient
. To set the API key, call the static method initialize. The simplest way for this is you put this code in your Application class:Or:// If you need only to use @Get APIs #!kotlin PXLClient.initialize(<PIXLEE API KEY>)
// If you need to use both @Get and @Post APIs #!kotlin PXLClient.initialize(<PIXLEE API KEY>, <PIXLEE SECRET KEY>)
- if you use multi-region, you can set your region id here to get photos, a photo, and products available in the region.
#!kotlin
PXLClient.regionId = your region id <--- set it if you use multi-region.
#!swift
PXLClient.autoAnalyticsEnabled = true // (Optional) <----- This activates auto-analytics on PXLPhotoRecyclerView, PXLPhotoRecyclerViewInGrid and PXLPhotoProductView.
- This is to delegate this SDK to fire necessary analytics events for you. If you don't want to use this, you can just ignore this part.
- if you use PXLPhotoRecyclerView or PXLPhotoRecyclerViewInGrid, you need an extra setting Document: Automatic analytics of PXLGridView.
- Which analytics do we fire for you?:
loadmore
event: when you usePXLClient.sharedClient.loadNextPageOfPhotosForAlbum(album: album)
and load the second or the next pages, we fireloadmore
events for you.openedWidget
event: if you implemente Document: Automatic analytics of PXLGridView and try to display the PXLGridView with a number of PXLPhotos on the screen we fireopenedWidget
.widgetVisible
event: if you implemente Document: Automatic analytics of PXLGridView and try to display the PXLGridView with a number of PXLPhotos on the screen we firewidgetVisible
.openedLightbox
event: when you display PXLPhotoProductView with a PXLPhoto on the screen, we fireopenedLightbox
.
- Notice: you can see the fired events on Logcat. If there's a problem of your setting, you can see error messages we display in Logat.