Skip to content
Merged

2.6.8 #345

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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/Superwall-Android/releases) on GitHub.

## 2.6.8

### Enhancements
- Adds microphone permission

### Fixes
- Fixes error when redeeming external purchases

## 2.6.7

### Enhancements
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ object DirectSuccessSerializer : KSerializer<RedemptionResult.Success> {
val jsonDecoder =
decoder as? JsonDecoder
?: throw SerializationException("Expected JSON decoder")

val json =
Json {
encodeDefaults = true
ignoreUnknownKeys = true
}
// Get the input JSON object directly
val jsonObject = jsonDecoder.decodeJsonElement().jsonObject

Expand All @@ -303,7 +307,7 @@ object DirectSuccessSerializer : KSerializer<RedemptionResult.Success> {

// Then parse it with the RedemptionInfo serializer
val redemptionInfo =
Json.decodeFromJsonElement(
json.decodeFromJsonElement(
RedemptionInfo.serializer(),
redemptionInfoJson,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum class PermissionType(
CONTACTS("contacts"),
READ_VIDEO("read_video"),
CAMERA("camera"),
MICROPHONE("microphone"),
;

/**
Expand Down Expand Up @@ -52,6 +53,7 @@ enum class PermissionType(
Manifest.permission.READ_EXTERNAL_STORAGE
}
CAMERA -> Manifest.permission.CAMERA
MICROPHONE -> Manifest.permission.RECORD_AUDIO
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ internal class UserPermissionsImpl(
PermissionType.CONTACTS,
PermissionType.READ_VIDEO,
PermissionType.CAMERA,
PermissionType.MICROPHONE,
-> checkRuntimePermission(permission)
PermissionType.BACKGROUND_LOCATION -> checkBackgroundLocationPermission()
}
Expand Down Expand Up @@ -103,6 +104,7 @@ internal class UserPermissionsImpl(
PermissionType.CONTACTS,
PermissionType.READ_VIDEO,
PermissionType.CAMERA,
PermissionType.MICROPHONE,
-> requestStandardPermission(activity, permission)
}

Expand Down
2 changes: 1 addition & 1 deletion version.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SUPERWALL_VERSION=2.6.7
SUPERWALL_VERSION=2.6.8
Loading