PhoneGap 2.7.0: Notification.confirm button parameter is type String; Log says it should be type Array.

  • 4
  • Question
  • Updated 7 years ago
  • Doesn't Need an Answer
This might be a PhoneGap issue, not PG Build. But who knows?

In the log, I get the following output:
Notification.confirm(string, function, string, string) is deprecated.
Use Notification.confirm(string, function, string, array).

The docs tell us to use a String. It works fine with the String, but I don't like the warning. :-)

http://docs.phonegap.com/en/2.7.0/cor...

Thx
Photo of Mario

Mario, Champion

  • 120 Posts
  • 17 Reply Likes

Posted 7 years ago

  • 4
Photo of Mario

Mario, Champion

  • 120 Posts
  • 17 Reply Likes
I found the following comment in the Cordova/PhoneGap source (v2.8.1, line 5580):
// Some platforms take an array of button label names.

// Other platforms take a comma separated list.
// For compatibility, we convert to the desired type based on the platform.

For Android, iOS, Windows Phone and Blackberry 10, the parameter is converted to an array, for others to a string.
Conclusion: It does not matter what type we use, it will be converted depending on platform, anyway. :-)
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Closing old topic.

This conversation is no longer open for comments or replies.