add line break in Ionic notifications $cordovaLocalNotification.Schedule

Asked

Viewed 562 times

1

I’m using the plugin cordova-plugin-local-notifications and I can’t make the line break in the notification text. I have the following code::

$cordovaLocalNotification.schedule({
    id: options.id,
    title: options.title,
    text: options.text,
    icon:"icon",
    data: {
    "type":options.type,
    "value":object
    }
}).then(callback);

Does anyone know how to implement this?

  • You’re at the Stackoverflow in Portuguese, if you do not translate your question, it will be closed. | You’re in Stackoverflow in Portuguese, if you don’t Translate your Question, it’ll be closed.

  • Welcome to Stack Overflow! Welcome to Stackoverflow in English. The official language used here is Portuguese, could you translate your question? If you prefer, you can ask the same question on Stackoverflow.com.

  • You tried " n" on the spot where you want to break the line?

  • yes, I’ve tried n , <br> n r

1 answer

0

thank you very much for the help, to be able to solve.

there is a commit in which this has been fixed in the Cordova-plugin-local-Notifications plugin but this commit is not yet in master. The guy who committed cloned the plugin project with his change.

so my solution was to switch to package.json to point to its repository on github for now.

this is the repository: https://github.com/fikri-marhan/cordova-plugin-local-notifications

Browser other questions tagged

You are not signed in. Login or sign up in order to post.