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.

icon and smallicon

See original GitHub issue

I have a issue with icon and small icon

cordova.plugins.notification.local.schedule({
    id: 1,
    title: "DTH ",
    text: "Don't forget your DTH bill.",
    at: notificationDate,
    icon:'dth_notification',
    smallIcon:'dth_notification'
});

screenshot_2016-05-05-15-00-26

now the right sign is app icon. shouldn’t that be ‘dth_notification’ ? (DTH_notification is the dish icon in assets. I’ve put hdpi,xhdpi,ldpi and mdpi files in all folders) what I need is the following. screenshot_2016-05-05-15-00-26-000

is that not possible with this plugin ? or this is a bug ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:25

github_iconTop GitHub Comments

4reactions
dovkcommented, Sep 16, 2017

What eventually worked for me was taking the drawable-xhdpi-icon icon (size 96x96), renaming it icon.png and placing it in two places:    /src/assets/img    /platforms/android/res/drawable The drawable folder is a new folder created manually. In the local or geofence notification it is reference as follows:

      smallIcon: 'res://icon',
      icon: 'file://assets/img/icon.png'
3reactions
vasani-arpitcommented, May 23, 2016

no Image has to be in drawable folder inside android platform (if you are targeting android) path is <project folder>/platforms/Android/res find 4 folders named following

drawable-hdpi
drawable-ldpi
drawable-mdpi
drawable-xhdpi

above folder will have app icon in it. put your notification icon as same size as app icon there. and then use icon:res://iconNameWithoutExtention keep in mind that icon must be transparent PNG.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android: Notification Icons - OneSignal Documentation
Adding custom icons to some or all of your notifications. ... The small icon is displayed on the top status bar as well...
Read more >
Simple Small Icons - Download Free Icons | PNG and SVG
Free icons in minimalist Simple Small style to be used as icon font for user interface design. Available in PNG and vector. Download...
Read more >
Android: how to add a small icon with a expo managed app ...
I would like to know how can I provide a small icon for android using expo managed with eas build and the development...
Read more >
LOAD-SMALL-ICON( ) method - Progress Software
Loads the icon you want from a specified file for display in the title bar of a window and in the task bar...
Read more >
54 Colorful Small Icons – Introducing The Smallicons [Freebie]
Today we are pleased to feature Smallicons, a set of 54 flat icons. If you are looking for a way to **make your...
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