Skip to content

Commit 0e065c3

Browse files
committed
Android: Update API. Update AppCenter SDK to v2.5.1
add "Crashes.hasReceivedMemoryWarningInLastSession"
1 parent 0367a50 commit 0e065c3

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.library'
22

3-
def appCenterSdkVersion = '2.2.0'
3+
def appCenterSdkVersion = '2.5.1'
44
def tiSDKVersion = getRootProject().ext.tiSDKVersion
55

66
android {

android/app/src/main/java/ru/netris/mobile/appcenter/analytics/TiAppCenterAnalyticsModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import static com.microsoft.appcenter.analytics.Analytics.LOG_TAG;
2323

24-
@Kroll.module(name = "Analytics")
24+
@Kroll.module(parentModule = TiAppcenterModule.class, name = "Analytics")
2525
public class TiAppCenterAnalyticsModule extends KrollModule
2626
{
2727
private static TiAppCenterAnalyticsModule instance;

android/app/src/main/java/ru/netris/mobile/appcenter/crashes/TiAppCenterCrashesModule.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import ru.netris.mobile.appcenter.TiAppcenterModule;
2323
import ru.netris.mobile.appcenter.utils.TiAppCenterUtils;
2424

25-
@Kroll.module(name = "Crashes")
25+
@Kroll.module(parentModule = TiAppcenterModule.class, name = "Crashes")
2626
public class TiAppCenterCrashesModule extends KrollModule
2727
{
2828

@@ -97,6 +97,18 @@ public void accept(Boolean hasCrashed)
9797
});
9898
}
9999

100+
@Kroll.method
101+
public void hasReceivedMemoryWarningInLastSession(final KrollFunction callback) {
102+
Crashes.hasReceivedMemoryWarningInLastSession().thenAccept(new AppCenterConsumer<Boolean>() {
103+
104+
@Override
105+
public void accept(Boolean hasWarning) {
106+
Object[] args = new Object[] { hasWarning };
107+
callback.call(getKrollObject(), args);
108+
}
109+
});
110+
}
111+
100112
@Kroll.method
101113
public void setEnabled(boolean enabled, final KrollFunction callback)
102114
{

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import groovy.json.JsonSlurper
22

33
ext {
4-
tiSDKName = "7.4.1.GA"
5-
tiSDKVersion = "7.4.1-ga"
4+
tiSDKName = "8.3.0.GA"
5+
tiSDKVersion = "8.3.0.GA"
66
}
77

88
def getSdkPath = { ->

android/manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 1.0.1
5+
version: 1.1.0
66
apiversion: 4
77
architectures: arm64-v8a armeabi-v7a x86
88
description: Visual Studio App Center SDK for Axway Titanium

0 commit comments

Comments
 (0)