You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The Mobile Center SDK uses a modular architecture so you can use any or all of t
17
17
18
18
3.**Mobile Center Distribute**: Mobile Center Distribute will let your users install a new version of the app when you distribute it via the Mobile 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.
19
19
20
-
4.**Mobile Center Push**: Mobile Center Push enables you to send push notifications to users of your app from the Mobile Center portal. To do that the Mobile Center SDK and portal integrate with [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/).
20
+
4.**Mobile Center Push**: Mobile Center Push enables you to send push notifications to users of your app from the Mobile Center portal. To do that, the Mobile 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.
21
21
22
22
## 1. Get started
23
23
It is super easy to use Mobile Center. Have a look at our [get started documentation](https://docs.microsoft.com/en-us/mobile-center/sdk/getting-started/android) and onboard your app within minutes. Our [detailed documentation](https://docs.microsoft.com/en-us/mobile-center/sdk/) is available as well.
MobileCenterLog.error(Analytics.LOG_TAG, logType + " name cannot be null or empty.");
259
-
returnfalse;
279
+
returnnull;
260
280
}
261
-
if (name.length() > maxNameLength) {
262
-
MobileCenterLog.error(Analytics.LOG_TAG, String.format("%s '%s' : name length cannot be longer than %s characters.", logType, name, maxNameLength));
263
-
returnfalse;
281
+
if (name.length() > MAX_NAME_LENGTH) {
282
+
MobileCenterLog.warn(Analytics.LOG_TAG, String.format("%s '%s' : name length cannot be longer than %s characters. Name will be truncated.", logType, name, MAX_NAME_LENGTH));
for (Map.Entry<String, String> property : properties.entrySet()) {
284
-
if (result.size() >= maxPropertiesCount) {
285
-
message = String.format("%s '%s' : properties cannot contain more than %s items. Skipping other properties.", logType, logName, maxPropertiesCount);
302
+
Stringkey = property.getKey();
303
+
Stringvalue = property.getValue();
304
+
if (result.size() >= MAX_PROPERTY_COUNT) {
305
+
message = String.format("%s '%s' : properties cannot contain more than %s items. Skipping other properties.", logType, logName, MAX_PROPERTY_COUNT);
286
306
MobileCenterLog.warn(Analytics.LOG_TAG, message);
287
307
break;
288
308
}
289
-
if (property.getKey() == null || property.getKey().isEmpty()) {
309
+
if (key == null || key.isEmpty()) {
290
310
message = String.format("%s '%s' : a property key cannot be null or empty. Property will be skipped.", logType, logName);
291
311
MobileCenterLog.warn(Analytics.LOG_TAG, message);
292
312
continue;
293
313
}
294
-
if (property.getKey().length() > maxPropertyItemLength) {
295
-
message = String.format("%s '%s' : property '%s' : property key length cannot be longer than %s characters. Property '%s' will be skipped.", logType, logName, property.getKey(), maxPropertyItemLength, property.getKey());
314
+
if (value == null) {
315
+
message = String.format("%s '%s' : property '%s' : property value cannot be null. Property '%s' will be skipped.", logType, logName, key, key);
296
316
MobileCenterLog.warn(Analytics.LOG_TAG, message);
297
317
continue;
298
318
}
299
-
if (property.getValue() == null) {
300
-
message = String.format("%s '%s' : property '%s' : property value cannot be null. Property '%s' will be skipped.", logType, logName, property.getKey(), property.getKey());
319
+
if (key.length() > MAX_PROPERTY_ITEM_LENGTH) {
320
+
message = String.format("%s '%s' : property '%s' : property key length cannot be longer than %s characters. Property key will be truncated.", logType, logName, key, MAX_PROPERTY_ITEM_LENGTH);
301
321
MobileCenterLog.warn(Analytics.LOG_TAG, message);
302
-
continue;
322
+
key = key.substring(0, MAX_PROPERTY_ITEM_LENGTH);
303
323
}
304
-
if (property.getValue().length() > maxPropertyItemLength) {
305
-
message = String.format("%s '%s' : property '%s' : property value cannot be longer than %s characters. Property '%s' will be skipped.", logType, logName, property.getKey(), maxPropertyItemLength, property.getKey());
324
+
if (value.length() > MAX_PROPERTY_ITEM_LENGTH) {
325
+
message = String.format("%s '%s' : property '%s' : property value cannot be longer than %s characters. Property value will be truncated.", logType, logName, key, MAX_PROPERTY_ITEM_LENGTH);
306
326
MobileCenterLog.warn(Analytics.LOG_TAG, message);
307
-
continue;
327
+
value = value.substring(0, MAX_PROPERTY_ITEM_LENGTH);
Copy file name to clipboardExpand all lines: sdk/mobile-center-crashes/src/androidTest/java/com/microsoft/azure/mobile/crashes/WrapperSdkExceptionManagerAndroidTest.java
0 commit comments