Skip to content
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

notificationChannelName defaults to TSLocationManager instead of app name #22

Closed
artob opened this issue Jan 29, 2019 · 9 comments
Closed
Labels
bug Something isn't working stale

Comments

@artob
Copy link

artob commented Jan 29, 2019

I've discovered a minor bug and/or documentation discrepancy. The notificationChannelName property is documented as:

Defaults to your application's name from AndroidManifest.

In actuality, though, leaving this property unset makes it default to TSLocationManager, which I assume is an internal class name from the Android plugin. (See the screenshot further below.)

Setting an explicit value for the property works fine, but forgetting to set a value will produce the aforementioned surprise.

Your Environment

  • Plugin version: 0.2.4
  • Platform: Android
  • OS version: 8.0
  • Device manufacturer / model: Samsung
  • Flutter info (flutter doctor): Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.3 18D42, locale en-US)
  • Plugin config: see below

Expected Behavior

The notification channel name should default to the app name, as documented.

Actual Behavior

The notification channel name defaults to "TSLocationManager".

Steps to Reproduce

foregroundService: true,
//notificationChannelName: null, // no explicit channel name configured
notificationTitle: "App name here",
notificationText: "Sharing your location with your team.",
notificationPriority: bg.Config.NOTIFICATION_PRIORITY_HIGH,

Context

N/A

Debug logs

N/A

screenshot_20190129-145353_settings

@christocracy
Copy link
Member

Yes, I’m aware. There’s something about a Flutter app that prevents the lib from reading the app name from the Manifest.xml so I had to default it to TSLocationManager.

The React Native / Cordova / NativeScript versions do not have this problem.

@artob
Copy link
Author

artob commented Jan 29, 2019

Thanks for clarifying, @christocracy. Not a big prob, but perhaps might be good for the docs to mention it.

@christocracy
Copy link
Member

It was one of the first bumps I ran into while porting the Flutter version back in September. I quickly leapt over it in favor of implementing the core functionality.

It will be revisited soon.

@debkanchan
Copy link

I have a more major version of the issue.

the Gradle build directly throws

Manifest merger failed : Attribute application@label value=(MyApp) from AndroidManifest.xml:14:9-32
	is also present at [:flutter_background_geolocation] AndroidManifest.xml:7:18-50 value=(@string/app_name).
	Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:12:5-37:19 to override.

This is for both 0.3.4 and 1.0.0-beta.4

@christocracy
Copy link
Member

Read carefully the Android setup docs.

@christocracy
Copy link
Member

Specifically, this

@debkanchan
Copy link

Thank you. And sorry for my negligence.

@stale
Copy link

stale bot commented Jun 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

@stale stale bot added the stale label Jun 4, 2019
@stale
Copy link

stale bot commented Jun 11, 2019

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants