-
Notifications
You must be signed in to change notification settings - Fork 562
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
Notification Channel Error using >= Android 0 #194
Comments
Upgrade your version. 0.5.0-alpha.14 is too old. |
I try but then I get this issue #191 , do you have a fixed on this ? Thanks, |
Can't I make it work by removing all the NotificationBuilder in java, only need to be android and don't need the notification ? |
Yes, but it will not work reliably in background. As service will not get promoted to foreground service. |
Okay, I will try updating, and will try to fix this issue #191 ! |
upgrade your version alpha 14 is too old
…On Fri, May 18, 2018, 04:56 Alex Gilbert ***@***.***> wrote:
This library seem's to have a problem when I use it with a Google Pixel
under android 8.1.0.
The error in the adb logcat is:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.travlingbuddies, PID: 11763
android.app.RemoteServiceException: Bad notification for startForeground:
java.lang.RuntimeException: invalid channel for service notification:
Notification(channel=null pri=0 contentView=null vibrate=null sound=null
defaults=0x0 flags=0x62 color=0x00000000 vis=PRIVATE)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I search in the code and it's seems not ready to use the new Channel API
under OREO, seem's like it required a channel id to notify the user.
EXEMPLE : builder.setChannelId(ID);
react-native-mauron85-background-geolocation: 0.5.0-alpha.14
- Platform: Android
- OS version: 8.1.0
- Device manufacturer and model: Google Pixel
- React Native version: 0.51.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#194>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAV8GsBItDKHu5EBZl2YgEHU-tq5TLRPks5tzjhigaJpZM4UEDft>
.
|
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. |
This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions. |
This library seem's to have a problem when I use it with a Google Pixel under android 8.1.0.
The error in the adb logcat is:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.travlingbuddies, PID: 11763
android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x62 color=0x00000000 vis=PRIVATE)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
This error occur when the .configure is call and the service is starting, I only receive 1 location before this error occur, it's probably inside LocationService.java that the error occur.
I search in the code and it's seems not ready to use the new Channel API under OREO, seem's like it required a channel id to notify the user.
EXEMPLE : builder.setChannelId(ID);
react-native-mauron85-background-geolocation: 0.5.0-alpha.14
I had a working version using this version of the library a month ago, without any issue, now I only got that problem and can't make it work.
I try using the new version alpha-25, but it only make new errors that other people have open issue can't have a fix, so I figure just stick to this version since I don't have all the other errors.
Thanks
OTHER INFO:
app/build.gradle:
android {
compileSdkVersion 27
buildToolsVersion "26.0.2"
...
compile project(':react-native-vector-icons')
compile project(':react-native-mauron85-background-geolocation')
compile project(':react-native-linear-gradient')
compile project(':react-native-firebase')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:27.0.2"
compile "com.facebook.react:react-native:+" // From node_modules
compile "com.google.android.gms:play-services-base:15.0.0"
compile 'com.google.android.gms:play-services-location:15.0.0'
compile 'com.google.firebase:firebase-core:15.0.2'
compile "com.google.firebase:firebase-firestore:16.0.0"
compile "com.google.firebase:firebase-auth:15.1.0"
compile "com.google.firebase:firebase-storage:15.0.2"
project/build.gradle:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.1'
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
The text was updated successfully, but these errors were encountered: