Skip to content

Commit e3bff7a

Browse files
authored
Provide support for API 16+ (#37)
But don't change `minSDKVersion` yet. We need to have internal discussion about the impacts to releases and client-side unwinding support.
1 parent 66f22b3 commit e3bff7a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ catch (e: Exception) {
7272
* Supports Breadcrumbs.
7373

7474
# Supported SDKs <a name="supported-sdks"></a>
75-
* Minimum SDK version 21 (Android 5.0)
75+
* Minimum SDK version 16 (Android 4.1.x)
7676
* Target SDK version 30 (Android 11.0)
7777
* Minimum NDK version 16b
7878
* Maximum NDK version 22
@@ -561,6 +561,8 @@ database.setupNativeIntegration(backtraceClient, credentials, true);
561561

562562
**NOTE:** Client side unwinding is only available in NDK level 17+ (i.e: Only with the Crashpad crash reporting backend)
563563

564+
**NOTE:** Client side unwinding is only available in SDK level 21+ (i.e: If minSDKVersion < 21, client-side unwinding will be disabled for 32-bit arm platforms)
565+
564566
### Unwinding Modes and Options
565567

566568
You can optionally specify the unwinding mode (`REMOTE_DUMPWITHOUTCRASH` is the default)

backtrace-library/src/main/cpp/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ elseif (NOT ANDROID_NDK_MAJOR)
1616
set(BACKEND "BREAKPAD_BACKEND")
1717
elseif(ANDROID_NDK_MAJOR LESS 17)
1818
set(BACKEND "BREAKPAD_BACKEND")
19+
elseif(ANDROID_NATIVE_API_LEVEL LESS 21)
20+
set(BACKEND "CRASHPAD_BACKEND")
21+
# 64 bit architectures will always have min API level 21
22+
# https://stackoverflow.com/a/56467008
23+
if (NOT ANDROID_ABI STREQUAL "armeabi-v7a")
24+
set(CLIENT_SIDE_UNWINDING TRUE)
25+
endif()
1926
else()
2027
set(BACKEND "CRASHPAD_BACKEND")
2128
set(CLIENT_SIDE_UNWINDING TRUE)
Submodule crashpad-builds updated 194 files

0 commit comments

Comments
 (0)