question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crash android oreo

See original GitHub issue

First of all thank you for this plugin. As you wrote on readme it have problems with android Oreo…

The app crash with the sample code: cordova.plugins.notification.local.schedule({ title: 'My first notification', text: 'Thats pretty easy...', foreground: true });

Your Environment

  • Plugin version: 0.9.0-beta.2
  • Platform: Android
  • OS version: 8.1 Oreo
  • Device manufacturer / model: Mediacom 7BY
  • Cordova version: 9.0.0
  • Cordova platform version: android 8.0.0

Steps to Reproduce

simply use the code above onDeviceReady

Debug logs

logcat.txt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
luca-itrocommented, May 13, 2019

To prevent app crash you must define the smallIcon into the notification object param. However if it doesen’t find the resource it fallback to a system resource that cannot be accessed in android Oreo. My pull seems to prevent this issue

3reactions
shaileshBhokarecommented, Nov 29, 2019

To prevent app crash you must define the smallIcon into the notification object param. However if it doesen’t find the resource it fallback to a system resource that cannot be accessed in android Oreo. Thank you

This works for me This is how my code looks now:

const notification = {
      id: 1234,
      text: 'This is notification',
      trigger: { at: new Date() },
      led: 'FF0000',
      smallIcon: 'res://mipmap-hdpi/ic_launcher.png',
      icon: 'res://mipmap-hdpi/ic_launcher.png',
      vibrate: true
    };
    this.localNotifications.schedule(notification);

res is a folder in android/app/src/main/res

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix android Oreo app issues: Troubleshooting guide
1st Method: Restart your Android Oreo · 2nd Method: Check software update & app update · 3rd Method: Clear App Cache and Data...
Read more >
Applied theme crashes on an Oreo 8.1 device - Stack Overflow
While I removed android:theme the app is not getting crashed. But I missed the transparency of a screen. I need that too with...
Read more >
Apps crashing after android Oreo update - OnePlus Community
Alot of apps are crashing after u open every once in a while and sometimes crashes while you press the back hardware button....
Read more >
Android app crashes immediately on requesting permissions ...
On some Android 8 devices, any permission request, not just location permission, immediately crashes the app, preventing apps requesting ...
Read more >
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found