var PluginPage = require("./PluginPage");

var page = new PluginPage("Badge", "de.appplant.cordova.plugin.badge", function(parent) {

  cordova.plugins.notification.badge.promptForPermission();

  var input = tabris.create("TextInput", {
    text: "23",
    layoutData: {left: 10, top: 10, right: 10}
  }).appendTo(parent);

  tabris.create("Button", {
    layoutData: {left: 10, top: [input, 10], right: 10},
    text: "Set Badge"
  }).appendTo(parent).on("selection", function() {
    var badge = input.get("text");
    cordova.plugins.notification.badge.set(badge);
  });

});

module.exports = page;

var PluginPage = require("./PluginPage");

var page = new PluginPage("Badge", "de.appplant.cordova.plugin.badge", function(parent) {

  var input = tabris.create("TextInput", {
    text: "23",
    layoutData: {left: 10, top: 10, right: 10}
  }).appendTo(parent);

  tabris.create("Button", {
    layoutData: {left: 10, top: [input, 10], right: 10},
    text: "Set Badge"
  }).appendTo(parent).on("selection", function() {
    var badge = input.get("text");
    cordova.plugins.notification.badge.set(badge);
  });

});

module.exports = page;

Fix cordova example error caused by badge plugin update
Fix cordova example error caused by badge plugin update

As of version 0.6.2 of the plugin the promptForPermission function has
been deprecated. The replacement is registerPermission, which requires a
callback. The old method delegates to the new one, and without the
callback causes a crash.

Sine registerPermission is now optional, we can just remove the line.

See https://github.com/katzer/cordova-plugin-badge#version-062-01032015

Change-Id: Ia136a01b1c2770d22f942c5b62765bb5048c319b
