Skip to content

Commit 3bc755c

Browse files
author
queue-it
committed
Preparing release 2.1.8
1 parent 43f0826 commit 3bc755c

File tree

7 files changed

+48
-26
lines changed

7 files changed

+48
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ If your application is using an API that's protected by a Queue-it connector (Kn
157157

158158
```xml
159159
<activity android:name="com.queue_it.androidsdk.QueueActivity" />
160-
```
160+
```

build.gradle

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ buildscript {
1111
dependencies {
1212
classpath 'com.android.tools.build:gradle:7.1.1'
1313
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
14-
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0"
15-
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
14+
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
1615
}
1716
}
18-
apply plugin: 'io.codearte.nexus-staging'
17+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
1918

2019
Properties localProps = new Properties()
2120
if (rootProject.file("local.properties").exists()) {
@@ -36,7 +35,7 @@ allprojects {
3635
groupId = 'com.queue-it.androidsdk'
3736
libraryName = 'com.queue_it.androidsdk'
3837
libraryDescription = 'Android SDK to integrate with Queue-it'
39-
libraryVersion = "2.1.7"
38+
libraryVersion = "2.1.8"
4039
organization = "Queue-it"
4140
organizationUrl = "https://queue-it.com"
4241

@@ -50,13 +49,29 @@ allprojects {
5049
var = '7.0.0-alpha05'
5150
extraProperties = localProps
5251

53-
OSSRH_USERNAME = localProps.getProperty("OSSRH_USERNAME") ?: System.getenv("OSSRH_USERNAME")
54-
OSSRH_PASSWORD = localProps.getProperty("OSSRH_PASSWORD") ?: System.getenv("OSSRH_PASSWORD")
52+
SONATYPE_USERNAME = localProps.getProperty("SONATYPE_USERNAME") ?: System.getenv("SONATYPE_USERNAME")
53+
SONATYPE_PASSWORD = localProps.getProperty("SONATYPE_PASSWORD") ?: System.getenv("SONATYPE_PASSWORD")
5554
PGP_KEY = localProps.getProperty("PGP_KEY") ?: System.getenv("PGP_KEY")
5655
PGP_PASSWORD = localProps.getProperty("PGP_PASSWORD") ?: System.getenv("PGP_PASSWORD")
5756
}
5857
}
5958

59+
nexusPublishing {
60+
packageGroup = groupId
61+
62+
repositories {
63+
sonatype {
64+
//stagingProfileId = "219f8fe296e7e"
65+
66+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
67+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
68+
69+
username.set(SONATYPE_USERNAME)
70+
password.set(SONATYPE_PASSWORD)
71+
}
72+
}
73+
}
74+
6075
task clean(type: Delete) {
6176
delete rootProject.buildDir
6277
}
45 KB
Loading

documentation/protected_apis.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ The integration can be described in the following steps:
2222
4. Scenario 2, user should not be queued
2323
4.1. We store the Queue-it cookies from the response
2424

25+
![API Integration Flow](https://github.com/queueit/android-webui-sdk/blob/master/documentation/App%20+%20Connector%20integration%20with%20QueueITToken.png "App Integration Flow")

library/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,4 @@ artifacts {
7676
archives sourcesJar
7777
}
7878

79-
nexusStaging {
80-
stagingProfileId = "219f8fe296e7e"
81-
packageGroup = groupId
82-
username = OSSRH_USERNAME
83-
password = OSSRH_PASSWORD
84-
}
85-
8679
apply from: '../publish.gradle' // Makes this library publishable

library/src/main/java/com/queue_it/androidsdk/QueueActivityBase.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ public void initialize(Bundle savedInstanceState) {
121121
_context.setContentView(R.layout.activity_queue);
122122
readActivityExtras(savedInstanceState);
123123
cleanupWebView();
124+
125+
if (queueUrl == null || targetUrl == null) {
126+
broadcaster.broadcastQueueError("Failed to load the queue. Queue Url or Target Url are missing from the running Activity. " +
127+
"Please, check the error logs for more details.");
128+
_context.finish();
129+
return;
130+
}
131+
124132
final ProgressBar progressBar = _context.findViewById(R.id.progressBar);
125133

126134
FrameLayout layout = _context.findViewById(R.id.relativeLayout);
@@ -152,6 +160,12 @@ public void saveInstanceState(Bundle outState) {
152160
outState.putString("targetUrl", targetUrl);
153161
outState.putString("webViewUserAgent", webViewUserAgent);
154162
outState.putString("userId", uriOverrider.getUserId());
163+
164+
Log.i("QueueITEngine", "Saving instance state:");
165+
Log.i("QueueITEngine", "queueUrl: " + queueUrl);
166+
Log.i("QueueITEngine", "targetUrl: " + targetUrl);
167+
Log.i("QueueITEngine", "webViewUserAgent: " + webViewUserAgent);
168+
Log.i("QueueITEngine", "userId: " + uriOverrider.getUserId());
155169
}
156170

157171
public void destroy() {
@@ -181,8 +195,17 @@ private void readActivityExtras(Bundle savedInstanceState) {
181195
uriOverrider.setUserId((String) savedInstanceState.getSerializable("userId"));
182196
}
183197

184-
uriOverrider.setTarget(Uri.parse(targetUrl));
185-
uriOverrider.setQueue(Uri.parse(queueUrl));
198+
if (targetUrl != null) {
199+
uriOverrider.setTarget(Uri.parse(targetUrl));
200+
} else {
201+
Log.e("QueueITEngine", "targetUrl is null, cannot set target Uri");
202+
}
203+
204+
if (queueUrl != null) {
205+
uriOverrider.setQueue(Uri.parse(queueUrl));
206+
} else {
207+
Log.e("QueueITEngine", "queueUrl is null, cannot set queue Uri");
208+
}
186209
}
187210

188211
private void disposeWebview(WebView webView) {

publish.gradle

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
apply plugin: 'maven-publish'
22
apply plugin: 'signing'
3-
apply plugin: "de.marcphilipp.nexus-publish"
43

54
group = groupId
65
version = libraryVersion
@@ -98,13 +97,4 @@ signing {
9897
publishing.publications.all { publication ->
9998
sign(publication)
10099
}
101-
}
102-
103-
nexusPublishing {
104-
repositories {
105-
sonatype {
106-
username.set(OSSRH_USERNAME)
107-
password.set(OSSRH_PASSWORD)
108-
}
109-
}
110100
}

0 commit comments

Comments
 (0)