Skip to content

Commit

Permalink
Modified API to have both check and request permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
abuturla committed Jun 20, 2016
1 parent bebdc6d commit 85b9324
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pluginTester/scripts/loadScripts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function _ScriptLoader(){
this.domain="http://app.buildfire.com/";

this.scripts = [
, this.domain + "app/scripts/framework/postMaster.js"
, this.domain + "scripts/framework/pluginAPI/imageLibAPI.js"
Expand Down
10 changes: 8 additions & 2 deletions scripts/buildfire/services/notifications/localNotifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ buildfire.notifications.localNotification = {
var packet = new Packet(packetId, command, options);
buildfire._sendPacket(packet, callback);
}
, hasPermission: function (callback) {
, checkPermission: function (callback) {
var packetId = null;
var command = 'localNotifications.hasPermission';
var command = 'localNotifications.checkPermission';

var packet = new Packet(packetId, command);
buildfire._sendPacket(packet, callback);
}, requestPermission: function (callback) {
var packetId = null;
var command = 'localNotifications.requestPermission';

var packet = new Packet(packetId, command);
buildfire._sendPacket(packet, callback);
Expand Down

0 comments on commit 85b9324

Please sign in to comment.