<bdo id='cAQtF'></bdo><ul id='cAQtF'></ul>
<tfoot id='cAQtF'></tfoot>
      <legend id='cAQtF'><style id='cAQtF'><dir id='cAQtF'><q id='cAQtF'></q></dir></style></legend>

        <small id='cAQtF'></small><noframes id='cAQtF'>

      1. <i id='cAQtF'><tr id='cAQtF'><dt id='cAQtF'><q id='cAQtF'><span id='cAQtF'><b id='cAQtF'><form id='cAQtF'><ins id='cAQtF'></ins><ul id='cAQtF'></ul><sub id='cAQtF'></sub></form><legend id='cAQtF'></legend><bdo id='cAQtF'><pre id='cAQtF'><center id='cAQtF'></center></pre></bdo></b><th id='cAQtF'></th></span></q></dt></tr></i><div id='cAQtF'><tfoot id='cAQtF'></tfoot><dl id='cAQtF'><fieldset id='cAQtF'></fieldset></dl></div>
      2. Ionic 2:本地通知图标

        时间:2023-09-08
          <legend id='nBjeR'><style id='nBjeR'><dir id='nBjeR'><q id='nBjeR'></q></dir></style></legend>

        • <small id='nBjeR'></small><noframes id='nBjeR'>

              <bdo id='nBjeR'></bdo><ul id='nBjeR'></ul>
                <tfoot id='nBjeR'></tfoot>
                    <tbody id='nBjeR'></tbody>
                  <i id='nBjeR'><tr id='nBjeR'><dt id='nBjeR'><q id='nBjeR'><span id='nBjeR'><b id='nBjeR'><form id='nBjeR'><ins id='nBjeR'></ins><ul id='nBjeR'></ul><sub id='nBjeR'></sub></form><legend id='nBjeR'></legend><bdo id='nBjeR'><pre id='nBjeR'><center id='nBjeR'></center></pre></bdo></b><th id='nBjeR'></th></span></q></dt></tr></i><div id='nBjeR'><tfoot id='nBjeR'></tfoot><dl id='nBjeR'><fieldset id='nBjeR'></fieldset></dl></div>

                  本文介绍了Ionic 2:本地通知图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我使用这个插件来获得本地通知:https://github.com/katzer/cordova-plugin-local-notifications/wiki/03.-安装

                  I use this plugin to have local notification : https://github.com/katzer/cordova-plugin-local-notifications/wiki/03.-Installation

                  我想在我的通知中有一个特定的图标.它位于我的/www/assets/images/文件夹中.

                  I want to have a specific icon in my notification. It is located in my /www/assets/images/ folder.

                  我尝试过这种方式,但它不起作用,我有一个带铃铛的方形图标:

                  I try this way but it doesn't work, I have a square icon with a bell :

                  public schedule() {
                      cordova.plugins.notification.local.schedule({
                        title: "New Message",
                        message: "Hi, are you ready? We are waiting.",
                        sound: null,
                        at: new Date(new Date().getTime() + 5 * 1000),
                        icon: 'file://assets/images/logo2.png'
                      });
                    }
                  

                  有人可以告诉我我必须写的路径类型吗?我迷路了.

                  Someone can show me the type of path I have to write ? I'm lost.

                  推荐答案

                  我找到了解决方案:

                  我在/platforms/android/res/中创建了一个名为drawable"的新文件夹我将我的图片放在名为ic_notifications.png"和ic_notifications_small.png"的新文件夹中.

                  I create a new folder named "drawable" in /platforms/android/res/ I put my image in my new folder with name "ic_notifications.png" and "ic_notifications_small.png".

                  在我写的代码中

                  cordova.plugins.notification.local.schedule({
                        id: 2,
                        title: "Notification",
                        message: "Retour à l'application",
                        sound: null,
                        at: new Date(new Date().getTime() + 5 * 1000),
                        icon: 'ic_notifications',
                        smallIcon: 'ic_notification_small'
                      });
                  

                  而且它有效!

                  这篇关于Ionic 2:本地通知图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何处理“Go"/“Enter"键盘按钮 Ionic2 < 下一篇:在 Ionic 2/Angular 2 beta 10 中访问窗口对象

                  相关文章

                  最新文章

                  <tfoot id='QRGov'></tfoot>
                  • <bdo id='QRGov'></bdo><ul id='QRGov'></ul>
                  <i id='QRGov'><tr id='QRGov'><dt id='QRGov'><q id='QRGov'><span id='QRGov'><b id='QRGov'><form id='QRGov'><ins id='QRGov'></ins><ul id='QRGov'></ul><sub id='QRGov'></sub></form><legend id='QRGov'></legend><bdo id='QRGov'><pre id='QRGov'><center id='QRGov'></center></pre></bdo></b><th id='QRGov'></th></span></q></dt></tr></i><div id='QRGov'><tfoot id='QRGov'></tfoot><dl id='QRGov'><fieldset id='QRGov'></fieldset></dl></div>

                      <small id='QRGov'></small><noframes id='QRGov'>

                    1. <legend id='QRGov'><style id='QRGov'><dir id='QRGov'><q id='QRGov'></q></dir></style></legend>