Skip to content

Commit 187a6bd

Browse files
committed
Merged PR 2364: Updated android library version
Updated android library version Related work items: #7216
1 parent 26f4589 commit 187a6bd

File tree

10 files changed

+47
-24
lines changed

10 files changed

+47
-24
lines changed

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.0.1'
11+
classpath 'com.android.tools.build:gradle:4.1.1'
1212
// noinspection DifferentKotlinGradleVersion
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
@@ -129,7 +129,7 @@ dependencies {
129129
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
130130

131131
//App dependencies
132-
implementation 'com.queue_it.androidsdk:library:2.0.23'
132+
implementation 'com.queue_it.androidsdk:library:2.0.27'
133133
implementation 'com.android.support:appcompat-v7:28.0.0'
134134
implementation 'com.android.support:design:28.0.0'
135135
}

android/src/main/java/com/reactnativequeueit/QueueItModule.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@ class QueueItModule(reactContext: ReactApplicationContext)
2727

2828
@ReactMethod
2929
fun runAsync(customerId: String, eventAlias: String, layoutName: String?, language: String?, promise: Promise) {
30-
val qListener = object : QueueListener {
30+
val qListener = object : QueueListener() {
3131
override fun onUserExited() {
3232
val params = Arguments.createMap()
3333
sendEvent(context, "userExited", params)
3434
}
3535

3636
override fun onQueuePassed(queuePassedInfo: QueuePassedInfo?) {
37-
handler.post(Runnable {
37+
handler.post {
3838
val params = Arguments.createMap()
3939
val token = if (queuePassedInfo?.queueItToken!=null) queuePassedInfo.queueItToken else ""
4040
params.putString("queueittoken", token)
4141
params.putString("state", EnqueueResultState.Passed.name)
4242
promise.resolve(params)
43-
})
43+
}
4444
}
4545

4646
override fun onQueueItUnavailable() {
47-
handler.post(Runnable {
47+
handler.post {
4848
val params = Arguments.createMap()
4949
params.putNull("queueittoken")
5050
params.putString("state", EnqueueResultState.Unavailable.name)
5151
promise.resolve(params)
52-
})
52+
}
5353
}
5454

5555
override fun onQueueViewWillOpen() {
@@ -58,25 +58,25 @@ class QueueItModule(reactContext: ReactApplicationContext)
5858
}
5959

6060
override fun onQueueDisabled() {
61-
handler.post(Runnable {
61+
handler.post {
6262
val params = Arguments.createMap()
6363
params.putNull("queueittoken")
6464
params.putString("state", EnqueueResultState.Disabled.name)
6565
promise.resolve(params)
66-
})
66+
}
6767
}
6868

6969
override fun onError(error: Error?, errorMessage: String?) {
70-
handler.post(Runnable {
70+
handler.post {
7171
promise.reject("error", errorMessage)
72-
})
72+
}
7373
}
7474
}
7575

76-
handler.post(Runnable {
76+
handler.post {
7777
val queueEngine = QueueITEngine(context.currentActivity, customerId, eventAlias, layoutName, language, qListener)
7878
queueEngine.run(context.currentActivity)
79-
})
79+
}
8080
}
8181

8282
private fun sendEvent(reactContext: ReactContext,

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath('com.android.tools.build:gradle:4.0.1')
15+
classpath('com.android.tools.build:gradle:4.1.1')
1616
}
1717
}
1818

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jul 17 09:38:54 CEST 2020
1+
#Tue Nov 24 09:49:38 CET 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

example/ios/QueueItExample/Info.plist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020
<string>1.0</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
23+
<key>CFBundleURLTypes</key>
24+
<array>
25+
<dict>
26+
<key>CFBundleTypeRole</key>
27+
<string>Editor</string>
28+
<key>CFBundleURLSchemes</key>
29+
<array>
30+
<string>myapp</string>
31+
</array>
32+
</dict>
33+
</array>
2334
<key>CFBundleVersion</key>
2435
<string>1</string>
2536
<key>LSRequiresIPhoneOS</key>

example/src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class App extends Component<{}, AppState> {
4343
});
4444
const enqueueResult = await QueueIt.run(
4545
this.state.clientId,
46-
this.state.eventOrAlias
46+
this.state.eventOrAlias,
47+
'mobile'
4748
);
4849
switch (enqueueResult.State) {
4950
case EnqueueResultState.Disabled:

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ target 'QueueIt' do
88
# Pods for QueueIt
99

1010
# Our pods
11-
pod 'QueueITLibrary', '~>3.0.1'
11+
pod 'QueueITLibrary', '~>3.0.4'
1212
end

ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- QueueITLibrary (3.0.1)
2+
- QueueITLibrary (3.0.4)
33

44
DEPENDENCIES:
5-
- QueueITLibrary (~> 3.0.1)
5+
- QueueITLibrary (~> 3.0.4)
66

77
SPEC REPOS:
88
trunk:
99
- QueueITLibrary
1010

1111
SPEC CHECKSUMS:
12-
QueueITLibrary: 0a0936ef1994fe09a84a45052ce726839cf185c1
12+
QueueITLibrary: 658775740dcc672953ecf20da7002eb465ac5a98
1313

14-
PODFILE CHECKSUM: a07820c47fa81c641a335914ce81685dbef02059
14+
PODFILE CHECKSUM: 071e1a5db24d5c38e420d6247163daae893f568f
1515

16-
COCOAPODS: 1.9.3
16+
COCOAPODS: 1.10.0

ios/QueueIt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ typedef enum {
1414

1515
extern NSString * const EnqueueResultState_toString[];
1616

17-
@interface QueueIt : RCTEventEmitter <RCTBridgeModule, QueuePassedDelegate, QueueViewWillOpenDelegate, QueueDisabledDelegate, QueueITUnavailableDelegate, QueueUserExitedDelegate>
17+
@interface QueueIt : RCTEventEmitter <RCTBridgeModule, QueuePassedDelegate, QueueViewWillOpenDelegate, QueueDisabledDelegate, QueueITUnavailableDelegate, QueueUserExitedDelegate, QueueNavigationActionDelegate, QueueViewClosedDelegate>
1818

1919
@end

ios/QueueIt.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ - (dispatch_queue_t)methodQueue
4343
self.engine.queueDisabledDelegate = self; // Invoked to notify that queue is disabled
4444
self.engine.queueITUnavailableDelegate = self; // Invoked in case QueueIT is unavailable (500 errors)
4545
self.engine.queueUserExitedDelegate = self; // Invoked when user chooses to leave the queue
46+
self.engine.queueNavigationActionDelegate = self;
47+
self.engine.queueViewClosedDelegate = self;
4648
self.resolve = resolve;
4749
self.reject = reject;
4850

@@ -99,4 +101,13 @@ - (void)notifyUserExited {
99101
[self sendEventWithName: @"userExited" body:@{}];
100102
}
101103

104+
105+
- (BOOL)notifyNavigation:(NSURL *)url {
106+
return NO;
107+
}
108+
109+
- (void)notifyViewClosed {
110+
NSLog(@"View was closed..");
111+
}
112+
102113
@end

0 commit comments

Comments
 (0)