From 7b5fbb16529aa2322ded4f3c9fac4043342de6a7 Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Wed, 4 Dec 2024 13:23:50 +0100 Subject: [PATCH] feat(android): new property Ti.Android.sdkVersion --- .../src/java/ti/modules/titanium/android/AndroidModule.java | 6 ++++++ apidoc/Titanium/Android/Android.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java b/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java index fdc5c89431a..00ed0efc79a 100644 --- a/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java +++ b/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java @@ -794,6 +794,12 @@ public ServiceProxy createService(IntentProxy intentProxy) return new ServiceProxy(intentProxy); } + @Kroll.getProperty + public int getSdkVersion() + { + return android.os.Build.VERSION.SDK_INT; + } + @Override public String getApiName() { diff --git a/apidoc/Titanium/Android/Android.yml b/apidoc/Titanium/Android/Android.yml index b9d02f8c10e..c64b2add2bc 100644 --- a/apidoc/Titanium/Android/Android.yml +++ b/apidoc/Titanium/Android/Android.yml @@ -2566,6 +2566,12 @@ properties: permission: read-only since: "8.0.0" + - name: sdkVersion + summary: Android SDK version number (e.g. returns 35 for Android 15). + type: Number + permission: read-only + since: "12.7.0" + --- name: ServiceIntentOptions summary: Options passed to .