Skip to content

Patches for Github Issues #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: release/1.1.7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'

android {
namespace 'com.segment.analytics'
compileSdkVersion 31
compileSdkVersion 35 //Patch for for Github issue #147

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -44,4 +44,4 @@ android {
defaultConfig {
minSdkVersion 16
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,17 @@ class AnalyticsPlugin : FlutterPlugin, NativeContextApi, EventChannel.StreamHand
NativeContext(
app = NativeContextApp(
build = appBuild,
name = packageInfo.applicationInfo.loadLabel(
packageManager
).toString(),

/* Retrieves the application name from the package info, using the application's label
(i.e., the app name displayed on the device). If the application name cannot be fetched
(e.g., due to a missing label or other issues), the fallback value "Unknown" will be used
to ensure the app doesn't break due to a null value.

Patch for for Github issue #147 - Replaced following line:
name = packageInfo.applicationInfo.loadLabel(packageManager).toString(), with the line below
*/
name = packageInfo.applicationInfo?.loadLabel(packageManager)?.toString() ?: "Unknown",

namespace = packageInfo.packageName,
version = packageInfo.versionName
),
Expand Down
3 changes: 2 additions & 1 deletion packages/core/lib/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -583,5 +583,6 @@ Configuration setFlushPolicies(
trackApplicationLifecycleEvents: a.trackApplicationLifecycleEvents,
trackDeeplinks: a.trackDeeplinks,
storageJson: a.storageJson,
token: a.token);
token: a.token,
collectDeviceId: a.collectDeviceId); //Patch for for Github issue #144
}