Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions android/src/main/java/io/gleap/gleap_sdk/GleapSdkPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
internalActivationMethods.add(GleapActivationMethod.SCREENSHOT);
}
}
// An empty list turns the activation methods off. The native SDK reads an empty
// array as "use the dashboard settings", NONE alone as "none".
if (internalActivationMethods.isEmpty()) {
internalActivationMethods.add(GleapActivationMethod.NONE);
}
Gleap.getInstance().setActivationMethods(internalActivationMethods.toArray(new GleapActivationMethod[internalActivationMethods.size()]));
} catch (Exception ex) {
System.out.println(ex);
Expand Down
5 changes: 5 additions & 0 deletions ios/gleap_sdk/Sources/gleap_sdk/GleapSdkPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ - (void)handleMethodCall:(FlutterMethodCall *)call
[internalActivationMethods addObject:@(SCREENSHOT)];
}
}
// An empty list turns the activation methods off. The native SDK reads an empty array as
// "use the dashboard settings", NONE alone as "none".
if (internalActivationMethods.count == 0) {
[internalActivationMethods addObject:@(NONE)];
}

[Gleap setActivationMethods:internalActivationMethods];
result(nil);
Expand Down
5 changes: 3 additions & 2 deletions lib/gleap_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,12 @@ class Gleap {

/// ### setActivationMethods
///
/// Overwrite the activation methods on the fly.
/// Overwrite the activation methods on the fly. They replace the dashboard
/// settings; an empty list turns shake and screenshot off.
///
/// **Params**
///
/// [activationMethods] An array of activation methods.
/// [activationMethods] An array of activation methods (empty for none).
///
/// **Available Platforms**
///
Expand Down
Loading