Skip to content

Commit

Permalink
Added method to retrive contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
zittix committed Sep 4, 2015
1 parent aa4dc74 commit a9994e1
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-pixlive",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "http://www.pixlive.info",
"authors": [
"vidinoti"
Expand Down
17 changes: 17 additions & 0 deletions js/PixLive.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,23 @@ pixliveModule
}
});

return deferred.promise;
},
getContexts: function() {
var deferred = $q.defer();

$ionicPlatform.ready(function () {
if(window.cordova && window.cordova.plugins && window.cordova.plugins.PixLive) {
window.cordova.plugins.PixLive.getContexts(function(list) {
deferred.resolve(list);
}, function() {
deferred.reject();
});
} else {
deferred.resolve([]);
}
});

return deferred.promise;
}
};
Expand Down
2 changes: 1 addition & 1 deletion js/PixLive.bundle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions js/SDKController.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ pixliveModule
}
});

return deferred.promise;
},
getContexts: function() {
var deferred = $q.defer();

$ionicPlatform.ready(function () {
if(window.cordova && window.cordova.plugins && window.cordova.plugins.PixLive) {
window.cordova.plugins.PixLive.getContexts(function(list) {
deferred.resolve(list);
}, function() {
deferred.reject();
});
} else {
deferred.resolve([]);
}
});

return deferred.promise;
}
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-pixlive",
"version": "1.0.4",
"version": "1.0.5",
"description": "Plugin to use PixLive Augmented Reality toolkit the Angular way",
"main": "js/PixLive.bundle.js",
"scripts": {
Expand Down

0 comments on commit a9994e1

Please sign in to comment.