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

Getting square blank image in notification in Ionic 2 #609

Closed
anand-parmar opened this issue Oct 1, 2016 · 4 comments
Closed

Getting square blank image in notification in Ionic 2 #609

anand-parmar opened this issue Oct 1, 2016 · 4 comments

Comments

@anand-parmar
Copy link

Image in notification works in ionic 1. But when i use in Ionic 2 Getting square blank image in notification.

I have tried

ionic plugin add de.appplant.cordova.plugin.local-notification

saved image in platforms\android\res\drawable\sample.png

Here is code

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {LocalNotifications} from 'ionic-native';
@Component({
  templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
  constructor(public navCtrl: NavController) {
    LocalNotifications.schedule({
      id: 1,
      title: 'Title here',
      text: 'Text <b>here aaa</b>',
      led: "FF0000",
      icon: "sample"
    });
  }
}

CLI version

ionic-native : 1.3.21
Cordova CLI: 6.1.1                                                                                                                   
Gulp version:  CLI version 3.9.1                                                                                                     
Gulp local:   Local version 3.9.1                                                                                                    
Ionic Framework Version: 2.0.0-beta.11                                                                                               
Ionic CLI Version: 2.1.0-beta.1                                                                                                      
Ionic App Lib Version: 2.1.0-beta.0                                                                                                  
OS: Windows 8.1                                                                                                                      
Node Version: v4.4.2 
@ihadeed
Copy link
Collaborator

ihadeed commented Oct 1, 2016

Please refer to this page for instructions on using the icon property:
https://github.com/katzer/cordova-plugin-local-notifications/wiki/10.-URIs

@anand-parmar
Copy link
Author

I found solution on katzer/cordova-plugin-local-notifications#966 (comment)

@ihadeed
Copy link
Collaborator

ihadeed commented Oct 2, 2016

@anand-parmar thanks for sharing the solution!

@mmtpl-kumar
Copy link

Hi, can anybody tell me how i can show custom image in push notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants