Skip to content

Commit

Permalink
Merge pull request #437 from Countly/staging
Browse files Browse the repository at this point in the history
Staging 7.7
  • Loading branch information
turtledreams authored Dec 4, 2024
2 parents b5d60e4 + 679b97e commit 924fbbd
Show file tree
Hide file tree
Showing 20 changed files with 364 additions and 192 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 24.7.7
* Mitigated an issue where an automatically closed autostopped view's duration could have increased when opening new views
* Mitigated an issue where, on Android 35 and above, the navigation bar was overlapping with the content display.

## 24.7.6
* Added support for localization of content blocks.

* Mitigated an issue where visibility could have been wrongly assigned if a view was closed while going to background. (Experimental!)
* Fixed a bug where passing the global content callback was not possible.
* Mitigated an issue related to content actions navigation.
* Mitigated an issue that parsing internal content event segmentation.

## 24.7.5
* ! Minor breaking change ! All active views will now automatically stop when consent for "views" is revoked.

Expand Down
5 changes: 2 additions & 3 deletions app-kotlin/src/main/java/ly/count/android/demo/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ class App : Application() {
.setDeviceId(
"myDeviceId"
)
.enableCrashReporting()
.setRecordAllThreadsWithCrash()
.setLoggingEnabled(true)
.setViewTracking(false)

countlyConfig.crashes.enableCrashReporting().enableRecordAllThreadsWithCrash()

Countly.sharedInstance().init(countlyConfig)
}
Expand Down
6 changes: 4 additions & 2 deletions app-native/src/main/java/ly/count/android/demo/crash/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ public class App extends Application {

CountlyConfig config = new CountlyConfig(this, COUNTLY_APP_KEY, COUNTLY_SERVER_URL).setDeviceId("4432")
.setLoggingEnabled(true)
.enableCrashReporting()
.setViewTracking(true)
.enableAutomaticViewTracking()
.setRequiresConsent(false);

config.crashes.enableCrashReporting();

Countly.sharedInstance().init(config);

CountlyNative.initNative(getApplicationContext());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import ly.count.android.sdk.Countly;

Expand Down Expand Up @@ -40,7 +41,6 @@ public void onClickStartView2(View v) {
Toast.makeText(getApplicationContext(), "Clicked startView 2", Toast.LENGTH_SHORT).show();
}


public void onClickPauseViewWithID(View v) {
Countly.sharedInstance().views().pauseViewWithID(viewID);
Toast.makeText(getApplicationContext(), "Clicked pauseViewWithID 1", Toast.LENGTH_SHORT).show();
Expand Down Expand Up @@ -99,9 +99,8 @@ public void onStop() {
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Countly.sharedInstance().onConfigurationChanged(newConfig);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import java.util.List;
Expand All @@ -23,6 +24,27 @@ public class ActivityExampleFeedback extends AppCompatActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_example_feedback);

final Button presentSurvey = findViewById(R.id.presentSurvey);
presentSurvey.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Countly.sharedInstance().feedback().presentSurvey(ActivityExampleFeedback.this);
}
});

final Button presentRating = findViewById(R.id.presentRating);
presentRating.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Countly.sharedInstance().feedback().presentRating(ActivityExampleFeedback.this);
}
});

final Button presentNPS = findViewById(R.id.presentNPS);
presentNPS.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Countly.sharedInstance().feedback().presentNPS(ActivityExampleFeedback.this);
}
});
}

public void onClickViewOther02(View v) {
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/java/ly/count/android/demo/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
import java.util.concurrent.ConcurrentHashMap;
import ly.count.android.sdk.Countly;
import ly.count.android.sdk.CountlyConfig;
import ly.count.android.sdk.CrashFilterCallback;
import ly.count.android.sdk.CrashData;
import ly.count.android.sdk.GlobalCrashFilterCallback;
import ly.count.android.sdk.ModuleLog;
import ly.count.android.sdk.messaging.CountlyConfigPush;
import ly.count.android.sdk.messaging.CountlyPush;
Expand Down Expand Up @@ -171,17 +172,6 @@ public void onCreate() {
}
}
})

.enableCrashReporting()
.setRecordAllThreadsWithCrash()
.setCustomCrashSegment(customCrashSegmentation)
.setCrashFilterCallback(new CrashFilterCallback() {
@Override
public boolean filterCrash(String crash) {
return crash.contains("crash");
}
})

.enableAutomaticViewTracking()
// uncomment the line below to enable auto enrolling the user to AB experiments when downloading RC data
//.enrollABOnRCDownload()
Expand Down Expand Up @@ -234,6 +224,16 @@ public boolean filterCrash(String crash) {

.setUserProperties(customUserProperties);

config.crashes
.enableCrashReporting()
.enableRecordAllThreadsWithCrash()
.setCustomCrashSegmentation(customCrashSegmentation)
.setGlobalCrashFilterCallback(new GlobalCrashFilterCallback() {
@Override public boolean filterCrash(CrashData crash) {
return crash.getStackTrace().contains("secret");
}
});

config.apm.enableAppStartTimeTracking()
.enableForegroundBackgroundTracking()
.setAppStartTimestampOverride(applicationStartTimestamp);
Expand Down
188 changes: 106 additions & 82 deletions app/src/main/res/layout/activity_example_feedback.xml
Original file line number Diff line number Diff line change
@@ -1,100 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
>

<Button
android:id="@+id/button42"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickViewOther02"
android:text="@string/ask_for_star_rating"
android:layout_height="match_parent"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
>
<Button
android:id="@+id/button42"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickViewOther02"
android:text="@string/ask_for_star_rating"
/>

<Button
android:id="@+id/button46"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickViewOther07"
android:text="@string/ask_for_rating_widget"
<Button
android:id="@+id/button46"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickViewOther07"
android:text="@string/ask_for_rating_widget"
/>

<Button
android:id="@+id/button71"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickSendManualRating"
android:text="Send Manual Rating"
<Button
android:id="@+id/button71"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickSendManualRating"
android:text="Send Manual Rating"
/>
<Button
android:id="@+id/button63"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowSurvey"
android:text="Show survey"
<Button
android:id="@+id/presentNPS"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="Present nps"/>
<Button
android:id="@+id/presentSurvey"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="present survey"/>
<Button
android:id="@+id/presentRating"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="present rating"/>
<Button
android:id="@+id/btnAvailableWidgets"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowAvailableFeedbackWidgets"
android:text="Available feedback widgets"
/>
<Button
android:id="@+id/button69"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowNPS"
android:text="Show NPS"
<Button
android:id="@+id/button61"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickReportSurveyManually"
android:text="Report Survey Manually"
/>
<Button
android:id="@+id/button37"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowRating"
android:text="show rating"
<Button
android:id="@+id/button38"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickReportRatingManually"
android:text="Report Rating Manually"
/>
<Button
android:id="@+id/btnAvailableWidgets"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowAvailableFeedbackWidgets"
android:text="Available feedback widgets"
<Button
android:id="@+id/button62"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickReportNPSManually"
android:text="Report NPS manually"
/>
<Button
android:id="@+id/button61"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickReportSurveyManually"
android:text="Report Survey Manually"
<Button
android:id="@+id/button63"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowSurvey"
android:text="Show survey"
/>
<Button
android:id="@+id/button38"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickReportRatingManually"
android:text="Report Rating Manually"
<Button
android:id="@+id/button69"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowNPS"
android:text="Show NPS"
/>
<Button
android:id="@+id/button62"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickReportNPSManually"
android:text="Report NPS manually"
<Button
android:id="@+id/button37"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickShowRating"
android:text="show rating"
/>
<Button
android:id="@+id/button34"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickRetrieveSurveyDataManually"
android:text="Retrieve survey data manually"
<Button
android:id="@+id/button34"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickRetrieveSurveyDataManually"
android:text="Retrieve survey data manually"
/>
<Button
android:id="@+id/button35"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickRetrieveNPSDataManually"
android:text="Retrieve nps data manually"
<Button
android:id="@+id/button35"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickRetrieveNPSDataManually"
android:text="Retrieve nps data manually"
/>

</LinearLayout>
</ScrollView>
</LinearLayout>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
# RELEASE FIELD SECTION
VERSION_NAME=24.7.5
VERSION_NAME=24.7.7
GROUP=ly.count.android
POM_URL=https://github.com/Countly/countly-sdk-android
POM_SCM_URL=https://github.com/Countly/countly-sdk-android
Expand Down
Loading

0 comments on commit 924fbbd

Please sign in to comment.