Skip to content

Commit 0872e75

Browse files
authored
Merge pull request #1460 from microsoft/develop
Version 3.3.1
2 parents 31d8ea9 + 0caf780 commit 0872e75

File tree

10 files changed

+66
-9
lines changed

10 files changed

+66
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ proguard/
2929
# Log Files
3030
*.log
3131

32+
# NDK temp files
33+
.cxx/
34+
3235
# Android Studio Navigation editor temp files
3336
.navigation/
3437

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
# App Center SDK for Android Change Log
22

3+
## Version 3.3.1
4+
5+
### App Center Crashes
6+
7+
* **[Fix]** Fix sending attachments with a `null` text value.
8+
9+
___
10+
311
## Version 3.3.0
412

513
### App Center
614

715
* **[Fix]** Fix an `IncorrectContextUseViolation` warning when calculating screen size on Android 11.
816
* **[Fix]** All SQL commands used in SDK are presented as raw strings to avoid any possible static analyzer's SQL injection false alarms.
17+
18+
### App Center Distribute
19+
920
* **[Fix]** Fix Distribute can't get updates for Realme devices which use Realme UI.
1021

1122
### App Center Distribute Play
1223

13-
App Center Distribute Play is a package with stubbed APIs for Distribute module to avoid Google Play flagging the application for malicious behavior. It must be used only for build variants which are going to be published on Google Play. See the [public documentation](https://docs.microsoft.com/en-us/appcenter/sdk/distribute/android) for more details about this change.
24+
App Center Distribute Play is a package with stubbed APIs for Distribute module to avoid Google Play flagging the application for malicious behavior. It must be used only for build variants which are going to be published on Google Play. See the [public documentation](https://docs.microsoft.com/en-us/appcenter/sdk/distribute/android#remove-in-app-updates-for-google-play-builds) for more details about this change.
1425

1526
___
1627

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ The App Center SDK uses a modular architecture so you can use any or all of the
1414

1515
2. **App Center Crashes**: App Center Crashes will automatically generate a crash log every time your app crashes. The log is first written to the device's storage and when the user starts the app again, the crash report will be sent to App Center. Collecting crashes works for both beta and live apps, i.e. those submitted to the App Store. Crash logs contain valuable information for you to help fix the crash.
1616

17-
3. **App Center Distribute**: App Center Distribute will let your users install a new version of the app when you distribute it via the App Center. With a new version of the app available, the SDK will present an update dialog to the users to either download or postpone the new version. Once they choose to update, the SDK will start to update your application. This feature will NOT work if your app is deployed to the app store.
17+
3. **App Center Distribute**: App Center Distribute will let your users install a new version of the app when you distribute it via the App Center. With a new version of the app available, the SDK will present an update dialog to the users to either download or postpone the new version. Once they choose to update, the SDK will start to update your application.
1818

19-
4. **App Center Push**: App Center Push enables you to send push notifications to users of your app from the App Center portal. To do that, the App Center SDK and portal integrate with [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/). You can also segment your user base based on a set of properties and send them targeted notifications.
19+
> **Google Play considers the in-app update code as malicious behavior even if it isn’t used at runtime. Please use App Center Distribute Play instead before submitting your app to Google Play. Failure to not remove the in-app update code can lead to noncompliance and removal of the app from Google Play.**
20+
> See [Remove in-app updates for Google Play builds](https://docs.microsoft.com/en-us/appcenter/sdk/distribute/android#remove-in-app-updates-for-google-play-builds) documentation for details.
21+
22+
4. **App Center Distribute Play**: App Center Distribute Play is stubbing the Distribute package's APIs to avoid Google Play rejecting the application for malicious behavior. It must be used only for build variants which are going to be published on Google Play.
23+
24+
5. **App Center Push**: App Center Push enables you to send push notifications to users of your app from the App Center portal. To do that, the App Center SDK and portal integrate with [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/). You can also segment your user base based on a set of properties and send them targeted notifications.
2025

2126
## 1. Get started
27+
2228
It is super easy to use App Center. Have a look at our [get started documentation](https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/android) and onboard your app within minutes. Our [detailed documentation](https://docs.microsoft.com/en-us/appcenter/sdk/) is available as well.
2329

2430
## 2. Contributing
@@ -40,4 +46,5 @@ You must sign a [Contributor License Agreement](https://cla.microsoft.com/) befo
4046
App Center SDK support is provided directly within the App Center portal. Any time you need help, just log in to [App Center](https://appcenter.ms), then click the blue chat button in the lower-right corner of any page and our dedicated support team will respond to your questions and feedback. For additional information, see the [App Center Help Center](https://intercom.help/appcenter/getting-started/welcome-to-app-center-support).
4147

4248
### 3.2 Twitter
49+
4350
We're on Twitter as [@vsappcenter](https://www.twitter.com/vsappcenter).

apps/appcenter-post-clone.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/usr/bin/env bash
22
echo "Executing post clone script in `pwd`"
33
echo "dimension.dependency=$DIMENSION_DEPENDENCY" >> $APPCENTER_SOURCE_DIRECTORY/local.properties
4+
../scripts/set-ndk-version.sh

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
}
1919

2020
dependencies {
21-
classpath 'com.android.tools.build:gradle:3.3.2'
21+
classpath 'com.android.tools.build:gradle:4.0.1'
2222
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
2323
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
2424

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ distributionBase=GRADLE_USER_HOME
77
distributionPath=wrapper/dists
88
zipStoreBase=GRADLE_USER_HOME
99
zipStorePath=wrapper/dists
10-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
10+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

scripts/set-ndk-version.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License.
5+
6+
PROJECT_DIR="$(dirname "$0")/.."
7+
PROPERTY_FILE="$ANDROID_HOME/ndk-bundle/source.properties"
8+
9+
echo "Reading ndk version from source.properties file..."
10+
VERSION=$(cat $PROPERTY_FILE | sed 's/ //g' | grep "Pkg.Revision" | cut -d'=' -f2)
11+
echo $VERSION
12+
GRADLE_FILE="$PROJECT_DIR/apps/sasquatch/build.gradle"
13+
14+
if [ -z $VERSION ]; then
15+
echo "No NDK found in the default location. Proceeding..."
16+
else
17+
18+
# Insert ndkVersion = 'x.x.x' in the android section.
19+
NDK_VERSION_LINE="ndkVersion = '$VERSION'"
20+
echo "$(sed "s/android {/android {\\`echo -e '\n\r '`$NDK_VERSION_LINE/g" "$GRADLE_FILE")" > $GRADLE_FILE
21+
fi

sdk/appcenter-crashes/src/main/java/com/microsoft/appcenter/crashes/ingestion/models/ErrorAttachmentLog.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ public class ErrorAttachmentLog extends AbstractLog {
7979
* @return ErrorAttachmentLog built attachment.
8080
*/
8181
public static ErrorAttachmentLog attachmentWithText(String text, String fileName) {
82+
if (text == null) {
83+
text = "";
84+
}
8285
return attachmentWithBinary(text.getBytes(CHARSET), fileName, CONTENT_TYPE_TEXT_PLAIN);
8386
}
8487

sdk/appcenter-crashes/src/test/java/com/microsoft/appcenter/crashes/ingestion/models/ErrorAttachmentLogTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ public void attachmentWithText() {
3030
assertEquals(ErrorAttachmentLog.CONTENT_TYPE_TEXT_PLAIN, attachment.getContentType());
3131
}
3232

33+
@Test
34+
public void attachmentWithNullText() {
35+
String text = null;
36+
String fileName = "1";
37+
ErrorAttachmentLog attachment = ErrorAttachmentLog.attachmentWithText(text, fileName);
38+
assertNotNull(attachment);
39+
assertEquals("", new String(attachment.getData(), CHARSET));
40+
assertEquals(fileName, attachment.getFileName());
41+
assertEquals(ErrorAttachmentLog.CONTENT_TYPE_TEXT_PLAIN, attachment.getContentType());
42+
}
43+
3344
@Test
3445
public void attachmentWithBinary() {
3546
byte[] data = "Hello Binary!".getBytes();

versions.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// Version constants
77

88
ext {
9-
versionCode = 58
10-
versionName = '3.3.0'
9+
versionCode = 59
10+
versionName = '3.3.1'
1111
minSdkVersion = 16
12-
targetSdkVersion = 29
13-
compileSdkVersion = 29
12+
targetSdkVersion = 30
13+
compileSdkVersion = 30
1414
supportLibVersion = '28.0.0'
1515
}

0 commit comments

Comments
 (0)