code: function () {
                  var deferred = $q.defer();
                  if (!window.cordova) {
                      deferred.reject('Not supported in browser');
                  } else {
                      if (!window.ThreeDeeTouch) {
                          deferred.reject('Could not find 3D touch plugin');
                      } else {
                          window.ThreeDeeTouch.isAvailable(function (value) {
                              deferred.resolve(value);
                          }, function (err) {
                              deferred.reject(err);
                          });
                      }
                  }
  
                  return deferred.promise;
              }
docs: /*
  Checks if Cordova 3D touch is present and loaded
  
  @return   promise