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

[BUG] initialize() return false on Android TV, same problem not found on android phone #50

Open
butterken opened this issue Dec 19, 2021 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@butterken
Copy link

butterken commented Dec 19, 2021

I am now developing application for android TV that needs background service. The following command return false when i run on android TV. The same problem doesn't exist on android phone.

final androidConfig = FlutterBackgroundAndroidConfig(
      notificationTitle: "Background Device Health Check",
      notificationText: "Notification for keeping the app running in the background",
      notificationImportance: AndroidNotificationImportance.Default,
      notificationIcon: AndroidResource(name: 'background_icon', defType: 'drawable'),
);
bool success = await FlutterBackground.initialize(androidConfig: androidConfig); // <- this one return false

There was no error show in console. I tested it on android studio, with the build-in emulator. I have tried android 8.1 and android 10 but both fail. I have go thought the forum for a solution, and i found that the notification config on android tv may not be the same as the one in android phone. Any solution for this issue?

image

@butterken butterken added the bug Something isn't working label Dec 19, 2021
@butterken butterken changed the title [BUG] initialize() return false on Android TV, no problem found on android phone [BUG] initialize() return false on Android TV, same problem not found on android phone Dec 19, 2021
@JulianAssmann
Copy link
Owner

Unfortunately, I currently have no Android TV available for testing and therefore also no experience with developing for it. So I need help to solve this problem.

@JulianAssmann JulianAssmann added the help wanted Extra attention is needed label Dec 20, 2021
@butterken
Copy link
Author

I dont have Android TV either. I just use the buildin emulator of android studio to test. The result is that on phone emulator run smoothly but failed on TV emulator. After checking the console carefully, i find that FlutterBackground.initialize return false and thus, the program stop.

Unfortunately, I currently have no Android TV available for testing and therefore also no experience with developing for it. So I need help to solve this problem.

@JulianAssmann
Copy link
Owner

I'm currently not able to run an Android TV emulator, presumably because I'm on an Apple M1 Macbook. But if the plugin works under Android for Phones, there is probably some configuration error in some Manifest file.

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

No branches or pull requests

2 participants