Skip to content

Commit

Permalink
Merge branch 'staging' into stop_views_consent
Browse files Browse the repository at this point in the history
arifBurakDemiray authored Oct 21, 2024
2 parents 37ab7cb + 9aacfae commit 3c96d6d
Showing 10 changed files with 103 additions and 106 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## XX.XX.XX
* ! Minor breaking change ! All active views will now automatically stop when consent for "views" is revoked.

* The Android SDK now supports Android 15 (API level 35)
* The views will be stopped and restarted now while going to the background or foreground instead of resuming and pausing.

* Added new functions to ease the presenting the feedback widgets. Functions present the first matching feedback widget from the list.
* presentNPS(Context)
* presentNPS(Context, String)
4 changes: 2 additions & 2 deletions app-benchmark/build.gradle
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ apply plugin: 'kotlin-android'

android {
namespace 'ly.count.android.benchmark'
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "ly.count.android.benchmark"
minSdk 21
targetSdk 34
targetSdk 35
versionCode 1
versionName "1.0"

4 changes: 2 additions & 2 deletions app-kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@ plugins {
}

android {
compileSdkVersion 33
compileSdkVersion 35

defaultConfig {
applicationId "ly.count.android.demo.kotlin"
minSdk 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"

10 changes: 5 additions & 5 deletions app-kotlin/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ly.count.android.demo.kotlin">
package="ly.count.android.demo.kotlin">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:name=".App"
@@ -15,9 +15,9 @@
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
132 changes: 64 additions & 68 deletions app-native/build.gradle
Original file line number Diff line number Diff line change
@@ -4,87 +4,83 @@ apply plugin: 'com.android.application'
// apply plugin: ly.count.android.plugins.UploadSymbolsPlugin

android {
compileSdkVersion 31

defaultConfig {
applicationId "ly.count.android.demo.crash"
minSdk 21
targetSdkVersion 34
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"


}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

// You can add Countly plugin tasks to release task like this
/*
afterEvaluate {
assembleRelease.finalizedBy(uploadJavaSymbols)
compileSdkVersion 35

defaultConfig {
applicationId "ly.count.android.demo.crash"
minSdk 21
targetSdkVersion 35
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
*/

externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
}
}
ndkVersion '21.0.6113669'

// Use this if you are working with sdk-native subproject instead of maven library.
// Change also the dependency config below.
/*
sourceSets {
main {
// let gradle pack the shared library into apk
jniLibs.srcDirs = ['../sdk-native/libs']
}
}

// You can add Countly plugin tasks to release task like this
/*
afterEvaluate {
assembleRelease.finalizedBy(uploadJavaSymbols)
}
*/

externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
}
*/

}
ndkVersion '21.0.6113669'

// Use this if you are working with sdk-native subproject instead of maven library.
// Change also the dependency config below.
/*
sourceSets {
main {
// let gradle pack the shared library into apk
jniLibs.srcDirs = ['../sdk-native/libs']
}
}
*/
}

repositories {
// needed for using sdk-native from countly maven repo
mavenCentral()
// needed for using sdk-native from countly maven repo
mavenCentral()
}

// sdk and sdk-native are pulled from submodules of the project.
// If you are running app independently, you may pull their latest version from our maven repo using the commented lines.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation project(':sdk')
//implementation 'ly.count.android:sdk:21.11.0'
implementation project(':sdk-native')
//implementation 'ly.count.android:sdk-native:21.11.0'

// testImplementation 'junit:junit:4.13.2'
// androidTestImplementation 'androidx.test:runner:1.3.0'
// androidTestImplementation 'androidx.test:core:1.3.0'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation project(':sdk')
//implementation 'ly.count.android:sdk:21.11.0'
implementation project(':sdk-native')
//implementation 'ly.count.android:sdk-native:21.11.0'

// testImplementation 'junit:junit:4.13.2'
// androidTestImplementation 'androidx.test:runner:1.3.0'
// androidTestImplementation 'androidx.test:core:1.3.0'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.14.1'
// classpath files('../upload-plugin/build/libs/upload-plugin.jar')
//classpath group: 'ly.count.android', 'name': 'sdk-plugin', 'version': '20.11.8'

}
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.14.1'
// classpath files('../upload-plugin/build/libs/upload-plugin.jar')
//classpath group: 'ly.count.android', 'name': 'sdk-plugin', 'version': '20.11.8'
}
}

// the following closure is used to configure Countly plugin tasks
34 changes: 17 additions & 17 deletions app-native/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ly.count.android.demo.crash">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:name=".App"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:name=".App"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
</manifest>
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ repositories {
}

android {
compileSdk 34
compileSdk 35
namespace 'ly.count.android.demo'

signingConfigs {
@@ -46,7 +46,7 @@ android {
defaultConfig {
applicationId "ly.count.android.demo"
minSdk 21
targetSdk 34
targetSdk 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
8 changes: 3 additions & 5 deletions app/src/main/java/ly/count/android/demo/App.java
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
import android.os.StrictMode;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.messaging.FirebaseMessaging;
@@ -296,10 +297,7 @@ public void onReceive(Context context, Intent intent) {
};
IntentFilter filter = new IntentFilter();
filter.addAction(CountlyPush.SECURE_NOTIFICATION_BROADCAST);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(messageReceiver, filter, getPackageName() + COUNTLY_BROADCAST_PERMISSION_POSTFIX, null, Context.RECEIVER_VISIBLE_TO_INSTANT_APPS | Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(messageReceiver, filter, getPackageName() + COUNTLY_BROADCAST_PERMISSION_POSTFIX, null);
}

ContextCompat.registerReceiver(getApplicationContext(), messageReceiver, filter, getPackageName() + COUNTLY_BROADCAST_PERMISSION_POSTFIX, null, ContextCompat.RECEIVER_NOT_EXPORTED);
}
}
4 changes: 2 additions & 2 deletions sdk-native/build.gradle
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@ buildscript {
}

android {
compileSdkVersion 33
compileSdkVersion 35

defaultConfig {
minSdk 21
targetSdkVersion 34
targetSdkVersion 35

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
6 changes: 3 additions & 3 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -12,12 +12,12 @@ buildscript {
}

android {
compileSdk 34
buildToolsVersion "34.0.0"
compileSdk 35
buildToolsVersion "35.0.0"

defaultConfig {
minSdk 21
targetSdk 34
targetSdk 35

testInstrumentationRunner 'ly.count.android.sdk.test.InstrumentationTestRunner'
testHandleProfiling true

0 comments on commit 3c96d6d

Please sign in to comment.