From 0eda90775b4f1bd2883a386688db1d80e36e071e Mon Sep 17 00:00:00 2001 From: Hung Date: Mon, 10 Oct 2022 10:40:57 +0800 Subject: [PATCH] update docs --- doc/ProductSearch.md | 16 ++++++++++++---- doc/ViSearch.md | 16 ++++++++++++---- visearch-android/build.gradle | 6 +++--- .../visenze/visearch/android/ProductSearch.java | 10 ++++++++-- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/doc/ProductSearch.md b/doc/ProductSearch.md index 1b8439a..f1990f6 100644 --- a/doc/ProductSearch.md +++ b/doc/ProductSearch.md @@ -6,7 +6,7 @@ With the release of ViSenze's Catalog system, ViSearch Android SDK will now incl - Aggregate search results on a product level instead of image level - Consistent data type in API response with Catalog’s schema -> Current stable version: 2.2.4 +> Current stable version: 2.2.5 > Minimum Android SDK Version: API 9, Android 2.3 @@ -63,8 +63,8 @@ allprojects { include the dependency in your project using gradle: ```gradle -implementation 'com.github.visenze:visenze-tracking-android:0.2.1' -implementation 'com.github.visenze:visearch-sdk-android:2.2.4' +implementation 'com.github.visenze:visenze-tracking-android:0.2.2' +implementation 'com.github.visenze:visearch-sdk-android:2.2.5' ``` ### 1.3 Add User Permissions @@ -525,7 +525,7 @@ You can initialize ViSenze Analytics tracker for sending analytics events as fol ```java ProductSeach productSearch = SearchAPI.getProductSearchInstance(); -Tracker tracker = productSearch.newTracker(null, false); +Tracker tracker = productSearch.newTracker(); ``` ### 7.2 Send Events @@ -565,6 +565,14 @@ Finally send the event via the tracker: tracker.sendEvent(event); ``` +User action(s) can also be sent through an batch event handler. + +A common use case for this batch event method is to group up all transaction by sending it in a batch. This SDK will automatically generate a transaction ID to group transactions as an order if the transaction ID is not provided. + +```java +tracker.sendEvents(eventList); +``` + Below are the brief description for various parameters: Field | Description | Required diff --git a/doc/ViSearch.md b/doc/ViSearch.md index 6f750d3..59319c4 100644 --- a/doc/ViSearch.md +++ b/doc/ViSearch.md @@ -4,7 +4,7 @@ ViSearch is an API that provides accurate, reliable and scalable image search. V The ViSearch Android SDK is an open source software to provide easy integration of ViSearch Search API with your Android mobile applications. It provides three search methods based on the ViSearch Search API - pre-indexed search, color search and upload search. For source code and references, please visit the [Github Repository](https://github.com/visenze/visearch-sdk-android). ->Current stable version: 2.2.4 +>Current stable version: 2.2.5 >Minimum Android SDK Version: API 9, Android 2.3 @@ -79,8 +79,8 @@ allprojects { include the dependency in your project using gradle: ```gradle -implementation 'com.github.visenze:visenze-tracking-android:0.2.1' -implementation 'com.github.visenze:visearch-sdk-android:2.2.4' +implementation 'com.github.visenze:visenze-tracking-android:0.2.2' +implementation 'com.github.visenze:visearch-sdk-android:2.2.5' ``` ### 1.3 Add User Permissions @@ -533,7 +533,7 @@ In addition, to improve subsequent search quality, it is recommended to send use You can initialize ViSenze Analytics tracker for sending analytics events by providing the code (found in ViSenze Dashboard). ```java -Tracker tracker = visearch.newTracker(code, false); +Tracker tracker = visearch.newTracker(code); ``` ### 6.2 Send Events @@ -571,6 +571,14 @@ Finally send the event via the tracker: tracker.sendEvent(event); ``` +User action(s) can also be sent through an batch event handler. + +A common use case for this batch event method is to group up all transaction by sending it in a batch. This SDK will automatically generate a transaction ID to group transactions as an order if the transaction ID is not provided. + +```java +tracker.sendEvents(eventList); +``` + Below are the brief description for various parameters: Field | Description | Required diff --git a/visearch-android/build.gradle b/visearch-android/build.gradle index 70d21cf..4f4a0e5 100644 --- a/visearch-android/build.gradle +++ b/visearch-android/build.gradle @@ -5,8 +5,8 @@ plugins { def versionMajor = 2 def versionMinor = 2 -def versionPatch = 4 -version = '2.2.4' +def versionPatch = 5 +version = '2.2.5' android { compileSdkVersion 29 @@ -38,7 +38,7 @@ android { dependencies { - implementation 'com.github.visenze:visenze-tracking-android:0.2.1' + implementation 'com.github.visenze:visenze-tracking-android:0.2.2' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.3.0' diff --git a/visearch-android/src/main/java/com/visenze/visearch/android/ProductSearch.java b/visearch-android/src/main/java/com/visenze/visearch/android/ProductSearch.java index 0b8338c..5d566f8 100644 --- a/visearch-android/src/main/java/com/visenze/visearch/android/ProductSearch.java +++ b/visearch-android/src/main/java/com/visenze/visearch/android/ProductSearch.java @@ -97,13 +97,19 @@ private void addAnalyticsParams(BaseProductSearchParams searchParams) { } // tracking related + public Tracker newTracker() { + return newTracker(null, false); + } + + public Tracker newTracker(String code) { + return newTracker(code, false); + } + public Tracker newTracker(String code, boolean useCnEndpoint) { if(code == null) code = trackCode; return visenzeAnalytics.newTracker(code, useCnEndpoint); } - - public static class Builder { private String mAppKey; private int mPlacement;