diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 67adf7d..49aecf2 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,8 +1,11 @@ + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 81275e2..903fdfc 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.6.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' diff --git a/demoapp/demoapp.iml b/demoapp/demoapp.iml index 47cdfae..9e93bdd 100644 --- a/demoapp/demoapp.iml +++ b/demoapp/demoapp.iml @@ -4,8 +4,8 @@ @@ -19,30 +19,28 @@ - - + + - - + - + + - - - + + + - - - + @@ -91,8 +89,8 @@ - + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a7cc113..2e4a4e8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Oct 15 17:40:54 CEST 2018 +#Wed Apr 22 15:11:36 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/library/build.gradle b/library/build.gradle index 79012ea..944f7be 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -8,7 +8,7 @@ android { minSdkVersion 15 targetSdkVersion 23 versionCode 1 - versionName "2.0.19" + versionName "2.0.20" } buildTypes { release { diff --git a/library/library.iml b/library/library.iml index d9f4cdf..02bdad5 100644 --- a/library/library.iml +++ b/library/library.iml @@ -4,8 +4,8 @@ @@ -19,7 +19,7 @@ - - + + - - + - + + - - - + - + + - - + @@ -93,8 +91,8 @@ - + diff --git a/library/src/main/java/com/queue_it/androidsdk/QueueITEngine.java b/library/src/main/java/com/queue_it/androidsdk/QueueITEngine.java index 33a45af..843126c 100644 --- a/library/src/main/java/com/queue_it/androidsdk/QueueITEngine.java +++ b/library/src/main/java/com/queue_it/androidsdk/QueueITEngine.java @@ -257,10 +257,12 @@ private void tryEnqueue() QueueServiceListener queueServiceListener = new QueueServiceListener() { @Override - public void onSuccess(String queueId, String queueUrlString, int queueUrlTtlInMinutes, String eventTargetUrl) { + public void onSuccess(String queueId, String queueUrlString, int queueUrlTtlInMinutes, String eventTargetUrl, String queueItToken) { if (IsSafetyNet(queueId, queueUrlString)) { - QueueITEngine.this.raiseQueuePassed(""); + QueuePassedInfo queuePassedInfo = new QueuePassedInfo(queueItToken); + String result = queuePassedInfo.getQueueItToken(); + QueueITEngine.this.raiseQueuePassed(result); } else if (IsInQueue(queueId, queueUrlString)) { diff --git a/library/src/main/java/com/queue_it/androidsdk/QueueService.java b/library/src/main/java/com/queue_it/androidsdk/QueueService.java index e164ae2..218361b 100644 --- a/library/src/main/java/com/queue_it/androidsdk/QueueService.java +++ b/library/src/main/java/com/queue_it/androidsdk/QueueService.java @@ -117,11 +117,11 @@ public void run() { final String queueUrl = optString(jsonObject, "QueueUrl"); final int queueUrlTtlInMinutes = optInt(jsonObject, "QueueUrlTTLInMinutes"); final String eventTargetUrl = optString(jsonObject, "EventTargetUrl"); - + final String queueItToken = optString(jsonObject, "QueueitToken"); mainHandler.post(new Runnable() { @Override public void run() { - _queueServiceListener.onSuccess(queueId, queueUrl, queueUrlTtlInMinutes, eventTargetUrl); + _queueServiceListener.onSuccess(queueId, queueUrl, queueUrlTtlInMinutes, eventTargetUrl, queueItToken); } }); } catch (JSONException e) { diff --git a/library/src/main/java/com/queue_it/androidsdk/QueueServiceListener.java b/library/src/main/java/com/queue_it/androidsdk/QueueServiceListener.java index c3e46ea..0078f0c 100644 --- a/library/src/main/java/com/queue_it/androidsdk/QueueServiceListener.java +++ b/library/src/main/java/com/queue_it/androidsdk/QueueServiceListener.java @@ -1,6 +1,6 @@ package com.queue_it.androidsdk; public interface QueueServiceListener { - void onSuccess(String queueId, String queueUrlString, int queueUrlTtlInMinutes, String eventTargetUrl); + void onSuccess(String queueId, String queueUrlString, int queueUrlTtlInMinutes, String eventTargetUrl, String queueItToken); void onFailure(String errorMessage, int errorCode); }