Skip to content

Commit

Permalink
Release/6.8.1 (#34)
Browse files Browse the repository at this point in the history
Releasing 6.8.1
  • Loading branch information
PoornimaApptentive authored Jul 31, 2024
1 parent f33fb8b commit 4b2d12e
Show file tree
Hide file tree
Showing 51 changed files with 292 additions and 124 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand All @@ -39,10 +39,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 2024-07-31 - v6.8.1

### Fixes
* Alchemer Survey file upload now working in in-app mode
* Alchemer Survey video sentiment is now working in in-app mode
* Alchemer Survey title will display as the survey header in in-app mode
* Cache the Message Center's input field values for the next time if not updated

### Improvements
* Upgraded SDK target to Android 14 (API level 34)
* Upgraded Gradle version to 8.0
* Prevent the SDK from crashing after the dependencies are garbage collected

# 2024-05-29 - v6.8.0
### New Features
* Advanced Customer Research support to show Alchemer long form surveys through prompts
Expand Down
4 changes: 2 additions & 2 deletions apptentive-core-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -20,6 +19,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'test.com.test'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apptentive-core-test/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.com.test" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
4 changes: 2 additions & 2 deletions apptentive-core-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -22,6 +21,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'apptentive.com.android'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apptentive-core-ui/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="apptentive.com.android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
8 changes: 5 additions & 3 deletions apptentive-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -25,6 +26,7 @@ android {
warningsAsErrors true
abortOnError true
}
namespace 'apptentive.com.android.core'
}

dependencies {
Expand All @@ -48,7 +50,7 @@ project.ext {
artifactId = 'apptentive-core'
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += [
//'-Xexplicit-api=warning', // or '-Xexplicit-api=strict'
Expand Down
3 changes: 1 addition & 2 deletions apptentive-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="apptentive.com.android.core">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Required for making Http-requests -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- Used for checking network connectivity status -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package apptentive.com.android.core

import apptentive.com.android.util.InternalUseOnly

@InternalUseOnly
open class ApptentiveException(message: String, cause: Throwable? = null) : Exception(message, cause)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ object DependencyProvider {
lookup[T::class.java] != null

inline fun <reified T> of(): T {
val provider = lookup[T::class.java] ?: throw IllegalArgumentException("Provider is not registered: ${T::class.java}")
val provider = lookup[T::class.java] ?: throw MissingProviderException("Provider is not registered: ${T::class.java}")
return provider.get() as T
}
}

class MissingProviderException(message: String, cause: Throwable? = null) : ApptentiveException(message, cause)
4 changes: 2 additions & 2 deletions apptentive-enjoyment-dialog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -20,6 +19,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'apptentive.com.android.feedback.enjoyment'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apptentive-enjoyment-dialog/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="apptentive.com.android.feedback.enjoyment" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ internal class EnjoymentDialogFragment : DialogFragment(), ApptentiveActivityInf
}
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
viewModel.dismissInteraction.observe(this) {
dismiss()
}
}

override fun onCancel(dialog: DialogInterface) {
viewModel.onCancel()
super.onCancel(dialog)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@ package apptentive.com.android.feedback.enjoyment

import androidx.lifecycle.ViewModel
import apptentive.com.android.core.DependencyProvider
import apptentive.com.android.core.LiveEvent
import apptentive.com.android.core.MissingProviderException
import apptentive.com.android.feedback.engagement.EngagementContext
import apptentive.com.android.feedback.engagement.EngagementContextFactory
import apptentive.com.android.feedback.engagement.Event
import apptentive.com.android.feedback.utils.getInteractionBackup
import apptentive.com.android.util.Log
import apptentive.com.android.util.LogTags.INTERACTIONS

internal class EnjoymentDialogViewModel : ViewModel() {
private val context = DependencyProvider.of<EngagementContextFactory>().engagementContext()
val dismissInteraction: LiveEvent<Unit> = LiveEvent()
private val context: EngagementContext? = try {
DependencyProvider.of<EngagementContextFactory>().engagementContext()
} catch (exception: MissingProviderException) {
dismissInteraction.postValue(Unit)
Log.e(INTERACTIONS, "EngagementContextFactory is not registered, cannot launch EnjoymentDialogViewModel", exception)
null
}

private val interaction: EnjoymentDialogInteraction = try {
DependencyProvider.of<EnjoymentDialogInteractionFactory>().getEnjoymentDialogInteraction()
Expand Down Expand Up @@ -42,7 +52,7 @@ internal class EnjoymentDialogViewModel : ViewModel() {
}

private fun engageCodePoint(name: String) {
context.executors.state.execute {
context?.executors?.state?.execute {
context.engage(
event = Event.internal(name, interaction.type),
interactionId = interaction.id
Expand Down
5 changes: 3 additions & 2 deletions apptentive-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ plugins {
}

android {
compileSdk 31
compileSdk 34

defaultConfig {
applicationId "com.apptentive.apptentive_example"
minSdk 21
targetSdk 31
targetSdk 34
versionCode 1
versionName "1.0"
}
namespace 'com.apptentive.apptentive_example'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apptentive-example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.apptentive.apptentive_example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- TODO Step 3: Set the MyApplication class to the android:name
parameter within the <application> tag
Expand Down
4 changes: 2 additions & 2 deletions apptentive-feedback-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -25,6 +24,7 @@ android {
buildFeatures {
buildConfig = false
}
namespace 'apptentive.com.android.feedback'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apptentive-feedback-test/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="apptentive.com.android.feedback">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
4 changes: 2 additions & 2 deletions apptentive-feedback/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand Down Expand Up @@ -34,6 +33,7 @@ android {
resources.excludes.add("META-INF/LICENSE-notice.md")
}
}
namespace 'apptentive.com.android.feedback'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apptentive-feedback/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="apptentive.com.android.feedback">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,13 @@ class ApptentiveDefaultClient(
//region Engagement

override fun engage(event: Event, customData: Map<String, Any?>?): EngagementResult {
return DependencyProvider.of<EngagementContextFactory>().engagementContext().engage(
val engagementContext = try {
DependencyProvider.of<EngagementContextFactory>().engagementContext()
} catch (e: IllegalStateException) {
return EngagementResult.Error("Apptentive SDK is not initialized. Cannot engage event: ${event.name}")
}

return engagementContext.engage(
event = event,
customData = filterCustomData(customData)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import apptentive.com.android.util.InternalUseOnly

@InternalUseOnly
object Constants {
const val SDK_VERSION = "6.8.0"
const val SDK_VERSION = "6.8.1"
const val API_VERSION = 14
const val SERVER_URL = "https://api.apptentive.com"
const val REDACTED_DATA = "<REDACTED>"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package apptentive.com.android.feedback.conversation

internal class ConversationSerializationException(message: String, cause: Throwable?) : Exception(message, cause)
internal class ConversationLoggedOutException(message: String, cause: Throwable?) : Exception(message, cause)
import apptentive.com.android.core.ApptentiveException

internal class ConversationSerializationException(message: String, cause: Throwable?) : ApptentiveException(message, cause)
internal class ConversationLoggedOutException(message: String, cause: Throwable?) : ApptentiveException(message, cause)
4 changes: 2 additions & 2 deletions apptentive-in-app-review/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -28,6 +27,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'com.example.feedback'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ class InAppReviewInteractionLauncherTest : TestCase() {
EngagementResult.InteractionShown(args.interactionId as InteractionId)
},
onSendPayload = onSendPayload ?: { payload ->
addResult(payload.toJson())
addResult(payload.toJson(false, ""))
}
)
}

class MockInAppReviewManager(val supported: Boolean, val errorMessage: String?) :
internal class MockInAppReviewManager(val supported: Boolean, val errorMessage: String?) :
InAppReviewManager {
override fun startReviewFlow(callback: InAppReviewCallback) {
if (supported) {
Expand All @@ -120,7 +120,7 @@ class MockInAppReviewManager(val supported: Boolean, val errorMessage: String?)

override fun isInAppReviewSupported(): Boolean = supported

companion object {
internal companion object {
fun successful(): InAppReviewManager = MockInAppReviewManager(true, null)

fun failed(errorMessage: String): InAppReviewManager = MockInAppReviewManager(true, errorMessage)
Expand All @@ -129,7 +129,7 @@ class MockInAppReviewManager(val supported: Boolean, val errorMessage: String?)
}
}

class MockInAppReviewManagerFactory(private val manager: InAppReviewManager) :
internal class MockInAppReviewManagerFactory(private val manager: InAppReviewManager) :
InAppReviewManagerFactory {
override fun createReviewManager(context: Context): InAppReviewManager = manager
}
3 changes: 1 addition & 2 deletions apptentive-in-app-review/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.feedback">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
3 changes: 1 addition & 2 deletions apptentive-kit-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.apptentive.apptentive_kit_android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Loading

0 comments on commit 4b2d12e

Please sign in to comment.