Skip to content

Commit 9196b48

Browse files
committed
v15.0.0
1 parent 352272f commit 9196b48

File tree

6 files changed

+25
-3
lines changed

6 files changed

+25
-3
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ repositories {
5656

5757
dependencies {
5858
implementation "com.facebook.react:react-native:+"
59-
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '14.8.4'
59+
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '15.0.0'
6060

6161
if(rootProject && rootProject.ext) {
6262
if(rootProject.ext.targetSdkVersion == 30 || rootProject.ext.compileSdkVersion == 30) {

android/src/main/java/com/reactnativegleapsdk/GleapsdkModule.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,20 @@ public void run() {
13581358
}
13591359
}
13601360

1361+
@ReactMethod
1362+
public void askAI(String question, Boolean showBackButton) {
1363+
try {
1364+
getActivitySafe().runOnUiThread(
1365+
new Runnable() {
1366+
@Override
1367+
public void run() {
1368+
Gleap.getInstance().askAI(question, showBackButton);
1369+
}
1370+
});
1371+
} catch (NoUiThreadException e) {
1372+
}
1373+
}
1374+
13611375
@ReactMethod
13621376
public void searchHelpCenter(String term, Boolean showBackButton) {
13631377
try {

ios/Gleapsdk.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,13 @@ - (void)stopObserving
410410
});
411411
}
412412

413+
RCT_EXPORT_METHOD(askAI: (NSString *)question andShowBackButton:(BOOL)showBackButton)
414+
{
415+
dispatch_async(dispatch_get_main_queue(), ^{
416+
[Gleap askAI: question andShowBackButton: showBackButton];
417+
});
418+
}
419+
413420
RCT_EXPORT_METHOD(searchHelpCenter: (NSString *)term andShowBackButton:(BOOL)showBackButton)
414421
{
415422
dispatch_async(dispatch_get_main_queue(), ^{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-gleapsdk",
3-
"version": "14.8.4",
3+
"version": "15.0.0",
44
"description": "Know exactly why and how a bug happened. Get reports with screenshots, live action replays and all of the important metadata every time.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

react-native-gleapsdk.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm}"
1717

1818
s.dependency "React-Core"
19-
s.dependency "Gleap", "14.8.0"
19+
s.dependency "Gleap", "15.0.0"
2020
end

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type GleapSdkType = {
5858
openHelpCenter(showBackButton: boolean): void;
5959
openHelpCenterCollection(collectionId: string, showBackButton: boolean): void;
6060
openHelpCenterArticle(articleId: string, showBackButton: boolean): void;
61+
askAI(question: string, showBackButton: boolean): void;
6162
searchHelpCenter(term: string, showBackButton: boolean): void;
6263
close(): void;
6364
isOpened(): Promise<boolean>;

0 commit comments

Comments
 (0)