mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
refactor: update lint rules
This commit is contained in:
parent
a7830693af
commit
0c7cfeeeb8
310
package-lock.json
generated
310
package-lock.json
generated
@ -40,6 +40,12 @@
|
|||||||
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=",
|
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@types/fancy-log": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/fancy-log/-/fancy-log-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-mQjDxyOM1Cpocd+vm1kZBP7smwKZ4TNokFeds9LV7OZibmPJFEzY3+xZMrKfUdNT71lv8GoCPD6upKwHxubClw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@types/jasmine": {
|
"@types/jasmine": {
|
||||||
"version": "2.8.8",
|
"version": "2.8.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.8.tgz",
|
||||||
@ -201,6 +207,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ansi-colors": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-wrap": "^0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ansi-cyan": {
|
"ansi-cyan": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
|
||||||
@ -210,6 +225,15 @@
|
|||||||
"ansi-wrap": "0.1.0"
|
"ansi-wrap": "0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ansi-gray": {
|
||||||
|
"version": "0.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
|
||||||
|
"integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-wrap": "0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ansi-red": {
|
"ansi-red": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
|
||||||
@ -1776,6 +1800,27 @@
|
|||||||
"object-visit": "^1.0.0"
|
"object-visit": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "1.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||||
|
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"color-support": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"colors": {
|
"colors": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
|
||||||
@ -1824,8 +1869,7 @@
|
|||||||
"version": "2.16.0",
|
"version": "2.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz",
|
||||||
"integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==",
|
"integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"compare-func": {
|
"compare-func": {
|
||||||
"version": "1.3.2",
|
"version": "1.3.2",
|
||||||
@ -5428,14 +5472,108 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gulp-tslint": {
|
"gulp-tslint": {
|
||||||
"version": "6.1.2",
|
"version": "8.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-6.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-8.1.3.tgz",
|
||||||
"integrity": "sha1-ni3oLvJaqkN4/Yn+W0Q7Pq9wL+0=",
|
"integrity": "sha512-KEP350N5B9Jg6o6jnyCyKVBPemJePYpMsGfIQq0G0ErvY7tw4Lrfb/y3L4WRf7ek0OsaE8nnj86w+lcLXW8ovw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"gulp-util": "~3.0.7",
|
"@types/fancy-log": "1.3.0",
|
||||||
"map-stream": "~0.1.0",
|
"chalk": "2.3.1",
|
||||||
|
"fancy-log": "1.3.2",
|
||||||
|
"map-stream": "~0.0.7",
|
||||||
|
"plugin-error": "1.0.1",
|
||||||
"through": "~2.3.8"
|
"through": "~2.3.8"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"arr-diff": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"arr-union": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
|
||||||
|
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "http://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.0",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extend-shallow": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
|
||||||
|
"integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"assign-symbols": "^1.0.0",
|
||||||
|
"is-extendable": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fancy-log": {
|
||||||
|
"version": "1.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz",
|
||||||
|
"integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-gray": "^0.1.1",
|
||||||
|
"color-support": "^1.1.3",
|
||||||
|
"time-stamp": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-extendable": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-plain-object": "^2.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugin-error": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-colors": "^1.0.1",
|
||||||
|
"arr-diff": "^4.0.0",
|
||||||
|
"arr-union": "^3.1.0",
|
||||||
|
"extend-shallow": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gulp-util": {
|
"gulp-util": {
|
||||||
@ -8193,9 +8331,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"map-stream": {
|
"map-stream": {
|
||||||
"version": "0.1.0",
|
"version": "0.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz",
|
||||||
"integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
|
"integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"map-visit": {
|
"map-visit": {
|
||||||
@ -10983,75 +11121,106 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tslint": {
|
"tslint": {
|
||||||
"version": "3.15.1",
|
"version": "5.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-3.15.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz",
|
||||||
"integrity": "sha1-2hZcqT2P3CwIa1EWXuG6y0jJjqU=",
|
"integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"colors": "^1.1.2",
|
"babel-code-frame": "^6.22.0",
|
||||||
"diff": "^2.2.1",
|
"builtin-modules": "^1.1.1",
|
||||||
"findup-sync": "~0.3.0",
|
"chalk": "^2.3.0",
|
||||||
"glob": "^7.0.3",
|
"commander": "^2.12.1",
|
||||||
"optimist": "~0.6.0",
|
"diff": "^3.2.0",
|
||||||
"resolve": "^1.1.7",
|
"glob": "^7.1.1",
|
||||||
"underscore.string": "^3.3.4"
|
"js-yaml": "^3.7.0",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"resolve": "^1.3.2",
|
||||||
|
"semver": "^5.3.0",
|
||||||
|
"tslib": "^1.8.0",
|
||||||
|
"tsutils": "^2.27.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": {
|
"ansi-styles": {
|
||||||
"version": "1.1.2",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"diff": {
|
|
||||||
"version": "2.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz",
|
|
||||||
"integrity": "sha1-YOr9DSjukG5Oj/ClLBIpUhAzv5k=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"findup-sync": {
|
|
||||||
"version": "0.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
|
|
||||||
"integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=",
|
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "~5.0.0"
|
"color-convert": "^1.9.0"
|
||||||
},
|
}
|
||||||
"dependencies": {
|
},
|
||||||
"glob": {
|
"chalk": {
|
||||||
"version": "5.0.15",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
||||||
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
|
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"inflight": "^1.0.4",
|
"ansi-styles": "^3.2.1",
|
||||||
"inherits": "2",
|
"escape-string-regexp": "^1.0.5",
|
||||||
"minimatch": "2 || 3",
|
"supports-color": "^5.3.0"
|
||||||
"once": "^1.3.0",
|
}
|
||||||
"path-is-absolute": "^1.0.0"
|
},
|
||||||
}
|
"has-flag": {
|
||||||
}
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslint-eslint-rules": {
|
"tslint-eslint-rules": {
|
||||||
"version": "1.6.1",
|
"version": "5.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-1.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz",
|
||||||
"integrity": "sha1-OekvMZVq0qZsAGHDUfqWwICK4Pg=",
|
"integrity": "sha512-WlSXE+J2vY/VPgIcqQuijMQiel+UtmXS+4nvK4ZzlDiqBfXse8FAvkNnTcYhnQyOTW5KFM+uRRGXxYhFpuBc6w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"doctrine": "^0.7.2",
|
"doctrine": "0.7.2",
|
||||||
"tslint": "^3.15.1"
|
"tslib": "1.9.0",
|
||||||
|
"tsutils": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"tsutils": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-LjHBWR0vWAUHWdIAoTjoqi56Kz+FDKBgVEuL+gVPG/Pv7QW5IdaDDeK9Txlr6U0Cmckp5EgCIq1T25qe3J6hyw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.8.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslint-ionic-rules": {
|
"tslint-ionic-rules": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.19",
|
||||||
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.19.tgz",
|
||||||
"integrity": "sha1-au1vjjzUBlIzAdHW0Db38DbdKAk=",
|
"integrity": "sha512-myxelwnK9FkR4mG+PnktKZ2DJp1UnX+22MyiC0V8QZc0464X6X63kRQU8vMtpVlazpvbifsXP9yxct2tHBrN4w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslint-eslint-rules": "^1.3.0"
|
"@types/node": "^10.9.4",
|
||||||
|
"tslint-eslint-rules": "^5.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "10.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.10.0.tgz",
|
||||||
|
"integrity": "sha512-0V36JTaif20jrbTbZeKqnI4R8nLVE8Ah/u9dQT5jIKXjW51/4ipi/B8Xon1ZiEHATYpgLNoBw2LFfdBMoA5Fzg==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsscmp": {
|
"tsscmp": {
|
||||||
@ -11061,6 +11230,15 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"tsutils": {
|
||||||
|
"version": "2.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||||
|
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tty-browserify": {
|
"tty-browserify": {
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
||||||
@ -11177,16 +11355,6 @@
|
|||||||
"underscore": "1.6.0"
|
"underscore": "1.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"underscore.string": {
|
|
||||||
"version": "3.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz",
|
|
||||||
"integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"sprintf-js": "^1.0.3",
|
|
||||||
"util-deprecate": "^1.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"union-value": {
|
"union-value": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-rename": "^1.4.0",
|
"gulp-rename": "^1.4.0",
|
||||||
"gulp-replace": "^1.0.0",
|
"gulp-replace": "^1.0.0",
|
||||||
"gulp-tslint": "6.1.2",
|
"gulp-tslint": "^8.1.3",
|
||||||
"jasmine-core": "^3.2.1",
|
"jasmine-core": "^3.2.1",
|
||||||
"karma": "^2.0.5",
|
"karma": "^2.0.5",
|
||||||
"karma-cli": "^1.0.1",
|
"karma-cli": "^1.0.1",
|
||||||
@ -38,8 +38,8 @@
|
|||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"rxjs": "^5.5.12",
|
"rxjs": "^5.5.12",
|
||||||
"semver": "^5.5.1",
|
"semver": "^5.5.1",
|
||||||
"tslint": "3.15.1",
|
"tslint": "^5.11.0",
|
||||||
"tslint-ionic-rules": "0.0.8",
|
"tslint-ionic-rules": "0.0.19",
|
||||||
"typescript": "~2.4.2",
|
"typescript": "~2.4.2",
|
||||||
"zone.js": "^0.8.26"
|
"zone.js": "^0.8.26"
|
||||||
},
|
},
|
||||||
|
@ -133,7 +133,7 @@ describe('Regular Decorators', () => {
|
|||||||
delete window.testPlugin;
|
delete window.testPlugin;
|
||||||
window.cordova = true;
|
window.cordova = true;
|
||||||
|
|
||||||
expect(<any>plugin.pingSync()).toEqual(ERR_PLUGIN_NOT_INSTALLED);
|
expect(plugin.pingSync() as any).toEqual(ERR_PLUGIN_NOT_INSTALLED);
|
||||||
|
|
||||||
plugin.ping().catch(e => {
|
plugin.ping().catch(e => {
|
||||||
expect(e).toEqual(ERR_PLUGIN_NOT_INSTALLED.error);
|
expect(e).toEqual(ERR_PLUGIN_NOT_INSTALLED.error);
|
||||||
@ -145,7 +145,7 @@ describe('Regular Decorators', () => {
|
|||||||
it('should throw cordova_not_available error', (done: Function) => {
|
it('should throw cordova_not_available error', (done: Function) => {
|
||||||
delete window.testPlugin;
|
delete window.testPlugin;
|
||||||
|
|
||||||
expect(<any>plugin.pingSync()).toEqual(ERR_CORDOVA_NOT_AVAILABLE);
|
expect(plugin.pingSync() as any).toEqual(ERR_CORDOVA_NOT_AVAILABLE);
|
||||||
|
|
||||||
plugin.ping().catch(e => {
|
plugin.ping().catch(e => {
|
||||||
expect(e).toEqual(ERR_CORDOVA_NOT_AVAILABLE.error);
|
expect(e).toEqual(ERR_CORDOVA_NOT_AVAILABLE.error);
|
||||||
|
@ -116,7 +116,7 @@ export function InstanceCheck(opts: CordovaCheckOptions = {}) {
|
|||||||
descriptor: TypedPropertyDescriptor<any>
|
descriptor: TypedPropertyDescriptor<any>
|
||||||
): TypedPropertyDescriptor<any> => {
|
): TypedPropertyDescriptor<any> => {
|
||||||
return {
|
return {
|
||||||
value: function(...args: any[]): any {
|
value(...args: any[]): any {
|
||||||
if (instanceAvailability(this)) {
|
if (instanceAvailability(this)) {
|
||||||
return descriptor.value.apply(this, args);
|
return descriptor.value.apply(this, args);
|
||||||
} else {
|
} else {
|
||||||
@ -145,7 +145,7 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
|
|||||||
descriptor: TypedPropertyDescriptor<any>
|
descriptor: TypedPropertyDescriptor<any>
|
||||||
): TypedPropertyDescriptor<any> => {
|
): TypedPropertyDescriptor<any> => {
|
||||||
return {
|
return {
|
||||||
value: function(...args: any[]): any {
|
value(...args: any[]): any {
|
||||||
const check = checkAvailability(pluginObj);
|
const check = checkAvailability(pluginObj);
|
||||||
if (check === true) {
|
if (check === true) {
|
||||||
return descriptor.value.apply(this, args);
|
return descriptor.value.apply(this, args);
|
||||||
@ -185,7 +185,7 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
|
|||||||
export function Plugin(config: PluginConfig): ClassDecorator {
|
export function Plugin(config: PluginConfig): ClassDecorator {
|
||||||
return function(cls: any) {
|
return function(cls: any) {
|
||||||
// Add these fields to the class
|
// Add these fields to the class
|
||||||
for (let prop in config) {
|
for (const prop in config) {
|
||||||
cls[prop] = config[prop];
|
cls[prop] = config[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ export function Cordova(opts: CordovaOptions = {}) {
|
|||||||
descriptor: TypedPropertyDescriptor<any>
|
descriptor: TypedPropertyDescriptor<any>
|
||||||
) => {
|
) => {
|
||||||
return {
|
return {
|
||||||
value: function(...args: any[]) {
|
value(...args: any[]) {
|
||||||
return wrap(this, methodName, opts).apply(this, args);
|
return wrap(this, methodName, opts).apply(this, args);
|
||||||
},
|
},
|
||||||
enumerable: true
|
enumerable: true
|
||||||
@ -254,7 +254,7 @@ export function Cordova(opts: CordovaOptions = {}) {
|
|||||||
export function CordovaInstance(opts: CordovaOptions = {}) {
|
export function CordovaInstance(opts: CordovaOptions = {}) {
|
||||||
return (target: Object, methodName: string) => {
|
return (target: Object, methodName: string) => {
|
||||||
return {
|
return {
|
||||||
value: function(...args: any[]) {
|
value(...args: any[]) {
|
||||||
return wrapInstance(this, methodName, opts).apply(this, args);
|
return wrapInstance(this, methodName, opts).apply(this, args);
|
||||||
},
|
},
|
||||||
enumerable: true
|
enumerable: true
|
||||||
@ -295,10 +295,10 @@ export function CordovaProperty(target: any, key: string) {
|
|||||||
export function InstanceProperty(target: any, key: string) {
|
export function InstanceProperty(target: any, key: string) {
|
||||||
Object.defineProperty(target, key, {
|
Object.defineProperty(target, key, {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function() {
|
get() {
|
||||||
return this._objectInstance[key];
|
return this._objectInstance[key];
|
||||||
},
|
},
|
||||||
set: function(value) {
|
set(value) {
|
||||||
this._objectInstance[key] = value;
|
this._objectInstance[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -317,7 +317,7 @@ export function CordovaFunctionOverride(opts: any = {}) {
|
|||||||
descriptor: TypedPropertyDescriptor<any>
|
descriptor: TypedPropertyDescriptor<any>
|
||||||
) => {
|
) => {
|
||||||
return {
|
return {
|
||||||
value: function(...args: any[]) {
|
value(...args: any[]) {
|
||||||
return overrideFunction(this, methodName, opts);
|
return overrideFunction(this, methodName, opts);
|
||||||
},
|
},
|
||||||
enumerable: true
|
enumerable: true
|
||||||
|
@ -105,7 +105,7 @@ function setIndex(
|
|||||||
opts.successName &&
|
opts.successName &&
|
||||||
opts.errorName
|
opts.errorName
|
||||||
) {
|
) {
|
||||||
let obj: any = {};
|
const obj: any = {};
|
||||||
obj[opts.successName] = resolve;
|
obj[opts.successName] = resolve;
|
||||||
obj[opts.errorName] = reject;
|
obj[opts.errorName] = reject;
|
||||||
args.push(obj);
|
args.push(obj);
|
||||||
|
@ -6,7 +6,7 @@ declare const window: any;
|
|||||||
export const get = (element: Element | Window, path: string): any => {
|
export const get = (element: Element | Window, path: string): any => {
|
||||||
const paths: string[] = path.split('.');
|
const paths: string[] = path.split('.');
|
||||||
let obj: any = element;
|
let obj: any = element;
|
||||||
for (let i: number = 0; i < paths.length; i++) {
|
for (let i = 0; i < paths.length; i++) {
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -21,12 +21,12 @@ export interface TextCaptureOptions {
|
|||||||
* for example: ["English", "French", "German"]. Empty array
|
* for example: ["English", "French", "German"]. Empty array
|
||||||
* disables language selection.
|
* disables language selection.
|
||||||
*/
|
*/
|
||||||
selectableRecognitionLanguages?: Array<string>;
|
selectableRecognitionLanguages?: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recognition language selected by default.
|
* Recognition language selected by default.
|
||||||
*/
|
*/
|
||||||
recognitionLanguages?: Array<string>;
|
recognitionLanguages?: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Width and height of the recognition area, separated by a
|
* Width and height of the recognition area, separated by a
|
||||||
@ -75,7 +75,7 @@ export interface TextCaptureResult {
|
|||||||
* · rect (string): position and size of the bounding rectangle,
|
* · rect (string): position and size of the bounding rectangle,
|
||||||
* a string of 4 integers separated with whitespaces ("x y width height").
|
* a string of 4 integers separated with whitespaces ("x y width height").
|
||||||
*/
|
*/
|
||||||
textLines: Array<{ text: string, quadrangle: string, rect?: string }>;
|
textLines: { text: string, quadrangle: string, rect?: string }[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional information. This object has the following keys:
|
* Additional information. This object has the following keys:
|
||||||
@ -94,7 +94,7 @@ export interface TextCaptureResult {
|
|||||||
stabilityStatus: string,
|
stabilityStatus: string,
|
||||||
userAction: string,
|
userAction: string,
|
||||||
frameSize: string,
|
frameSize: string,
|
||||||
recognitionLanguages: Array<string>
|
recognitionLanguages: string[]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -136,8 +136,8 @@ export interface DataCaptureOptions {
|
|||||||
customDataCaptureScenario?: {
|
customDataCaptureScenario?: {
|
||||||
name: string,
|
name: string,
|
||||||
description: string,
|
description: string,
|
||||||
recognitionLanguages: Array<string>,
|
recognitionLanguages: string[],
|
||||||
fields: Array<{ regEx: string }>
|
fields: { regEx: string }[]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,7 @@ export interface AdMobFreeRewardVideoConfig {
|
|||||||
* @name AdMob Free
|
* @name AdMob Free
|
||||||
* @description
|
* @description
|
||||||
* A free, no ad-sharing version of Google AdMob plugin for Cordova.
|
* A free, no ad-sharing version of Google AdMob plugin for Cordova.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-admob-free`. For more info, please see the [AdMob Free plugin docs](https://github.com/ratson/cordova-plugin-admob-free).
|
* Requires Cordova plugin: `cordova-plugin-admob-free`. For more info, please see the [AdMob Free plugin docs](https://github.com/ratson/cordova-plugin-admob-free).
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
|
@ -14,8 +14,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
*
|
*
|
||||||
* private secureKey: string;
|
* private secureKey: string;
|
||||||
* private secureIV: string;
|
* private secureIV: string;
|
||||||
*
|
*
|
||||||
* constructor(private aes256: AES256) {
|
* constructor(private aes256: AES256) {
|
||||||
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
|
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
@ -34,16 +34,16 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
* .then(res => console.log('Decrypted Data : ',res))
|
* .then(res => console.log('Decrypted Data : ',res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* * this.aes256.generateSecureKey('random password 12345')
|
* * this.aes256.generateSecureKey('random password 12345')
|
||||||
* .then(res => console.log('Secure Key : ',res))
|
* .then(res => console.log('Secure Key : ',res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* * this.aes256.generateSecureIV('random password 12345')
|
* * this.aes256.generateSecureIV('random password 12345')
|
||||||
* .then(res => console.log('Secure IV : ',res))
|
* .then(res => console.log('Secure IV : ',res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
|
@ -75,7 +75,7 @@ export interface AppRateCustomLocale {
|
|||||||
/** No button label */
|
/** No button label */
|
||||||
noButtonLabel?: string;
|
noButtonLabel?: string;
|
||||||
|
|
||||||
/** App rate promt title */
|
/** App rate prompt title */
|
||||||
appRatePromptTitle?: string;
|
appRatePromptTitle?: string;
|
||||||
|
|
||||||
/** Feedback prompt title */
|
/** Feedback prompt title */
|
||||||
|
@ -63,7 +63,7 @@ export interface AppsflyerInviteOptions {
|
|||||||
* this.appsflyer.initSdk(options);
|
* this.appsflyer.initSdk(options);
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* AppsflyerOptions
|
* AppsflyerOptions
|
||||||
* AppsflyerEvent
|
* AppsflyerEvent
|
||||||
|
@ -3,7 +3,6 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface BackgroundGeolocationResponse {
|
export interface BackgroundGeolocationResponse {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of location as stored in DB (or null)
|
* ID of location as stored in DB (or null)
|
||||||
*/
|
*/
|
||||||
@ -50,8 +49,8 @@ export interface BackgroundGeolocationResponse {
|
|||||||
altitude: number;
|
altitude: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* accuracy of the altitude if available.
|
* accuracy of the altitude if available.
|
||||||
*/
|
*/
|
||||||
altitudeAccuracy: number;
|
altitudeAccuracy: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,7 +70,6 @@ export interface BackgroundGeolocationResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface BackgroundGeolocationConfig {
|
export interface BackgroundGeolocationConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desired accuracy in meters. Possible values [0, 10, 100, 1000]. The lower
|
* Desired accuracy in meters. Possible values [0, 10, 100, 1000]. The lower
|
||||||
* the number, the more power devoted to GeoLocation resulting in higher
|
* the number, the more power devoted to GeoLocation resulting in higher
|
||||||
@ -108,19 +106,19 @@ export interface BackgroundGeolocationConfig {
|
|||||||
*/
|
*/
|
||||||
stopOnTerminate?: boolean;
|
stopOnTerminate?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* Start background service on device boot.
|
* Start background service on device boot.
|
||||||
*
|
*
|
||||||
* Defaults to false
|
* Defaults to false
|
||||||
*/
|
*/
|
||||||
startOnBoot?: boolean;
|
startOnBoot?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* If false location service will not be started in foreground and no notification will be shown.
|
* If false location service will not be started in foreground and no notification will be shown.
|
||||||
*
|
*
|
||||||
* Defaults to true
|
* Defaults to true
|
||||||
*/
|
*/
|
||||||
startForeground?: boolean;
|
startForeground?: boolean;
|
||||||
|
|
||||||
@ -155,17 +153,17 @@ export interface BackgroundGeolocationConfig {
|
|||||||
*/
|
*/
|
||||||
notificationIconColor?: string;
|
notificationIconColor?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* The filename of a custom notification icon. See android quirks.
|
* The filename of a custom notification icon. See android quirks.
|
||||||
* NOTE: Only available for API Level >=21.
|
* NOTE: Only available for API Level >=21.
|
||||||
*/
|
*/
|
||||||
notificationIconLarge?: string;
|
notificationIconLarge?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* The filename of a custom notification icon. See android quirks.
|
* The filename of a custom notification icon. See android quirks.
|
||||||
* NOTE: Only available for API Level >=21.
|
* NOTE: Only available for API Level >=21.
|
||||||
*/
|
*/
|
||||||
notificationIconSmall?: string;
|
notificationIconSmall?: string;
|
||||||
|
|
||||||
@ -183,50 +181,50 @@ export interface BackgroundGeolocationConfig {
|
|||||||
*/
|
*/
|
||||||
activityType?: string;
|
activityType?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IOS ONLY
|
* IOS ONLY
|
||||||
* Pauses location updates when app is paused
|
* Pauses location updates when app is paused
|
||||||
*
|
*
|
||||||
* Defaults to true
|
* Defaults to true
|
||||||
*/
|
*/
|
||||||
pauseLocationUpdates?: boolean;
|
pauseLocationUpdates?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Server url where to send HTTP POST with recorded locations
|
* Server url where to send HTTP POST with recorded locations
|
||||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
||||||
*/
|
*/
|
||||||
url?: string;
|
url?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Server url where to send fail to post locations
|
* Server url where to send fail to post locations
|
||||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
||||||
*/
|
*/
|
||||||
syncUrl?: string;
|
syncUrl?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies how many previously failed locations will be sent to server at once
|
* Specifies how many previously failed locations will be sent to server at once
|
||||||
*
|
*
|
||||||
* Defaults to 100
|
* Defaults to 100
|
||||||
*/
|
*/
|
||||||
syncThreshold?: number;
|
syncThreshold?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional HTTP headers sent along in HTTP request
|
* Optional HTTP headers sent along in HTTP request
|
||||||
*/
|
*/
|
||||||
httpHeaders?: any;
|
httpHeaders?: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IOS ONLY
|
* IOS ONLY
|
||||||
* Switch to less accurate significant changes and region monitory when in background (default)
|
* Switch to less accurate significant changes and region monitory when in background (default)
|
||||||
*
|
*
|
||||||
* Defaults to 100
|
* Defaults to 100
|
||||||
*/
|
*/
|
||||||
saveBatteryOnBackground?: boolean;
|
saveBatteryOnBackground?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit maximum number of locations stored into db
|
* Limit maximum number of locations stored into db
|
||||||
*
|
*
|
||||||
* Defaults to 10000
|
* Defaults to 10000
|
||||||
*/
|
*/
|
||||||
maxLocations?: number;
|
maxLocations?: number;
|
||||||
|
|
||||||
@ -310,15 +308,14 @@ export interface BackgroundGeolocationConfig {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BackgroundGeolocation extends IonicNativePlugin {
|
export class BackgroundGeolocation extends IonicNativePlugin {
|
||||||
|
/**
|
||||||
/**
|
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
|
||||||
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
|
|
||||||
*
|
*
|
||||||
* Possible values:
|
* Possible values:
|
||||||
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
||||||
* ANDROID_ACTIVITY_PROVIDER: 1
|
* ANDROID_ACTIVITY_PROVIDER: 1
|
||||||
*
|
*
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
*/
|
*/
|
||||||
LocationProvider: any = {
|
LocationProvider: any = {
|
||||||
ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
||||||
@ -326,17 +323,17 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
|
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
|
||||||
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
|
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
|
||||||
* 1000 results in lowest power drain and least accurate readings.
|
* 1000 results in lowest power drain and least accurate readings.
|
||||||
*
|
*
|
||||||
* Possible values:
|
* Possible values:
|
||||||
* HIGH: 0
|
* HIGH: 0
|
||||||
* MEDIUM: 10
|
* MEDIUM: 10
|
||||||
* LOW: 100
|
* LOW: 100
|
||||||
* PASSIVE: 1000
|
* PASSIVE: 1000
|
||||||
*
|
*
|
||||||
* enum {number}
|
* enum {number}
|
||||||
*/
|
*/
|
||||||
Accuracy: any = {
|
Accuracy: any = {
|
||||||
HIGH: 0,
|
HIGH: 0,
|
||||||
@ -345,14 +342,14 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
PASSIVE: 1000
|
PASSIVE: 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used in the switchMode function
|
* Used in the switchMode function
|
||||||
*
|
*
|
||||||
* Possible values:
|
* Possible values:
|
||||||
* BACKGROUND: 0
|
* BACKGROUND: 0
|
||||||
* FOREGROUND: 1
|
* FOREGROUND: 1
|
||||||
*
|
*
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
*/
|
*/
|
||||||
Mode: any = {
|
Mode: any = {
|
||||||
BACKGROUND: 0,
|
BACKGROUND: 0,
|
||||||
@ -369,7 +366,11 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
configure(options: BackgroundGeolocationConfig): Observable<BackgroundGeolocationResponse> { return; }
|
configure(
|
||||||
|
options: BackgroundGeolocationConfig
|
||||||
|
): Observable<BackgroundGeolocationResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn ON the background-geolocation system.
|
* Turn ON the background-geolocation system.
|
||||||
@ -377,14 +378,18 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
start(): Promise<any> { return; }
|
start(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn OFF background-tracking
|
* Turn OFF background-tracking
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stop(): Promise<any> { return; }
|
stop(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inform the native plugin that you're finished, the background-task may be completed
|
* Inform the native plugin that you're finished, the background-task may be completed
|
||||||
@ -393,7 +398,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
finish(): Promise<any> { return; }
|
finish(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force the plugin to enter "moving" or "stationary" state
|
* Force the plugin to enter "moving" or "stationary" state
|
||||||
@ -403,7 +410,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
changePace(isMoving: boolean): Promise<any> { return; }
|
changePace(isMoving: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup configuration
|
* Setup configuration
|
||||||
@ -413,7 +422,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
setConfig(options: BackgroundGeolocationConfig): Promise<any> { return; }
|
setConfig(options: BackgroundGeolocationConfig): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns current stationaryLocation if available. null if not
|
* Returns current stationaryLocation if available. null if not
|
||||||
@ -422,7 +433,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
getStationaryLocation(): Promise<BackgroundGeolocationResponse> { return; }
|
getStationaryLocation(): Promise<BackgroundGeolocationResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
|
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
|
||||||
@ -432,7 +445,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
onStationary(): Promise<any> { return; }
|
onStationary(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if location is enabled on the device
|
* Check if location is enabled on the device
|
||||||
@ -441,19 +456,21 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
isLocationEnabled(): Promise<number> { return; }
|
isLocationEnabled(): Promise<number> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display app settings to change permissions
|
* Display app settings to change permissions
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
showAppSettings(): void { }
|
showAppSettings(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display device location settings
|
* Display device location settings
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
showLocationSettings(): void { }
|
showLocationSettings(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method can be used to detect user changes in location services settings.
|
* Method can be used to detect user changes in location services settings.
|
||||||
@ -465,7 +482,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
watchLocationMode(): Observable<number> { return; }
|
watchLocationMode(): Observable<number> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop watching for location mode changes.
|
* Stop watching for location mode changes.
|
||||||
@ -474,7 +493,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
stopWatchingLocationMode(): Promise<any> { return; }
|
stopWatchingLocationMode(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method will return all stored locations.
|
* Method will return all stored locations.
|
||||||
@ -488,14 +509,18 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
getLocations(): Promise<any> { return; }
|
getLocations(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
|
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getValidLocations(): Promise<any> { return; }
|
getValidLocations(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete stored location by given locationId.
|
* Delete stored location by given locationId.
|
||||||
@ -505,7 +530,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
deleteLocation(locationId: number): Promise<any> { return; }
|
deleteLocation(locationId: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete all stored locations.
|
* Delete all stored locations.
|
||||||
@ -514,34 +541,39 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
deleteAllLocations(): Promise<any> { return; }
|
deleteAllLocations(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normally plugin will handle switching between BACKGROUND and FOREGROUND mode itself.
|
* Normally plugin will handle switching between BACKGROUND and FOREGROUND mode itself.
|
||||||
* Calling switchMode you can override plugin behavior and force plugin to switch into other mode.
|
* Calling switchMode you can override plugin behavior and force plugin to switch into other mode.
|
||||||
*
|
*
|
||||||
* In FOREGROUND mode plugin uses iOS local manager to receive locations and behavior is affected by option.desiredAccuracy and option.distanceFilter.
|
* In FOREGROUND mode plugin uses iOS local manager to receive locations and behavior is affected by option.desiredAccuracy and option.distanceFilter.
|
||||||
* In BACKGROUND mode plugin uses significant changes and region monitoring to receive locations and uses option.stationaryRadius only.
|
* In BACKGROUND mode plugin uses significant changes and region monitoring to receive locations and uses option.stationaryRadius only.
|
||||||
*
|
*
|
||||||
* BackgroundGeolocation.Mode.FOREGROUND
|
* BackgroundGeolocation.Mode.FOREGROUND
|
||||||
* BackgroundGeolocation.Mode.BACKGROUND
|
* BackgroundGeolocation.Mode.BACKGROUND
|
||||||
**
|
*
|
||||||
* @param modeId {number}
|
* @param modeId {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
switchMode(modeId: number): Promise<any> { return; }
|
switchMode(modeId: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
||||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
||||||
*
|
*
|
||||||
* @param limit {number} Limits the number of entries
|
* @param limit {number} Limits the number of entries
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getLogEntries(limit: number): Promise<any> { return; }
|
getLogEntries(limit: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ export interface BackgroundModeConfiguration {
|
|||||||
* @description
|
* @description
|
||||||
* Cordova plugin to prevent the app from going to sleep while in background.
|
* Cordova plugin to prevent the app from going to sleep while in background.
|
||||||
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode
|
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode
|
||||||
*@usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BackgroundMode } from '@ionic-native/background-mode';
|
* import { BackgroundMode } from '@ionic-native/background-mode';
|
||||||
*
|
*
|
||||||
|
@ -589,7 +589,6 @@ export class BLE extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a list of the peripherals (containing any of the specified services)
|
* Retrieves a list of the peripherals (containing any of the specified services)
|
||||||
* currently connected to the system. The peripheral list is sent to the success callback.
|
* currently connected to the system. The peripheral list is sent to the success callback.
|
||||||
@ -599,7 +598,7 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
connectedPeripheralsWithServices (services: string[]): Promise<any[]> {
|
connectedPeripheralsWithServices(services: string[]): Promise<any[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -611,7 +610,7 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
peripheralsWithIdentifiers (uuids: string[]): Promise<any[]> {
|
peripheralsWithIdentifiers(uuids: string[]): Promise<any[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,7 +621,7 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
bondedDevices (): Promise<any[]> {
|
bondedDevices(): Promise<any[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/* Available status of device */
|
/* Available status of device */
|
||||||
@ -67,7 +72,7 @@ export interface InitParams extends InitPeripheralParams {
|
|||||||
export interface ScanParams {
|
export interface ScanParams {
|
||||||
/* An array of service IDs to filter the scan or empty array / null. This parameter is not supported on Windows platform yet */
|
/* An array of service IDs to filter the scan or empty array / null. This parameter is not supported on Windows platform yet */
|
||||||
services?: string[];
|
services?: string[];
|
||||||
/** True/false to allow duplicate advertisement packets, defaults to false (iOS)*/
|
/* True/false to allow duplicate advertisement packets, defaults to false (iOS)*/
|
||||||
allowDuplicates?: boolean;
|
allowDuplicates?: boolean;
|
||||||
/** Defaults to Low Power. Available from API21 / API 23 (Android) */
|
/** Defaults to Low Power. Available from API21 / API 23 (Android) */
|
||||||
scanMode?: BluetoothScanMode;
|
scanMode?: BluetoothScanMode;
|
||||||
@ -181,7 +186,7 @@ export interface MTU extends DeviceInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface BondedStatus extends CommonInfo {
|
export interface BondedStatus extends CommonInfo {
|
||||||
/** Bonded status*/
|
/* Bonded status*/
|
||||||
isBonded: boolean;
|
isBonded: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -322,7 +327,7 @@ export interface DescriptorResult extends OperationResult {
|
|||||||
export interface Characteristics extends DeviceInfo {
|
export interface Characteristics extends DeviceInfo {
|
||||||
/** Service's id */
|
/** Service's id */
|
||||||
service: string;
|
service: string;
|
||||||
/** Array of characteristic objects*/
|
/* Array of characteristic objects*/
|
||||||
characteristics: Characteristic[];
|
characteristics: Characteristic[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ export interface CallDirectoryItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface CallDirectoryLog {
|
export interface CallDirectoryLog {
|
||||||
plugin: Array<string>;
|
plugin: string[];
|
||||||
extension: Array<string>;
|
extension: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +66,7 @@ export class CallDirectory extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when numbers are added
|
* @return {Promise<any>} Returns a promise that resolves when numbers are added
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
addIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ export class CallDirectory extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
|
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
removeIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ export class CallDirectory extends IonicNativePlugin {
|
|||||||
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
|
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAllItems(): Promise<Array<CallDirectoryItem>> {
|
getAllItems(): Promise<CallDirectoryItem[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
|
|
||||||
export interface CallLogObject {
|
export interface CallLogObject {
|
||||||
name: string;
|
name: string;
|
||||||
value: string | Array<string>;
|
value: string | string[];
|
||||||
operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'like';
|
operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'like';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ export interface CameraOptions {
|
|||||||
/**
|
/**
|
||||||
* Width in pixels to scale image. Must be used with targetHeight.
|
* Width in pixels to scale image. Must be used with targetHeight.
|
||||||
* Aspect ratio remains constant.
|
* Aspect ratio remains constant.
|
||||||
*/
|
*/
|
||||||
targetWidth?: number;
|
targetWidth?: number;
|
||||||
/**
|
/**
|
||||||
* Height in pixels to scale image. Must be used with targetWidth.
|
* Height in pixels to scale image. Must be used with targetWidth.
|
||||||
@ -165,7 +165,6 @@ export enum Direction {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Camera extends IonicNativePlugin {
|
export class Camera extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for possible destination types
|
* Constant for possible destination types
|
||||||
*/
|
*/
|
||||||
@ -200,7 +199,6 @@ export class Camera extends IonicNativePlugin {
|
|||||||
ALLMEDIA: 2
|
ALLMEDIA: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
*/
|
*/
|
||||||
@ -213,7 +211,6 @@ export class Camera extends IonicNativePlugin {
|
|||||||
SAVEDPHOTOALBUM: 2
|
SAVEDPHOTOALBUM: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
*/
|
*/
|
||||||
@ -243,7 +240,9 @@ export class Camera extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getPicture(options?: CameraOptions): Promise<any> { return; }
|
getPicture(options?: CameraOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
||||||
@ -253,6 +252,7 @@ export class Camera extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
cleanup(): Promise<any> { return; };
|
cleanup(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,16 +130,16 @@ export interface CardIOResponse {
|
|||||||
* @description
|
* @description
|
||||||
* @usage
|
* @usage
|
||||||
* This plug-in exposes card.io credit card scanning.
|
* This plug-in exposes card.io credit card scanning.
|
||||||
*
|
*
|
||||||
* **NOTE**: If you would like to actually process a credit card charge, you might be interested in the [PayPal Cordova Plug-in](https://github.com/paypal/PayPal-Cordova-Plugin).
|
* **NOTE**: If you would like to actually process a credit card charge, you might be interested in the [PayPal Cordova Plug-in](https://github.com/paypal/PayPal-Cordova-Plugin).
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `card.io.cordova.mobilesdk`. For more info, please see the [Card IO plugin docs](https://github.com/card-io/card.io-Cordova-Plugin).
|
* Requires Cordova plugin: `card.io.cordova.mobilesdk`. For more info, please see the [Card IO plugin docs](https://github.com/card-io/card.io-Cordova-Plugin).
|
||||||
*
|
*
|
||||||
* Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the <your app name>Info.plist file. Add the following lines in the main <dict> element.
|
* Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the <your app name>Info.plist file. Add the following lines in the main <dict> element.
|
||||||
* ```xml
|
* ```xml
|
||||||
*<key>NSCameraUsageDescription</key>
|
* <key>NSCameraUsageDescription</key>
|
||||||
*<string>To scan credit cards.</string>
|
* <string>To scan credit cards.</string>
|
||||||
*```
|
* ```
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CardIO } from '@ionic-native/card-io';
|
* import { CardIO } from '@ionic-native/card-io';
|
||||||
*
|
*
|
||||||
|
@ -11,7 +11,7 @@ declare var clevertap: any;
|
|||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CleverTap } from '@ionic-native/clevertap';
|
* import { CleverTap } from '@ionic-native/clevertap';
|
||||||
|
*
|
||||||
* constructor(private clevertap: CleverTap) { }
|
* constructor(private clevertap: CleverTap) { }
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
|
@ -25,7 +25,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* alert('Error: ' + reject);
|
* alert('Error: ' + reject);
|
||||||
* }
|
* }
|
||||||
* );
|
* );
|
||||||
*
|
*
|
||||||
* this.clipboard.clear();
|
* this.clipboard.clear();
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@ -38,27 +38,31 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Clipboard extends IonicNativePlugin {
|
export class Clipboard extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the given text
|
* Copies the given text
|
||||||
* @param {string} text Text that gets copied on the system clipboard
|
* @param {string} text Text that gets copied on the system clipboard
|
||||||
* @returns {Promise<any>} Returns a promise after the text has been copied
|
* @returns {Promise<any>} Returns a promise after the text has been copied
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
copy(text: string): Promise<any> { return; }
|
copy(text: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pastes the text stored in clipboard
|
* Pastes the text stored in clipboard
|
||||||
* @returns {Promise<any>} Returns a promise after the text has been pasted
|
* @returns {Promise<any>} Returns a promise after the text has been pasted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
paste(): Promise<any> { return; }
|
paste(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the text stored in clipboard
|
* Clear the text stored in clipboard
|
||||||
* @returns {Promise<any>} Returns a promise after the text has been cleaned
|
* @returns {Promise<any>} Returns a promise after the text has been cleaned
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
clear(): Promise<any> { return; }
|
clear(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,15 +152,9 @@ interface NativeUpdateNotification {
|
|||||||
appVersion: string;
|
appVersion: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Callback<T> {
|
export type Callback<T> = (error: Error, parameter: T) => void;
|
||||||
(error: Error, parameter: T): void;
|
export type SuccessCallback<T> = (result?: T) => void;
|
||||||
}
|
export type ErrorCallback = (error?: Error) => void;
|
||||||
export interface SuccessCallback<T> {
|
|
||||||
(result?: T): void;
|
|
||||||
}
|
|
||||||
export interface ErrorCallback {
|
|
||||||
(error?: Error): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Configuration {
|
interface Configuration {
|
||||||
appVersion: string;
|
appVersion: string;
|
||||||
@ -177,18 +171,18 @@ declare class AcquisitionStatus {
|
|||||||
|
|
||||||
declare class AcquisitionManager {
|
declare class AcquisitionManager {
|
||||||
constructor(httpRequester: Http.Requester, configuration: Configuration);
|
constructor(httpRequester: Http.Requester, configuration: Configuration);
|
||||||
public queryUpdateWithCurrentPackage(
|
queryUpdateWithCurrentPackage(
|
||||||
currentPackage: IPackage,
|
currentPackage: IPackage,
|
||||||
callback?: Callback<IRemotePackage | NativeUpdateNotification>
|
callback?: Callback<IRemotePackage | NativeUpdateNotification>
|
||||||
): void;
|
): void;
|
||||||
public reportStatusDeploy(
|
reportStatusDeploy(
|
||||||
pkg?: IPackage,
|
pkg?: IPackage,
|
||||||
status?: string,
|
status?: string,
|
||||||
previousLabelOrAppVersion?: string,
|
previousLabelOrAppVersion?: string,
|
||||||
previousDeploymentKey?: string,
|
previousDeploymentKey?: string,
|
||||||
callback?: Callback<void>
|
callback?: Callback<void>
|
||||||
): void;
|
): void;
|
||||||
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface CodePushCordovaPlugin {
|
interface CodePushCordovaPlugin {
|
||||||
|
@ -117,8 +117,8 @@ export class Contact implements IContactProperties {
|
|||||||
|
|
||||||
@InstanceCheck()
|
@InstanceCheck()
|
||||||
clone(): Contact {
|
clone(): Contact {
|
||||||
let newContact: any = new Contact();
|
const newContact: any = new Contact();
|
||||||
for (let prop in this) {
|
for (const prop in this) {
|
||||||
if (prop === 'id') return;
|
if (prop === 'id') return;
|
||||||
newContact[prop] = this[prop];
|
newContact[prop] = this[prop];
|
||||||
}
|
}
|
||||||
@ -403,8 +403,8 @@ export class Contacts extends IonicNativePlugin {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
function processContact(contact: any) {
|
function processContact(contact: any) {
|
||||||
let newContact = new Contact();
|
const newContact = new Contact();
|
||||||
for (let prop in contact) {
|
for (const prop in contact) {
|
||||||
if (typeof contact[prop] === 'function') continue;
|
if (typeof contact[prop] === 'function') continue;
|
||||||
newContact[prop] = contact[prop];
|
newContact[prop] = contact[prop];
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Couchbase Lite
|
* @name Couchbase Lite
|
||||||
* @description
|
* @description
|
||||||
@ -66,8 +65,8 @@ import { Injectable } from '@angular/core';
|
|||||||
* .catch((error:any) => {
|
* .catch((error:any) => {
|
||||||
* return Observable.throw(error.json() || 'Couchbase Lite error');
|
* return Observable.throw(error.json() || 'Couchbase Lite error');
|
||||||
* }) .
|
* }) .
|
||||||
* }
|
* }
|
||||||
* createDocument(database_name:string,document){
|
* createDocument(database_name:string,document){
|
||||||
* let url = this.getUrl();
|
* let url = this.getUrl();
|
||||||
* url = url + database_name;
|
* url = url + database_name;
|
||||||
* return this._http
|
* return this._http
|
||||||
@ -84,9 +83,9 @@ import { Injectable } from '@angular/core';
|
|||||||
* createDocument('justbe', document);
|
* createDocument('justbe', document);
|
||||||
* // successful response
|
* // successful response
|
||||||
* { "id": "string","rev": "string","ok": true }
|
* { "id": "string","rev": "string","ok": true }
|
||||||
* updateDocument(database_name:string,document){
|
* updateDocument(database_name:string,document){
|
||||||
* let url = this.getUrl();
|
* let url = this.getUrl();
|
||||||
* url = url + database_name + '/' + document._id;
|
* url = url + database_name + '/' + document._id;
|
||||||
* return this._http
|
* return this._http
|
||||||
* .put(url,document)
|
* .put(url,document)
|
||||||
* .map(data => { this.results = data['results'] })
|
* .map(data => { this.results = data['results'] })
|
||||||
@ -121,7 +120,6 @@ import { Injectable } from '@angular/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CouchbaseLite extends IonicNativePlugin {
|
export class CouchbaseLite extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the database url
|
* Get the database url
|
||||||
* @return {Promise<any>} Returns a promise that resolves with the local database url
|
* @return {Promise<any>} Returns a promise that resolves with the local database url
|
||||||
@ -129,6 +127,7 @@ export class CouchbaseLite extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackStyle: 'node'
|
callbackStyle: 'node'
|
||||||
})
|
})
|
||||||
getURL(): Promise<any> { return; }
|
getURL(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ export class Deeplinks extends IonicNativePlugin {
|
|||||||
* promise result which you can then use to navigate in the app as you see fit.
|
* promise result which you can then use to navigate in the app as you see fit.
|
||||||
*
|
*
|
||||||
* @param {Object} paths
|
* @param {Object} paths
|
||||||
*
|
*
|
||||||
* @param {DeeplinkOptions} options
|
* @param {DeeplinkOptions} options
|
||||||
*
|
*
|
||||||
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
|
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {
|
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
Cordova,
|
|
||||||
CordovaProperty,
|
|
||||||
IonicNativePlugin,
|
|
||||||
Plugin
|
|
||||||
} from '@ionic-native/core';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Diagnostic
|
* @name Diagnostic
|
||||||
|
@ -15,17 +15,17 @@ export interface EmailComposerOptions {
|
|||||||
/**
|
/**
|
||||||
* Email address(es) for To field
|
* Email address(es) for To field
|
||||||
*/
|
*/
|
||||||
to?: string | Array<string>;
|
to?: string | string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email address(es) for CC field
|
* Email address(es) for CC field
|
||||||
*/
|
*/
|
||||||
cc?: string | Array<string>;
|
cc?: string | string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email address(es) for BCC field
|
* Email address(es) for BCC field
|
||||||
*/
|
*/
|
||||||
bcc?: string | Array<string>;
|
bcc?: string | string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File paths or base64 data streams
|
* File paths or base64 data streams
|
||||||
|
@ -6,7 +6,7 @@ export interface IOSFilePickerPosition {
|
|||||||
y: number;
|
y: number;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name iOS File Picker
|
* @name iOS File Picker
|
||||||
|
@ -152,7 +152,7 @@ export interface FileTransferError {
|
|||||||
* // error
|
* // error
|
||||||
* })
|
* })
|
||||||
* }
|
* }
|
||||||
**
|
*
|
||||||
* download() {
|
* download() {
|
||||||
* const url = 'http://www.example.com/file.pdf';
|
* const url = 'http://www.example.com/file.pdf';
|
||||||
* fileTransfer.download(url, this.file.dataDirectory + 'file.pdf').then((entry) => {
|
* fileTransfer.download(url, this.file.dataDirectory + 'file.pdf').then((entry) => {
|
||||||
|
@ -371,84 +371,52 @@ export interface FileEntry extends Entry {
|
|||||||
/**
|
/**
|
||||||
* When requestFileSystem() succeeds, the following callback is made.
|
* When requestFileSystem() succeeds, the following callback is made.
|
||||||
*/
|
*/
|
||||||
export interface FileSystemCallback {
|
export type FileSystemCallback = (filesystem: FileSystem) => void;
|
||||||
/**
|
|
||||||
* @param filesystem The file systems to which the app is granted access.
|
|
||||||
*/
|
|
||||||
(filesystem: FileSystem): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the callback used to look up Entry objects.
|
* This export interface is the callback used to look up Entry objects.
|
||||||
*/
|
*/
|
||||||
export interface EntryCallback {
|
export type EntryCallback = (entry: Entry) => void;
|
||||||
/**
|
|
||||||
* @param entry
|
|
||||||
*/
|
|
||||||
(entry: Entry): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the callback used to look up FileEntry objects.
|
* This export interface is the callback used to look up FileEntry objects.
|
||||||
*/
|
*/
|
||||||
export interface FileEntryCallback {
|
export type FileEntryCallback = (entry: FileEntry) => void;
|
||||||
/**
|
|
||||||
* @param entry
|
|
||||||
*/
|
|
||||||
(entry: FileEntry): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the callback used to look up DirectoryEntry objects.
|
* This export interface is the callback used to look up DirectoryEntry objects.
|
||||||
*/
|
*/
|
||||||
export interface DirectoryEntryCallback {
|
export type DirectoryEntryCallback = (entry: DirectoryEntry) => void;
|
||||||
/**
|
|
||||||
* @param entry
|
|
||||||
*/
|
|
||||||
(entry: DirectoryEntry): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When readEntries() succeeds, the following callback is made.
|
* When readEntries() succeeds, the following callback is made.
|
||||||
*/
|
*/
|
||||||
export interface EntriesCallback {
|
export type EntriesCallback = (entries: Entry[]) => void;
|
||||||
(entries: Entry[]): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the callback used to look up file and directory metadata.
|
* This export interface is the callback used to look up file and directory metadata.
|
||||||
*/
|
*/
|
||||||
export interface MetadataCallback {
|
export type MetadataCallback = (metadata: Metadata) => void;
|
||||||
(metadata: Metadata): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the callback used to create a FileWriter.
|
* This export interface is the callback used to create a FileWriter.
|
||||||
*/
|
*/
|
||||||
export interface FileWriterCallback {
|
export type FileWriterCallback = (fileWriter: FileWriter) => void;
|
||||||
(fileWriter: FileWriter): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the callback used to obtain a File.
|
* This export interface is the callback used to obtain a File.
|
||||||
*/
|
*/
|
||||||
export interface FileCallback {
|
export type FileCallback = (file: IFile) => void;
|
||||||
(file: IFile): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This export interface is the generic callback used to indicate success of an asynchronous method.
|
* This export interface is the generic callback used to indicate success of an asynchronous method.
|
||||||
*/
|
*/
|
||||||
export interface VoidCallback {
|
export type VoidCallback = () => void;
|
||||||
(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When an error occurs, the following callback is made.
|
* When an error occurs, the following callback is made.
|
||||||
*/
|
*/
|
||||||
export interface ErrorCallback {
|
export type ErrorCallback = (err: FileError) => void;
|
||||||
(err: FileError): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemoveResult {
|
export interface RemoveResult {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
@ -681,63 +649,75 @@ export class File extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Read-only directory where the application is installed.
|
* Read-only directory where the application is installed.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty applicationDirectory: string;
|
@CordovaProperty
|
||||||
|
applicationDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read-only directory where the application is installed.
|
* Read-only directory where the application is installed.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty applicationStorageDirectory: string;
|
@CordovaProperty
|
||||||
|
applicationStorageDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Where to put app-specific data files.
|
* Where to put app-specific data files.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty dataDirectory: string;
|
@CordovaProperty
|
||||||
|
dataDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cached files that should survive app restarts.
|
* Cached files that should survive app restarts.
|
||||||
* Apps should not rely on the OS to delete files in here.
|
* Apps should not rely on the OS to delete files in here.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty cacheDirectory: string;
|
@CordovaProperty
|
||||||
|
cacheDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android: the application space on external storage.
|
* Android: the application space on external storage.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty externalApplicationStorageDirectory: string;
|
@CordovaProperty
|
||||||
|
externalApplicationStorageDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android: Where to put app-specific data files on external storage.
|
* Android: Where to put app-specific data files on external storage.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty externalDataDirectory: string;
|
@CordovaProperty
|
||||||
|
externalDataDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android: the application cache on external storage.
|
* Android: the application cache on external storage.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty externalCacheDirectory: string;
|
@CordovaProperty
|
||||||
|
externalCacheDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android: the external storage (SD card) root.
|
* Android: the external storage (SD card) root.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty externalRootDirectory: string;
|
@CordovaProperty
|
||||||
|
externalRootDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS: Temp directory that the OS can clear at will.
|
* iOS: Temp directory that the OS can clear at will.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty tempDirectory: string;
|
@CordovaProperty
|
||||||
|
tempDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS: Holds app-specific files that should be synced (e.g. to iCloud).
|
* iOS: Holds app-specific files that should be synced (e.g. to iCloud).
|
||||||
*/
|
*/
|
||||||
@CordovaProperty syncedDataDirectory: string;
|
@CordovaProperty
|
||||||
|
syncedDataDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files)
|
* iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files)
|
||||||
*/
|
*/
|
||||||
@CordovaProperty documentsDirectory: string;
|
@CordovaProperty
|
||||||
|
documentsDirectory: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BlackBerry10: Files globally available to all apps
|
* BlackBerry10: Files globally available to all apps
|
||||||
*/
|
*/
|
||||||
@CordovaProperty sharedDirectory: string;
|
@CordovaProperty
|
||||||
|
sharedDirectory: string;
|
||||||
|
|
||||||
cordovaFileError: any = {
|
cordovaFileError: any = {
|
||||||
1: 'NOT_FOUND_ERR',
|
1: 'NOT_FOUND_ERR',
|
||||||
@ -777,7 +757,7 @@ export class File extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
checkDir(path: string, dir: string): Promise<boolean> {
|
checkDir(path: string, dir: string): Promise<boolean> {
|
||||||
if (/^\//.test(dir)) {
|
if (/^\//.test(dir)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -805,12 +785,12 @@ export class File extends IonicNativePlugin {
|
|||||||
replace: boolean
|
replace: boolean
|
||||||
): Promise<DirectoryEntry> {
|
): Promise<DirectoryEntry> {
|
||||||
if (/^\//.test(dirName)) {
|
if (/^\//.test(dirName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
let options: Flags = {
|
const options: Flags = {
|
||||||
create: true
|
create: true
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -833,7 +813,7 @@ export class File extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
removeDir(path: string, dirName: string): Promise<RemoveResult> {
|
removeDir(path: string, dirName: string): Promise<RemoveResult> {
|
||||||
if (/^\//.test(dirName)) {
|
if (/^\//.test(dirName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -866,7 +846,7 @@ export class File extends IonicNativePlugin {
|
|||||||
newDirName = newDirName || dirName;
|
newDirName = newDirName || dirName;
|
||||||
|
|
||||||
if (/^\//.test(newDirName)) {
|
if (/^\//.test(newDirName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -899,7 +879,7 @@ export class File extends IonicNativePlugin {
|
|||||||
newDirName: string
|
newDirName: string
|
||||||
): Promise<Entry> {
|
): Promise<Entry> {
|
||||||
if (/^\//.test(newDirName)) {
|
if (/^\//.test(newDirName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -925,7 +905,7 @@ export class File extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
listDir(path: string, dirName: string): Promise<Entry[]> {
|
listDir(path: string, dirName: string): Promise<Entry[]> {
|
||||||
if (/^\//.test(dirName)) {
|
if (/^\//.test(dirName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<Entry[]>(err);
|
return Promise.reject<Entry[]>(err);
|
||||||
}
|
}
|
||||||
@ -938,7 +918,7 @@ export class File extends IonicNativePlugin {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then(de => {
|
.then(de => {
|
||||||
let reader = de.createReader();
|
const reader = de.createReader();
|
||||||
return this.readEntries(reader);
|
return this.readEntries(reader);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -953,7 +933,7 @@ export class File extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
removeRecursively(path: string, dirName: string): Promise<RemoveResult> {
|
removeRecursively(path: string, dirName: string): Promise<RemoveResult> {
|
||||||
if (/^\//.test(dirName)) {
|
if (/^\//.test(dirName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'directory cannot start with /';
|
err.message = 'directory cannot start with /';
|
||||||
return Promise.reject<RemoveResult>(err);
|
return Promise.reject<RemoveResult>(err);
|
||||||
}
|
}
|
||||||
@ -977,7 +957,7 @@ export class File extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
checkFile(path: string, file: string): Promise<boolean> {
|
checkFile(path: string, file: string): Promise<boolean> {
|
||||||
if (/^\//.test(file)) {
|
if (/^\//.test(file)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file cannot start with /';
|
err.message = 'file cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -986,7 +966,7 @@ export class File extends IonicNativePlugin {
|
|||||||
if (fse.isFile) {
|
if (fse.isFile) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
let err = new FileError(13);
|
const err = new FileError(13);
|
||||||
err.message = 'input is not a file';
|
err.message = 'input is not a file';
|
||||||
return Promise.reject<boolean>(err);
|
return Promise.reject<boolean>(err);
|
||||||
}
|
}
|
||||||
@ -1010,12 +990,12 @@ export class File extends IonicNativePlugin {
|
|||||||
replace: boolean
|
replace: boolean
|
||||||
): Promise<FileEntry> {
|
): Promise<FileEntry> {
|
||||||
if (/^\//.test(fileName)) {
|
if (/^\//.test(fileName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file-name cannot start with /';
|
err.message = 'file-name cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
let options: Flags = {
|
const options: Flags = {
|
||||||
create: true
|
create: true
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1038,7 +1018,7 @@ export class File extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
removeFile(path: string, fileName: string): Promise<RemoveResult> {
|
removeFile(path: string, fileName: string): Promise<RemoveResult> {
|
||||||
if (/^\//.test(fileName)) {
|
if (/^\//.test(fileName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file-name cannot start with /';
|
err.message = 'file-name cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -1052,8 +1032,8 @@ export class File extends IonicNativePlugin {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Write a new file to the desired location.
|
/**
|
||||||
*
|
* Write a new file to the desired location.
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} fileName path relative to base path
|
* @param {string} fileName path relative to base path
|
||||||
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
||||||
@ -1087,8 +1067,8 @@ export class File extends IonicNativePlugin {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Write content to FileEntry.
|
/**
|
||||||
*
|
* Write content to FileEntry.
|
||||||
* @hidden
|
* @hidden
|
||||||
* @param {FileEntry} fe file entry object
|
* @param {FileEntry} fe file entry object
|
||||||
* @param {string | Blob} text content or blob to write
|
* @param {string | Blob} text content or blob to write
|
||||||
@ -1115,8 +1095,8 @@ export class File extends IonicNativePlugin {
|
|||||||
.then(() => fe);
|
.then(() => fe);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Write to an existing file.
|
/**
|
||||||
*
|
* Write to an existing file.
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} fileName path relative to base path
|
* @param {string} fileName path relative to base path
|
||||||
* @param {string | Blob} text content or blob to write
|
* @param {string | Blob} text content or blob to write
|
||||||
@ -1147,7 +1127,7 @@ export class File extends IonicNativePlugin {
|
|||||||
* Read file and return data as a base64 encoded data url.
|
* Read file and return data as a base64 encoded data url.
|
||||||
* A data url is of the form:
|
* A data url is of the form:
|
||||||
* data: [<mediatype>][;base64],<data>
|
* data: [<mediatype>][;base64],<data>
|
||||||
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} file Name of file, relative to path.
|
* @param {string} file Name of file, relative to path.
|
||||||
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as data URL or rejects with an error.
|
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as data URL or rejects with an error.
|
||||||
@ -1185,7 +1165,7 @@ export class File extends IonicNativePlugin {
|
|||||||
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
|
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
|
||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
if (/^\//.test(file)) {
|
if (/^\//.test(file)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file-name cannot start with /';
|
err.message = 'file-name cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -1199,7 +1179,7 @@ export class File extends IonicNativePlugin {
|
|||||||
return new Promise<T>((resolve, reject) => {
|
return new Promise<T>((resolve, reject) => {
|
||||||
reader.onloadend = () => {
|
reader.onloadend = () => {
|
||||||
if (reader.result !== undefined || reader.result !== null) {
|
if (reader.result !== undefined || reader.result !== null) {
|
||||||
resolve(<T>(<any>reader.result));
|
resolve((reader.result as any) as T);
|
||||||
} else if (reader.error !== undefined || reader.error !== null) {
|
} else if (reader.error !== undefined || reader.error !== null) {
|
||||||
reject(reader.error);
|
reject(reader.error);
|
||||||
} else {
|
} else {
|
||||||
@ -1238,7 +1218,7 @@ export class File extends IonicNativePlugin {
|
|||||||
newFileName = newFileName || fileName;
|
newFileName = newFileName || fileName;
|
||||||
|
|
||||||
if (/^\//.test(newFileName)) {
|
if (/^\//.test(newFileName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file name cannot start with /';
|
err.message = 'file name cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -1273,7 +1253,7 @@ export class File extends IonicNativePlugin {
|
|||||||
newFileName = newFileName || fileName;
|
newFileName = newFileName || fileName;
|
||||||
|
|
||||||
if (/^\//.test(newFileName)) {
|
if (/^\//.test(newFileName)) {
|
||||||
let err = new FileError(5);
|
const err = new FileError(5);
|
||||||
err.message = 'file name cannot start with /';
|
err.message = 'file name cannot start with /';
|
||||||
return Promise.reject<any>(err);
|
return Promise.reject<any>(err);
|
||||||
}
|
}
|
||||||
@ -1333,7 +1313,7 @@ export class File extends IonicNativePlugin {
|
|||||||
resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
|
resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
|
||||||
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
|
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
|
||||||
if (de.isDirectory) {
|
if (de.isDirectory) {
|
||||||
return <DirectoryEntry>de;
|
return de as DirectoryEntry;
|
||||||
} else {
|
} else {
|
||||||
const err = new FileError(13);
|
const err = new FileError(13);
|
||||||
err.message = 'input is not a directory';
|
err.message = 'input is not a directory';
|
||||||
|
@ -21,7 +21,7 @@ export interface IDynamicLink {
|
|||||||
* Preferences GoogleIOSClientId and GoogleAndroidClientId are used to setup dynamic links when you have an app for several platforms.
|
* Preferences GoogleIOSClientId and GoogleAndroidClientId are used to setup dynamic links when you have an app for several platforms.
|
||||||
* You can find values at your GoogleService-Info.plist (key ANDROID_CLIENT_ID) and google-services.json (key client[0].oauth_client[0].client_id).
|
* You can find values at your GoogleService-Info.plist (key ANDROID_CLIENT_ID) and google-services.json (key client[0].oauth_client[0].client_id).
|
||||||
*
|
*
|
||||||
*config.xml:
|
* config.xml:
|
||||||
* ```xml
|
* ```xml
|
||||||
* <platform name="ios">
|
* <platform name="ios">
|
||||||
* <preference name="GoogleIOSClientId" value="..." />
|
* <preference name="GoogleIOSClientId" value="..." />
|
||||||
|
@ -320,7 +320,7 @@ export class Firebase extends IonicNativePlugin {
|
|||||||
})
|
})
|
||||||
verifyPhoneNumber(
|
verifyPhoneNumber(
|
||||||
phoneNumber: string,
|
phoneNumber: string,
|
||||||
timeoutDuration: number = 0
|
timeoutDuration = 0
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @return {Observable<any>}
|
* @return {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaFunctionOverride()
|
@CordovaFunctionOverride()
|
||||||
onTransitionReceived(): Observable<any> { return; };
|
onTransitionReceived(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
|
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
|
||||||
@ -104,7 +104,7 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
initialize(): Promise<void> { return; };
|
initialize(): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new geofence or array of geofences. For geofence object, see above.
|
* Adds a new geofence or array of geofences. For geofence object, see above.
|
||||||
@ -112,7 +112,7 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addOrUpdate(geofences: Object | Array<Object>): Promise<void> { return; };
|
addOrUpdate(geofences: Object | Object[]): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
|
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
|
||||||
@ -121,7 +121,7 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
remove(geofenceId: string | Array<string>): Promise<void> { return; };
|
remove(geofenceId: string | string[]): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all geofences.
|
* Removes all geofences.
|
||||||
@ -129,7 +129,7 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
removeAll(): Promise<void> { return; };
|
removeAll(): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of geofences currently being monitored.
|
* Returns an array of geofences currently being monitored.
|
||||||
@ -137,7 +137,7 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<string>>}
|
* @returns {Promise<Array<string>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getWatched(): Promise<string> { return; };
|
getWatched(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the user clicks a geofence notification. iOS and Android only.
|
* Called when the user clicks a geofence notification. iOS and Android only.
|
||||||
|
@ -5,7 +5,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
declare const navigator: any;
|
declare const navigator: any;
|
||||||
|
|
||||||
export interface Coordinates {
|
export interface Coordinates {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a double representing the position's latitude in decimal degrees.
|
* a double representing the position's latitude in decimal degrees.
|
||||||
*/
|
*/
|
||||||
@ -49,7 +48,6 @@ export interface Coordinates {
|
|||||||
* This value can be null.
|
* This value can be null.
|
||||||
*/
|
*/
|
||||||
speed: number;
|
speed: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Geoposition {
|
export interface Geoposition {
|
||||||
@ -65,7 +63,6 @@ export interface Geoposition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface PositionError {
|
export interface PositionError {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A code that indicates the error that occurred
|
* A code that indicates the error that occurred
|
||||||
*/
|
*/
|
||||||
@ -75,11 +72,9 @@ export interface PositionError {
|
|||||||
* A message that can describe the error that occurred
|
* A message that can describe the error that occurred
|
||||||
*/
|
*/
|
||||||
message: string;
|
message: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GeolocationOptions {
|
export interface GeolocationOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is a positive long value indicating the maximum age in milliseconds of a
|
* Is a positive long value indicating the maximum age in milliseconds of a
|
||||||
* possible cached position that is acceptable to return. If set to 0, it
|
* possible cached position that is acceptable to return. If set to 0, it
|
||||||
@ -107,7 +102,6 @@ export interface GeolocationOptions {
|
|||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
enableHighAccuracy?: boolean;
|
enableHighAccuracy?: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -161,13 +155,13 @@ export interface GeolocationOptions {
|
|||||||
plugin: 'cordova-plugin-geolocation',
|
plugin: 'cordova-plugin-geolocation',
|
||||||
pluginRef: 'navigator.geolocation',
|
pluginRef: 'navigator.geolocation',
|
||||||
repo: 'https://github.com/apache/cordova-plugin-geolocation',
|
repo: 'https://github.com/apache/cordova-plugin-geolocation',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
|
||||||
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
|
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
|
||||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Geolocation extends IonicNativePlugin {
|
export class Geolocation extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the device's current position.
|
* Get the device's current position.
|
||||||
*
|
*
|
||||||
@ -177,7 +171,9 @@ export class Geolocation extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
|
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the current device's position. Clear the watch by unsubscribing from
|
* Watch the current device's position. Clear the watch by unsubscribing from
|
||||||
@ -198,12 +194,13 @@ export class Geolocation extends IonicNativePlugin {
|
|||||||
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||||
*/
|
*/
|
||||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||||
return new Observable<Geoposition>(
|
return new Observable<Geoposition>((observer: any) => {
|
||||||
(observer: any) => {
|
const watchId = navigator.geolocation.watchPosition(
|
||||||
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);
|
observer.next.bind(observer),
|
||||||
return () => navigator.geolocation.clearWatch(watchId);
|
observer.next.bind(observer),
|
||||||
}
|
options
|
||||||
);
|
);
|
||||||
|
return () => navigator.geolocation.clearWatch(watchId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class Globalization extends IonicNativePlugin {
|
|||||||
getDateNames(options: {
|
getDateNames(options: {
|
||||||
type: string;
|
type: string;
|
||||||
item: string;
|
item: string;
|
||||||
}): Promise<{ value: Array<string> }> {
|
}): Promise<{ value: string[] }> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* this.ga.startTrackerWithId('YOUR_TRACKER_ID')
|
* this.ga.startTrackerWithId('YOUR_TRACKER_ID')
|
||||||
* .then(() => {
|
* .then(() => {
|
||||||
* console.log('Google analytics is ready now');
|
* console.log('Google analytics is ready now');
|
||||||
this.ga.trackView('test');
|
* this.ga.trackView('test');
|
||||||
* // Tracker is ready
|
* // Tracker is ready
|
||||||
* // You can now track pages or set additional information such as AppVersion or UserId
|
* // You can now track pages or set additional information such as AppVersion or UserId
|
||||||
* })
|
* })
|
||||||
|
@ -17,7 +17,7 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
* this.googleNearby.publish('Hello')
|
* this.googleNearby.publish('Hello')
|
||||||
* .then((res: any) => console.log(res))
|
* .then((res: any) => console.log(res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
* this.googleNearby.subscribe()
|
* this.googleNearby.subscribe()
|
||||||
* .then((res: any) => console.log(res))
|
* .then((res: any) => console.log(res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
@ -28,13 +28,13 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
plugin: 'cordova-plugin-google-nearby',
|
plugin: 'cordova-plugin-google-nearby',
|
||||||
pluginRef: 'window.nearby',
|
pluginRef: 'window.nearby',
|
||||||
repo: 'https://github.com/hahahannes/cordova-plugin-google-nearby',
|
repo: 'https://github.com/hahahannes/cordova-plugin-google-nearby',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-google-nearby --variable API_KEY="123456789"',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-google-nearby --variable API_KEY="123456789"',
|
||||||
installVariables: ['API_KEY'],
|
installVariables: ['API_KEY'],
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GoogleNearby extends IonicNativePlugin {
|
export class GoogleNearby extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Publish a message
|
* Publish a message
|
||||||
* @param message {string} Message to publish
|
* @param message {string} Message to publish
|
||||||
@ -45,9 +45,9 @@ export class GoogleNearby extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to recieve messages
|
* Subscribe to receive messages
|
||||||
* @return {Observable<any>} Returns an observable that emits recieved messages
|
* @return {Observable<any>} Returns an observable that emits received messages
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
|
@ -67,10 +67,10 @@ export interface Player {
|
|||||||
* The title of the player based on their gameplay activity. Not
|
* The title of the player based on their gameplay activity. Not
|
||||||
* all players have this and it may change over time.
|
* all players have this and it may change over time.
|
||||||
*/
|
*/
|
||||||
title: string|null;
|
title: string | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the URI for loading this player's icon-size profile image.
|
* Retrieves the URI for loading this player's icon-size profile image.
|
||||||
* Returns null if the player has no profile image.
|
* Returns null if the player has no profile image.
|
||||||
*/
|
*/
|
||||||
iconImageUrl: string;
|
iconImageUrl: string;
|
||||||
@ -101,12 +101,12 @@ export interface Player {
|
|||||||
* this.googlePlayGamesServices.auth()
|
* this.googlePlayGamesServices.auth()
|
||||||
* .then(() => console.log('Logged in to Play Games Services'))
|
* .then(() => console.log('Logged in to Play Games Services'))
|
||||||
* .catch(e) => console.log('Error logging in Play Games Services', e);
|
* .catch(e) => console.log('Error logging in Play Games Services', e);
|
||||||
*
|
*
|
||||||
* // Sign out of Play Games Services.
|
* // Sign out of Play Games Services.
|
||||||
* this.googlePlayGamesServices.signOut()
|
* this.googlePlayGamesServices.signOut()
|
||||||
* .then(() => console.log('Logged out of Play Games Services'))
|
* .then(() => console.log('Logged out of Play Games Services'))
|
||||||
* .catch(e => console.log('Error logging out of Play Games Services', e);
|
* .catch(e => console.log('Error logging out of Play Games Services', e);
|
||||||
*
|
*
|
||||||
* // Check auth status.
|
* // Check auth status.
|
||||||
* this.googlePlayGamesServices.isSignedIn()
|
* this.googlePlayGamesServices.isSignedIn()
|
||||||
* .then((signedIn: SignedInResponse) => {
|
* .then((signedIn: SignedInResponse) => {
|
||||||
@ -114,38 +114,38 @@ export interface Player {
|
|||||||
* hideLoginButton();
|
* hideLoginButton();
|
||||||
* }
|
* }
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* // Fetch currently authenticated user's data.
|
* // Fetch currently authenticated user's data.
|
||||||
* this.googlePlayGamesServices.showPlayer().then((data: Player) => {
|
* this.googlePlayGamesServices.showPlayer().then((data: Player) => {
|
||||||
* console.log('Player data', data);
|
* console.log('Player data', data);
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* // Submit a score.
|
* // Submit a score.
|
||||||
* this.googlePlayGamesServices.submitScore({
|
* this.googlePlayGamesServices.submitScore({
|
||||||
* score: 100,
|
* score: 100,
|
||||||
* leaderboardId: 'SomeLeaderboardId'
|
* leaderboardId: 'SomeLeaderboardId'
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* // Show the native leaderboards window.
|
* // Show the native leaderboards window.
|
||||||
* this.googlePlayGamesServices.showAllLeaderboards()
|
* this.googlePlayGamesServices.showAllLeaderboards()
|
||||||
* .then(() => console.log('The leaderboard window is visible.'));
|
* .then(() => console.log('The leaderboard window is visible.'));
|
||||||
*
|
*
|
||||||
* // Show a signle native leaderboard window.
|
* // Show a signle native leaderboard window.
|
||||||
* this.googlePlayGamesServices.showLeaderboard({
|
* this.googlePlayGamesServices.showLeaderboard({
|
||||||
* leaderboardId: 'SomeLeaderBoardId'
|
* leaderboardId: 'SomeLeaderBoardId'
|
||||||
* }).then(() => console.log('The leaderboard window is visible.'));
|
* }).then(() => console.log('The leaderboard window is visible.'));
|
||||||
*
|
*
|
||||||
* // Unlock an achievement.
|
* // Unlock an achievement.
|
||||||
* this.googlePlayGamesServices.unlockAchievement({
|
* this.googlePlayGamesServices.unlockAchievement({
|
||||||
* achievementId: 'SomeAchievementId'
|
* achievementId: 'SomeAchievementId'
|
||||||
* }).then(() => console.log('Achievement unlocked'));
|
* }).then(() => console.log('Achievement unlocked'));
|
||||||
*
|
*
|
||||||
* // Incremement an achievement.
|
* // Incremement an achievement.
|
||||||
* this.googlePlayGamesServices.incrementAchievement({
|
* this.googlePlayGamesServices.incrementAchievement({
|
||||||
* step: 1,
|
* step: 1,
|
||||||
* achievementId: 'SomeAchievementId'
|
* achievementId: 'SomeAchievementId'
|
||||||
* }).then(() => console.log('Achievement incremented'));
|
* }).then(() => console.log('Achievement incremented'));
|
||||||
*
|
*
|
||||||
* // Show the native achievements window.
|
* // Show the native achievements window.
|
||||||
* this.googlePlayGamesServices.showAchivements()
|
* this.googlePlayGamesServices.showAchivements()
|
||||||
* .then(() => console.log('The achievements window is visible.'));
|
* .then(() => console.log('The achievements window is visible.'));
|
||||||
@ -165,7 +165,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise native Play Games Service login procedure.
|
* Initialise native Play Games Service login procedure.
|
||||||
*
|
*
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the player
|
* @return {Promise<any>} Returns a promise that resolves when the player
|
||||||
* is authenticated with Play Games Services.
|
* is authenticated with Play Games Services.
|
||||||
*/
|
*/
|
||||||
@ -174,7 +174,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sign out of Google Play Games Services.
|
* Sign out of Google Play Games Services.
|
||||||
*
|
*
|
||||||
* @return {Promise<any>} Returns a promise that resolve when the player
|
* @return {Promise<any>} Returns a promise that resolve when the player
|
||||||
* successfully signs out.
|
* successfully signs out.
|
||||||
*/
|
*/
|
||||||
@ -183,7 +183,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the user is signed in.
|
* Check if the user is signed in.
|
||||||
*
|
*
|
||||||
* @return {Promise<SignedInResponse>} Returns a promise that resolves with
|
* @return {Promise<SignedInResponse>} Returns a promise that resolves with
|
||||||
* the signed in response.
|
* the signed in response.
|
||||||
*/
|
*/
|
||||||
@ -192,8 +192,8 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the currently authenticated player.
|
* Show the currently authenticated player.
|
||||||
*
|
*
|
||||||
* @return {Promise<Player>} Returns a promise that resolves when Play
|
* @return {Promise<Player>} Returns a promise that resolves when Play
|
||||||
* Games Services returns the authenticated player.
|
* Games Services returns the authenticated player.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -202,7 +202,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Submit a score to a leaderboard. You should ensure that you have a
|
* Submit a score to a leaderboard. You should ensure that you have a
|
||||||
* successful return from auth() before submitting a score.
|
* successful return from auth() before submitting a score.
|
||||||
*
|
*
|
||||||
* @param data {ScoreData} The score data you want to submit.
|
* @param data {ScoreData} The score data you want to submit.
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the
|
* @return {Promise<any>} Returns a promise that resolves when the
|
||||||
* score is submitted.
|
* score is submitted.
|
||||||
@ -213,7 +213,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Launches the native Play Games leaderboard view controller to show all the
|
* Launches the native Play Games leaderboard view controller to show all the
|
||||||
* leaderboards.
|
* leaderboards.
|
||||||
*
|
*
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the native
|
* @return {Promise<any>} Returns a promise that resolves when the native
|
||||||
* leaderboards window opens.
|
* leaderboards window opens.
|
||||||
*/
|
*/
|
||||||
@ -223,7 +223,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Launches the native Play Games leaderboard view controll to show the
|
* Launches the native Play Games leaderboard view controll to show the
|
||||||
* specified leaderboard.
|
* specified leaderboard.
|
||||||
*
|
*
|
||||||
* @param data {LeaderboardData} The leaderboard you want to show.
|
* @param data {LeaderboardData} The leaderboard you want to show.
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the native
|
* @return {Promise<any>} Returns a promise that resolves when the native
|
||||||
* leaderboard window opens.
|
* leaderboard window opens.
|
||||||
@ -233,7 +233,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlock an achievement.
|
* Unlock an achievement.
|
||||||
*
|
*
|
||||||
* @param data {AchievementData}
|
* @param data {AchievementData}
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the
|
* @return {Promise<any>} Returns a promise that resolves when the
|
||||||
* achievement is unlocked.
|
* achievement is unlocked.
|
||||||
@ -243,7 +243,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Increment an achievement.
|
* Increment an achievement.
|
||||||
*
|
*
|
||||||
* @param data {IncrementableAchievementData}
|
* @param data {IncrementableAchievementData}
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the
|
* @return {Promise<any>} Returns a promise that resolves when the
|
||||||
* achievement is incremented.
|
* achievement is incremented.
|
||||||
@ -254,7 +254,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Lauches the native Play Games achievements view controller to show
|
* Lauches the native Play Games achievements view controller to show
|
||||||
* achievements.
|
* achievements.
|
||||||
*
|
*
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the
|
* @return {Promise<any>} Returns a promise that resolves when the
|
||||||
* achievement window opens.
|
* achievement window opens.
|
||||||
*/
|
*/
|
||||||
|
@ -91,7 +91,7 @@ export class Gyroscope extends IonicNativePlugin {
|
|||||||
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
||||||
return new Observable<GyroscopeOrientation>(
|
return new Observable<GyroscopeOrientation>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
const watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||||
return () => navigator.gyroscope.clearWatch(watchId);
|
return () => navigator.gyroscope.clearWatch(watchId);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -45,7 +45,7 @@ export class HCE extends IonicNativePlugin {
|
|||||||
* Registers command receiver.
|
* Registers command receiver.
|
||||||
* @param onCommand {HCECommandEvent} The event handler.
|
* @param onCommand {HCECommandEvent} The event handler.
|
||||||
* @param fail {Function} Error event handler.
|
* @param fail {Function} Error event handler.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
registerCommandCallback(onCommand: HCECommandEvent, fail?: Function): void {
|
registerCommandCallback(onCommand: HCECommandEvent, fail?: Function): void {
|
||||||
@ -55,7 +55,7 @@ export class HCE extends IonicNativePlugin {
|
|||||||
* Registers Deactivated receiver.
|
* Registers Deactivated receiver.
|
||||||
* @param ok {HCEDeactivatedEvent} Success event handler.
|
* @param ok {HCEDeactivatedEvent} Success event handler.
|
||||||
* @param fail {Function} Error event handler.
|
* @param fail {Function} Error event handler.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
registerDeactivatedCallback(ok: HCEDeactivatedEvent, fail?: Function): void {
|
registerDeactivatedCallback(ok: HCEDeactivatedEvent, fail?: Function): void {
|
||||||
@ -68,7 +68,7 @@ export class HCE extends IonicNativePlugin {
|
|||||||
* @param response {Uint8Array} Response
|
* @param response {Uint8Array} Response
|
||||||
* @param success {string} Success Callback.
|
* @param success {string} Success Callback.
|
||||||
* @param success {string} Failure Callback.
|
* @param success {string} Failure Callback.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
sendResponse(response: Uint8Array, success?: Function, failure?: Function): void {
|
sendResponse(response: Uint8Array, success?: Function, failure?: Function): void {
|
||||||
@ -76,5 +76,5 @@ export class HCE extends IonicNativePlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HCECommandEvent { (command: Uint8Array): void; }
|
export type HCECommandEvent = (command: Uint8Array) => void;
|
||||||
export interface HCEDeactivatedEvent { (command: number): void; }
|
export type HCEDeactivatedEvent = (command: number) => void;
|
||||||
|
@ -6,13 +6,13 @@ import { Injectable } from '@angular/core';
|
|||||||
*/
|
*/
|
||||||
export interface HealthDataType {
|
export interface HealthDataType {
|
||||||
/**
|
/**
|
||||||
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||||
*/
|
*/
|
||||||
read?: string[];
|
read?: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||||
*/
|
*/
|
||||||
write?: string[];
|
write?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,6 @@ export interface HealthData {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Health extends IonicNativePlugin {
|
export class Health extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells if either Google Fit or HealthKit are available.
|
* Tells if either Google Fit or HealthKit are available.
|
||||||
*
|
*
|
||||||
@ -216,7 +215,9 @@ export class Health extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
isAvailable(): Promise<boolean> { return; }
|
isAvailable(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if recent Google Play Services and Google Fit are installed. If the play services are not installed,
|
* Checks if recent Google Play Services and Google Fit are installed. If the play services are not installed,
|
||||||
@ -232,7 +233,9 @@ export class Health extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
promptInstallFit(): Promise<any> { return; }
|
promptInstallFit(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests read and/or write access to a set of data types. It is recommendable to always explain why the app
|
* Requests read and/or write access to a set of data types. It is recommendable to always explain why the app
|
||||||
@ -254,7 +257,9 @@ export class Health extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> { return; }
|
requestAuthorization(datatypes: (string | HealthDataType)[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the app has authorization to read/write a set of datatypes.
|
* Check if the app has authorization to read/write a set of datatypes.
|
||||||
@ -268,7 +273,9 @@ export class Health extends IonicNativePlugin {
|
|||||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
|
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> { return; }
|
isAuthorized(datatypes: (string | HealthDataType)[]): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the data points of a certain data type within a certain time window.
|
* Gets all the data points of a certain data type within a certain time window.
|
||||||
@ -302,7 +309,9 @@ export class Health extends IonicNativePlugin {
|
|||||||
* @return {Promise<HealthData[]>}
|
* @return {Promise<HealthData[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> { return; }
|
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
|
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
|
||||||
@ -326,7 +335,11 @@ export class Health extends IonicNativePlugin {
|
|||||||
* @return {Promise<HealthData[]>}
|
* @return {Promise<HealthData[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> { return; }
|
queryAggregated(
|
||||||
|
queryOptionsAggregated: HealthQueryOptionsAggregated
|
||||||
|
): Promise<HealthData[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores a data point.
|
* Stores a data point.
|
||||||
@ -343,6 +356,7 @@ export class Health extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
store(storeOptions: HealthStoreOptions): Promise<any> { return; }
|
store(storeOptions: HealthStoreOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ export interface HotCodePushEventData {
|
|||||||
details?: {
|
details?: {
|
||||||
error?: HotCodePushError;
|
error?: HotCodePushError;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Hot Code Push
|
* @name Hot Code Push
|
||||||
|
@ -203,7 +203,7 @@ export class Hotspot extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<HotspotDevice>>}
|
* @returns {Promise<Array<HotspotDevice>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
|
getAllHotspotDevices(): Promise<HotspotDevice[]> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a WiFi network
|
* Connect to a WiFi network
|
||||||
@ -235,7 +235,7 @@ export class Hotspot extends IonicNativePlugin {
|
|||||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
|
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: string[]): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a WiFi network
|
* Add a WiFi network
|
||||||
@ -299,13 +299,13 @@ export class Hotspot extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<HotspotNetwork>>}
|
* @returns {Promise<Array<HotspotNetwork>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
scanWifi(): Promise<Array<HotspotNetwork>> { return; }
|
scanWifi(): Promise<HotspotNetwork[]> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Promise<Array<HotspotNetwork>>}
|
* @returns {Promise<Array<HotspotNetwork>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
scanWifiByLevel(): Promise<Array<HotspotNetwork>> { return; }
|
scanWifiByLevel(): Promise<HotspotNetwork[]> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
|
@ -56,7 +56,6 @@ export interface HttpdOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Httpd extends IonicNativePlugin {
|
export class Httpd extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a web server.
|
* Starts a web server.
|
||||||
* @param options {HttpdOptions}
|
* @param options {HttpdOptions}
|
||||||
@ -66,20 +65,25 @@ export class Httpd extends IonicNativePlugin {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stopServer'
|
clearFunction: 'stopServer'
|
||||||
})
|
})
|
||||||
startServer(options?: HttpdOptions): Observable<string> { return; }
|
startServer(options?: HttpdOptions): Observable<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the URL of the running server
|
* Gets the URL of the running server
|
||||||
* @returns {Promise<string>} Returns a promise that resolves with the URL of the web server.
|
* @returns {Promise<string>} Returns a promise that resolves with the URL of the web server.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getUrl(): Promise<string> { return; }
|
getUrl(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the local path of the running webserver
|
* Get the local path of the running webserver
|
||||||
* @returns {Promise<string>} Returns a promise that resolves with the local path of the web server.
|
* @returns {Promise<string>} Returns a promise that resolves with the local path of the web server.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getLocalPath(): Promise<string> { return; }
|
getLocalPath(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* this.hyperTrack.stopTracking().then(success => {
|
* this.hyperTrack.stopTracking().then(success => {
|
||||||
* // Handle success (String). Should be "OK".
|
* // Handle success (String). Should be "OK".
|
||||||
* }, error => {});
|
* }, error => {});
|
||||||
*
|
*
|
||||||
* }, error => {});*
|
* }, error => {});*
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
|
@ -296,12 +296,12 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
*/
|
*/
|
||||||
@CordovaCheck({ sync: true })
|
@CordovaCheck({ sync: true })
|
||||||
Delegate(): IBeaconDelegate {
|
Delegate(): IBeaconDelegate {
|
||||||
let delegate = new cordova.plugins.locationManager.Delegate();
|
const delegate = new cordova.plugins.locationManager.Delegate();
|
||||||
|
|
||||||
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
|
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.didChangeAuthorizationStatus = cb;
|
return delegate.didChangeAuthorizationStatus = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -310,7 +310,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.didDetermineStateForRegion = (pluginResult?: IBeaconPluginResult) => {
|
delegate.didDetermineStateForRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.didDetermineStateForRegion = cb;
|
return delegate.didDetermineStateForRegion = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -319,7 +319,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.didEnterRegion = (pluginResult?: IBeaconPluginResult) => {
|
delegate.didEnterRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.didEnterRegion = cb;
|
return delegate.didEnterRegion = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -328,7 +328,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.didExitRegion = (pluginResult?: IBeaconPluginResult) => {
|
delegate.didExitRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.didExitRegion = cb;
|
return delegate.didExitRegion = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -337,7 +337,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.didRangeBeaconsInRegion = (pluginResult?: IBeaconPluginResult) => {
|
delegate.didRangeBeaconsInRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.didRangeBeaconsInRegion = cb;
|
return delegate.didRangeBeaconsInRegion = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -346,7 +346,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.didStartMonitoringForRegion = (pluginResult?: IBeaconPluginResult) => {
|
delegate.didStartMonitoringForRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.didStartMonitoringForRegion = cb;
|
return delegate.didStartMonitoringForRegion = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -355,7 +355,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.monitoringDidFailForRegionWithError = (pluginResult?: IBeaconPluginResult) => {
|
delegate.monitoringDidFailForRegionWithError = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.monitoringDidFailForRegionWithError = cb;
|
return delegate.monitoringDidFailForRegionWithError = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -364,7 +364,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.peripheralManagerDidStartAdvertising = (pluginResult?: IBeaconPluginResult) => {
|
delegate.peripheralManagerDidStartAdvertising = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.peripheralManagerDidStartAdvertising = cb;
|
return delegate.peripheralManagerDidStartAdvertising = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -373,7 +373,7 @@ export class IBeacon extends IonicNativePlugin {
|
|||||||
delegate.peripheralManagerDidUpdateState = (pluginResult?: IBeaconPluginResult) => {
|
delegate.peripheralManagerDidUpdateState = (pluginResult?: IBeaconPluginResult) => {
|
||||||
return new Observable<IBeaconPluginResult>(
|
return new Observable<IBeaconPluginResult>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||||
return delegate.peripheralManagerDidUpdateState = cb;
|
return delegate.peripheralManagerDidUpdateState = cb;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,42 +1,47 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, CordovaInstance, InstanceCheck, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Plugin,
|
||||||
|
CordovaInstance,
|
||||||
|
InstanceCheck,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observer } from 'rxjs/Observer';
|
||||||
|
|
||||||
declare const cordova: Cordova & { InAppBrowser: any; };
|
declare const cordova: Cordova & { InAppBrowser: any };
|
||||||
|
|
||||||
export interface InAppBrowserOptions {
|
export interface InAppBrowserOptions {
|
||||||
/** Set to yes or no to turn the InAppBrowser's location bar on or off. */
|
/** Set to yes or no to turn the InAppBrowser's location bar on or off. */
|
||||||
location?: 'yes' | 'no';
|
location?: 'yes' | 'no';
|
||||||
/** Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
|
/* Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
|
||||||
* Omit or set to no (default) to have the browser open and load normally. */
|
* Omit or set to no (default) to have the browser open and load normally. */
|
||||||
hidden?: 'yes' | 'no';
|
hidden?: 'yes' | 'no';
|
||||||
/** Set to yes to have the browser's cookie cache cleared before the new window is opened. */
|
/** Set to yes to have the browser's cookie cache cleared before the new window is opened. */
|
||||||
clearcache?: 'yes';
|
clearcache?: 'yes';
|
||||||
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
|
/* Set to yes to have the session cookie cache cleared before the new window is opened. */
|
||||||
clearsessioncache?: 'yes';
|
clearsessioncache?: 'yes';
|
||||||
/** (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
|
/* (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
|
||||||
* (iOS) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
* (iOS) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
||||||
closebuttoncaption?: string;
|
closebuttoncaption?: string;
|
||||||
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
|
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
|
||||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default Done button's color. Only applicable if toolbar is not disabled. */
|
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default Done button's color. Only applicable if toolbar is not disabled. */
|
||||||
closebuttoncolor?: string;
|
closebuttoncolor?: string;
|
||||||
/** (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
|
/** (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
|
||||||
zoom?: 'yes' | 'no';
|
zoom?: 'yes' | 'no';
|
||||||
/** (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
|
/* (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
|
||||||
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser. */
|
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser. */
|
||||||
hardwareback?: 'yes' | 'no';
|
hardwareback?: 'yes' | 'no';
|
||||||
/** Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
|
/** Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
|
||||||
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
|
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
|
||||||
/** (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
|
/* (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
|
||||||
* (iOS) Set to yes or no to turn the toolbar navigation buttons on or off (defaults to no). Only applicable if toolbar is not disabled.*/
|
* (iOS) Set to yes or no to turn the toolbar navigation buttons on or off (defaults to no). Only applicable if toolbar is not disabled.*/
|
||||||
hidenavigationbuttons?: 'yes' | 'no';
|
hidenavigationbuttons?: 'yes' | 'no';
|
||||||
/** (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
|
/* (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
|
||||||
hideurlbar?: 'yes' | 'no';
|
hideurlbar?: 'yes' | 'no';
|
||||||
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
|
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
|
||||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color. Only applicable if navigation buttons are visible. */
|
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color. Only applicable if navigation buttons are visible. */
|
||||||
navigationbuttoncolor?: string;
|
navigationbuttoncolor?: string;
|
||||||
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
|
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
|
||||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.*/
|
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.*/
|
||||||
toolbarcolor?: string;
|
toolbarcolor?: string;
|
||||||
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
|
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
|
||||||
@ -53,7 +58,7 @@ export interface InAppBrowserOptions {
|
|||||||
toolbartranslucent?: 'yes' | 'no';
|
toolbartranslucent?: 'yes' | 'no';
|
||||||
/** (iOS Only) Set to yes or no to prevent viewport scaling through a meta tag (defaults to no). */
|
/** (iOS Only) Set to yes or no to prevent viewport scaling through a meta tag (defaults to no). */
|
||||||
enableViewportScale?: 'yes' | 'no';
|
enableViewportScale?: 'yes' | 'no';
|
||||||
/** (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
|
/* (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
|
||||||
* The HTML's video element must also include the webkit-playsinline attribute (defaults to no) */
|
* The HTML's video element must also include the webkit-playsinline attribute (defaults to no) */
|
||||||
allowInlineMediaPlayback?: 'yes' | 'no';
|
allowInlineMediaPlayback?: 'yes' | 'no';
|
||||||
/** (iOS Only) Set to yes or no to open the keyboard when form elements receive focus via JavaScript's focus() call (defaults to yes). */
|
/** (iOS Only) Set to yes or no to open the keyboard when form elements receive focus via JavaScript's focus() call (defaults to yes). */
|
||||||
@ -68,7 +73,7 @@ export interface InAppBrowserOptions {
|
|||||||
toolbarposition?: 'top' | 'bottom';
|
toolbarposition?: 'top' | 'bottom';
|
||||||
/** (iOS Only) Set to yes or no to change the visibility of the loading indicator (defaults to no). */
|
/** (iOS Only) Set to yes or no to change the visibility of the loading indicator (defaults to no). */
|
||||||
hidespinner?: 'yes' | 'no';
|
hidespinner?: 'yes' | 'no';
|
||||||
/** (Windows only) Set to yes to create the browser control without a border around it.
|
/* (Windows only) Set to yes to create the browser control without a border around it.
|
||||||
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */
|
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */
|
||||||
fullscreen?: 'yes';
|
fullscreen?: 'yes';
|
||||||
/** (Android Only) Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is no, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is yes and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to yes). */
|
/** (Android Only) Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is no, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is yes and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to yes). */
|
||||||
@ -93,7 +98,6 @@ export interface InAppBrowserEvent extends Event {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class InAppBrowserObject {
|
export class InAppBrowserObject {
|
||||||
|
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,20 +111,26 @@ export class InAppBrowserObject {
|
|||||||
* The options string must not contain any blank space, and each feature's
|
* The options string must not contain any blank space, and each feature's
|
||||||
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
||||||
*/
|
*/
|
||||||
constructor(url: string, target?: string, options?: string | InAppBrowserOptions) {
|
constructor(
|
||||||
|
url: string,
|
||||||
|
target?: string,
|
||||||
|
options?: string | InAppBrowserOptions
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (options && typeof options !== 'string') {
|
if (options && typeof options !== 'string') {
|
||||||
options = Object.keys(options).map((key: string) => `${key}=${(<InAppBrowserOptions>options)[key]}`).join(',');
|
options = Object.keys(options)
|
||||||
|
.map(
|
||||||
|
(key: string) => `${key}=${(options as InAppBrowserOptions)[key]}`
|
||||||
|
)
|
||||||
|
.join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
this._objectInstance = cordova.InAppBrowser.open(url, target, options);
|
this._objectInstance = cordova.InAppBrowser.open(url, target, options);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
||||||
window.open(url, target);
|
window.open(url, target);
|
||||||
console.warn('Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open.');
|
console.warn(
|
||||||
|
'Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,20 +139,20 @@ export class InAppBrowserObject {
|
|||||||
* if the InAppBrowser was already visible.
|
* if the InAppBrowser was already visible.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
show(): void { }
|
show(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the InAppBrowser window.
|
* Closes the InAppBrowser window.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
close(): void { }
|
close(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides an InAppBrowser window that is currently shown. Calling this has no effect
|
* Hides an InAppBrowser window that is currently shown. Calling this has no effect
|
||||||
* if the InAppBrowser was already hidden.
|
* if the InAppBrowser was already hidden.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
hide(): void { }
|
hide(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects JavaScript code into the InAppBrowser window.
|
* Injects JavaScript code into the InAppBrowser window.
|
||||||
@ -150,7 +160,9 @@ export class InAppBrowserObject {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeScript(script: { file?: string, code?: string }): Promise<any> { return; }
|
executeScript(script: { file?: string; code?: string }): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects CSS into the InAppBrowser window.
|
* Injects CSS into the InAppBrowser window.
|
||||||
@ -158,7 +170,9 @@ export class InAppBrowserObject {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
insertCSS(css: { file?: string, code?: string }): Promise<any> { return; }
|
insertCSS(css: { file?: string; code?: string }): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A method that allows you to listen to events happening in the browser.
|
* A method that allows you to listen to events happening in the browser.
|
||||||
@ -167,10 +181,19 @@ export class InAppBrowserObject {
|
|||||||
*/
|
*/
|
||||||
@InstanceCheck()
|
@InstanceCheck()
|
||||||
on(event: string): Observable<InAppBrowserEvent> {
|
on(event: string): Observable<InAppBrowserEvent> {
|
||||||
return new Observable<InAppBrowserEvent>((observer: Observer<InAppBrowserEvent>) => {
|
return new Observable<InAppBrowserEvent>(
|
||||||
this._objectInstance.addEventListener(event, observer.next.bind(observer));
|
(observer: Observer<InAppBrowserEvent>) => {
|
||||||
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
|
this._objectInstance.addEventListener(
|
||||||
});
|
event,
|
||||||
|
observer.next.bind(observer)
|
||||||
|
);
|
||||||
|
return () =>
|
||||||
|
this._objectInstance.removeEventListener(
|
||||||
|
event,
|
||||||
|
observer.next.bind(observer)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +237,6 @@ export class InAppBrowserObject {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class InAppBrowser extends IonicNativePlugin {
|
export class InAppBrowser extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
||||||
* @param url {string} The URL to load.
|
* @param url {string} The URL to load.
|
||||||
@ -224,8 +246,11 @@ export class InAppBrowser extends IonicNativePlugin {
|
|||||||
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
||||||
* @returns {InAppBrowserObject}
|
* @returns {InAppBrowserObject}
|
||||||
*/
|
*/
|
||||||
create(url: string, target?: string, options?: string | InAppBrowserOptions): InAppBrowserObject {
|
create(
|
||||||
|
url: string,
|
||||||
|
target?: string,
|
||||||
|
options?: string | InAppBrowserOptions
|
||||||
|
): InAppBrowserObject {
|
||||||
return new InAppBrowserObject(url, target, options);
|
return new InAppBrowserObject(url, target, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ export interface IAPProductOptions {
|
|||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IAPProducts = Array<IAPProduct> & {
|
export type IAPProducts = IAPProduct[] & {
|
||||||
/**
|
/**
|
||||||
* Get product by ID
|
* Get product by ID
|
||||||
*/
|
*/
|
||||||
@ -383,7 +383,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
|||||||
* Add or register a product
|
* Add or register a product
|
||||||
* @param product {IAPProductOptions}
|
* @param product {IAPProductOptions}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true})
|
@Cordova({ sync: true })
|
||||||
register(product: IAPProductOptions): void {}
|
register(product: IAPProductOptions): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
/* tslint:disable */
|
||||||
/**
|
/**
|
||||||
* @name In App Review
|
* @name In App Review
|
||||||
* @description
|
* @description
|
||||||
@ -25,6 +25,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
/* tslint:enable */
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'InAppReview',
|
pluginName: 'InAppReview',
|
||||||
plugin: 'com.omarben.inappreview',
|
plugin: 'com.omarben.inappreview',
|
||||||
@ -34,7 +35,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class InAppReview extends IonicNativePlugin {
|
export class InAppReview extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the inApp review popup
|
* Open the inApp review popup
|
||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
@ -43,5 +43,4 @@ export class InAppReview extends IonicNativePlugin {
|
|||||||
requestReview(): Promise<any> {
|
requestReview(): Promise<any> {
|
||||||
return; // We add return; here to avoid any IDE / Compiler errors
|
return; // We add return; here to avoid any IDE / Compiler errors
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaFunctionOverride,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface IndexItem {
|
export interface IndexItem {
|
||||||
@ -16,7 +21,7 @@ export interface IndexItem {
|
|||||||
/**
|
/**
|
||||||
* Item keywords
|
* Item keywords
|
||||||
*/
|
*/
|
||||||
keywords?: Array<string>;
|
keywords?: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lifetime in minutes
|
* Lifetime in minutes
|
||||||
@ -88,7 +93,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns if index set was successful
|
* @return {Promise<any>} Returns if index set was successful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setItems(items: Array<IndexItem>): Promise<any> {
|
setItems(items: IndexItem[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +103,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Resolve if successful
|
* @return {Promise<any>} Resolve if successful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
clearItemsForDomains(domains: Array<string>): Promise<any> {
|
clearItemsForDomains(domains: string[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,11 +113,11 @@ export class IndexAppContent extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Resolve if successful
|
* @return {Promise<any>} Resolve if successful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
clearItemsForIdentifiers(identifiers: Array<string>): Promise<any> {
|
clearItemsForIdentifiers(identifiers: string[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If user taps on a search result in spotlight then the app will be launched.
|
* If user taps on a search result in spotlight then the app will be launched.
|
||||||
* You can register a Javascript handler to get informed when this happens.
|
* You can register a Javascript handler to get informed when this happens.
|
||||||
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
|
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
|
||||||
|
@ -4,7 +4,7 @@ import { Injectable } from '@angular/core';
|
|||||||
declare const window: any;
|
declare const window: any;
|
||||||
|
|
||||||
export interface IntelSecurityDataOptions {
|
export interface IntelSecurityDataOptions {
|
||||||
/** Non-empty string. **/
|
/* Non-empty string. **/
|
||||||
data: String;
|
data: String;
|
||||||
/** Tag text. */
|
/** Tag text. */
|
||||||
tag?: String;
|
tag?: String;
|
||||||
@ -76,7 +76,6 @@ export interface IntelSecurityDataOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class IntelSecurity extends IonicNativePlugin {
|
export class IntelSecurity extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns an IntelSecurityStorage object
|
* returns an IntelSecurityStorage object
|
||||||
* @type {IntelSecurityStorage}
|
* @type {IntelSecurityStorage}
|
||||||
@ -88,7 +87,6 @@ export class IntelSecurity extends IonicNativePlugin {
|
|||||||
* @type {IntelSecurityData}
|
* @type {IntelSecurityData}
|
||||||
*/
|
*/
|
||||||
data: IntelSecurityData = new IntelSecurityData();
|
data: IntelSecurityData = new IntelSecurityData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,14 +98,15 @@ export class IntelSecurity extends IonicNativePlugin {
|
|||||||
pluginRef: 'intel.security.secureData'
|
pluginRef: 'intel.security.secureData'
|
||||||
})
|
})
|
||||||
export class IntelSecurityData {
|
export class IntelSecurityData {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This creates a new instance of secure data using plain-text data.
|
* This creates a new instance of secure data using plain-text data.
|
||||||
* @param options {IntelSecurityDataOptions}
|
* @param options {IntelSecurityDataOptions}
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
createFromData(options: IntelSecurityDataOptions): Promise<Number> { return; }
|
createFromData(options: IntelSecurityDataOptions): Promise<Number> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This creates a new instance of secure data (using sealed data)
|
* This creates a new instance of secure data (using sealed data)
|
||||||
@ -116,7 +115,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
createFromSealedData(options: { sealedData: string }): Promise<Number> { return; }
|
createFromSealedData(options: { sealedData: string }): Promise<Number> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns the plain-text data of the secure data instance.
|
* This returns the plain-text data of the secure data instance.
|
||||||
@ -124,7 +125,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
|
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getData(instanceID: Number): Promise<string> { return; }
|
getData(instanceID: Number): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns the sealed chunk of a secure data instance.
|
* This returns the sealed chunk of a secure data instance.
|
||||||
@ -132,7 +135,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getSealedData(instanceID: any): Promise<any> { return; }
|
getSealedData(instanceID: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns the tag of the secure data instance.
|
* This returns the tag of the secure data instance.
|
||||||
@ -140,7 +145,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
|
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getTag(instanceID: any): Promise<string> { return; }
|
getTag(instanceID: any): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns the data policy of the secure data instance.
|
* This returns the data policy of the secure data instance.
|
||||||
@ -148,7 +155,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
|
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getPolicy(instanceID: any): Promise<any> { return; }
|
getPolicy(instanceID: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns an array of the data owners unique IDs.
|
* This returns an array of the data owners unique IDs.
|
||||||
@ -156,7 +165,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
|
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getOwners(instanceID: any): Promise<Array<any>> { return; }
|
getOwners(instanceID: any): Promise<any[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns the data creator unique ID.
|
* This returns the data creator unique ID.
|
||||||
@ -164,7 +175,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
|
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getCreator(instanceID: any): Promise<Number> { return; }
|
getCreator(instanceID: any): Promise<Number> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns an array of the trusted web domains of the secure data instance.
|
* This returns an array of the trusted web domains of the secure data instance.
|
||||||
@ -172,7 +185,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
|
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getWebOwners(instanceID: any): Promise<Array<any>> { return; }
|
getWebOwners(instanceID: any): Promise<any[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data.
|
* This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data.
|
||||||
@ -182,7 +197,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<any>} Returns a promise that resolves with no parameters, or rejects with an error.
|
* @returns {Promise<any>} Returns a promise that resolves with no parameters, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
changeExtraKey(options: any): Promise<any> { return; }
|
changeExtraKey(options: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This releases a secure data instance.
|
* This releases a secure data instance.
|
||||||
@ -190,8 +207,9 @@ export class IntelSecurityData {
|
|||||||
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
|
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
destroy(instanceID: any): Promise<any> { return; }
|
destroy(instanceID: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -203,7 +221,6 @@ export class IntelSecurityData {
|
|||||||
pluginRef: 'intel.security.secureStorage'
|
pluginRef: 'intel.security.secureStorage'
|
||||||
})
|
})
|
||||||
export class IntelSecurityStorage {
|
export class IntelSecurityStorage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This deletes a secure storage resource (indicated by id).
|
* This deletes a secure storage resource (indicated by id).
|
||||||
* @param options {Object}
|
* @param options {Object}
|
||||||
@ -212,10 +229,9 @@ export class IntelSecurityStorage {
|
|||||||
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
delete(options: {
|
delete(options: { id: string; storageType?: Number }): Promise<any> {
|
||||||
id: string,
|
return;
|
||||||
storageType?: Number
|
}
|
||||||
}): Promise<any> { return; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This reads the data from secure storage (indicated by id) and creates a new secure data instance.
|
* This reads the data from secure storage (indicated by id) and creates a new secure data instance.
|
||||||
@ -227,10 +243,12 @@ export class IntelSecurityStorage {
|
|||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
read(options: {
|
read(options: {
|
||||||
id: string,
|
id: string;
|
||||||
storageType?: Number,
|
storageType?: Number;
|
||||||
extraKey?: Number
|
extraKey?: Number;
|
||||||
}): Promise<Number> { return; }
|
}): Promise<Number> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This writes the data contained in a secure data instance into secure storage.
|
* This writes the data contained in a secure data instance into secure storage.
|
||||||
@ -242,9 +260,10 @@ export class IntelSecurityStorage {
|
|||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
write(options: {
|
write(options: {
|
||||||
id: String,
|
id: String;
|
||||||
instanceID: Number,
|
instanceID: Number;
|
||||||
storageType?: Number
|
storageType?: Number;
|
||||||
}): Promise<any> { return; }
|
}): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Plugin,
|
||||||
|
Cordova,
|
||||||
|
CordovaCheck,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
declare const cordova: any;
|
declare const cordova: any;
|
||||||
@ -44,12 +49,14 @@ export class JinsMeme extends IonicNativePlugin {
|
|||||||
* Must call this method first.
|
* Must call this method first.
|
||||||
* Sign up for an app ID (and get an app/client secret) at developers.jins.com
|
* Sign up for an app ID (and get an app/client secret) at developers.jins.com
|
||||||
*
|
*
|
||||||
*@param {string} setAppClientID
|
* @param {string} setAppClientID
|
||||||
*@param {string} clientSecret
|
* @param {string} clientSecret
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAppClientID(appClientId: string, clientSecret: string): Promise<any> { return; }
|
setAppClientID(appClientId: string, clientSecret: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Starts scanning for JINS MEME.
|
* Starts scanning for JINS MEME.
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
@ -59,13 +66,17 @@ export class JinsMeme extends IonicNativePlugin {
|
|||||||
clearFunction: 'stopScan',
|
clearFunction: 'stopScan',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
startScan(): Observable<any> { return; }
|
startScan(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Stops scanning JINS MEME.
|
* Stops scanning JINS MEME.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopScan(): Promise<any> { return; }
|
stopScan(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Establishes connection to JINS MEME.
|
* Establishes connection to JINS MEME.
|
||||||
* @param {string} target
|
* @param {string} target
|
||||||
@ -76,29 +87,40 @@ export class JinsMeme extends IonicNativePlugin {
|
|||||||
})
|
})
|
||||||
connect(target: string): Observable<any> {
|
connect(target: string): Observable<any> {
|
||||||
return new Observable<any>((observer: any) => {
|
return new Observable<any>((observer: any) => {
|
||||||
let data = cordova.plugins.JinsMemePlugin.connect(target, observer.next.bind(observer), observer.complete.bind(observer), observer.error.bind(observer));
|
const data = cordova.plugins.JinsMemePlugin.connect(
|
||||||
|
target,
|
||||||
|
observer.next.bind(observer),
|
||||||
|
observer.complete.bind(observer),
|
||||||
|
observer.error.bind(observer)
|
||||||
|
);
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Set auto connection mode.
|
* Set auto connection mode.
|
||||||
*@param {Boolean} flag
|
* @param {Boolean} flag
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAutoConnect(flag: boolean): Promise<any> { return; }
|
setAutoConnect(flag: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns whether a connection to JINS MEME has been established.
|
* Returns whether a connection to JINS MEME has been established.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isConnected(): Promise<any> { return; }
|
isConnected(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Disconnects from JINS MEME.
|
* Disconnects from JINS MEME.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
disconnect(): Promise<any> { return; }
|
disconnect(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Starts receiving realtime data.
|
* Starts receiving realtime data.
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
@ -108,60 +130,80 @@ export class JinsMeme extends IonicNativePlugin {
|
|||||||
clearFunction: 'stopDataReport',
|
clearFunction: 'stopDataReport',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
startDataReport(): Observable<any> { return; }
|
startDataReport(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Stops receiving data.
|
* Stops receiving data.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopDataReport(): Promise<any> { return; }
|
stopDataReport(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns SDK version.
|
* Returns SDK version.
|
||||||
*
|
*
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getSDKVersion(): Promise<any> { return; }
|
getSDKVersion(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns JINS MEME connected with other apps.
|
* Returns JINS MEME connected with other apps.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getConnectedByOthers(): Promise<any> { return; }
|
getConnectedByOthers(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns calibration status
|
* Returns calibration status
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isCalibrated(): Promise<any> { return; }
|
isCalibrated(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns device type.
|
* Returns device type.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getConnectedDeviceType(): Promise<any> { return; }
|
getConnectedDeviceType(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns hardware version.
|
* Returns hardware version.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getConnectedDeviceSubType(): Promise<any> { return; }
|
getConnectedDeviceSubType(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns FW Version.
|
* Returns FW Version.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getFWVersion(): Promise<any> { return; }
|
getFWVersion(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns HW Version.
|
* Returns HW Version.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getHWVersion(): Promise<any> { return; }
|
getHWVersion(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns response about whether data was received or not.
|
* Returns response about whether data was received or not.
|
||||||
*@returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isDataReceiving(): Promise<any> { return; }
|
isDataReceiving(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,11 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Keyboard
|
* @name Keyboard
|
||||||
* @description
|
* @description
|
||||||
* Keyboard plugin for Cordova.
|
* Keyboard plugin for Cordova.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `ionic-plugin-keyboard`. For more info, please see the [Keyboard plugin docs](https://github.com/ionic-team/ionic-plugin-keyboard).
|
* Requires Cordova plugin: `ionic-plugin-keyboard`. For more info, please see the [Keyboard plugin docs](https://github.com/ionic-team/ionic-plugin-keyboard).
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
@ -33,13 +32,12 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Keyboard extends IonicNativePlugin {
|
export class Keyboard extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||||
* @param hide {boolean}
|
* @param hide {boolean}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
hideKeyboardAccessoryBar(hide: boolean): void { }
|
hideKeyboardAccessoryBar(hide: boolean): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force keyboard to be shown.
|
* Force keyboard to be shown.
|
||||||
@ -48,7 +46,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
show(): void { }
|
show(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the keyboard if open.
|
* Close the keyboard if open.
|
||||||
@ -57,7 +55,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
close(): void { }
|
close(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prevents the native UIScrollView from moving when an input is focused.
|
* Prevents the native UIScrollView from moving when an input is focused.
|
||||||
@ -67,7 +65,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS', 'Windows']
|
platforms: ['iOS', 'Windows']
|
||||||
})
|
})
|
||||||
disableScroll(disable: boolean): void { }
|
disableScroll(disable: boolean): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
||||||
@ -78,7 +76,9 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
event: 'native.keyboardshow',
|
event: 'native.keyboardshow',
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
onKeyboardShow(): Observable<any> { return; }
|
onKeyboardShow(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
||||||
@ -89,6 +89,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
event: 'native.keyboardhide',
|
event: 'native.keyboardhide',
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
onKeyboardHide(): Observable<any> { return; }
|
onKeyboardHide(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,13 +223,13 @@ export interface UserPrompted {
|
|||||||
* Sets flag indicating user has already been prompted whether to remember their choice a preferred navigator app.
|
* Sets flag indicating user has already been prompted whether to remember their choice a preferred navigator app.
|
||||||
* @param callback - function to call once operation is complete.
|
* @param callback - function to call once operation is complete.
|
||||||
*/
|
*/
|
||||||
set: ( callback: () => void) => void;
|
set: (callback: () => void) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears flag which indicates if user has already been prompted whether to remember their choice a preferred navigator app.
|
* Clears flag which indicates if user has already been prompted whether to remember their choice a preferred navigator app.
|
||||||
* @param callback - function to call once operation is complete.
|
* @param callback - function to call once operation is complete.
|
||||||
*/
|
*/
|
||||||
clear: ( callback: () => void) => void;
|
clear: (callback: () => void) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AppSelection {
|
export interface AppSelection {
|
||||||
|
@ -490,7 +490,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
schedule(options?: ILocalNotification | Array<ILocalNotification>): void {}
|
schedule(options?: ILocalNotification | ILocalNotification[]): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||||
@ -574,7 +574,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<number>>}
|
* @returns {Promise<Array<number>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getIds(): Promise<Array<number>> {
|
getIds(): Promise<number[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,7 +583,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<number>>}
|
* @returns {Promise<Array<number>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getTriggeredIds(): Promise<Array<number>> {
|
getTriggeredIds(): Promise<number[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,7 +592,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<number>>} Returns a promise
|
* @returns {Promise<Array<number>>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getScheduledIds(): Promise<Array<number>> {
|
getScheduledIds(): Promise<number[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +631,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<ILocalNotification>>}
|
* @returns {Promise<Array<ILocalNotification>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAll(): Promise<Array<ILocalNotification>> {
|
getAll(): Promise<ILocalNotification[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<ILocalNotification>>}
|
* @returns {Promise<Array<ILocalNotification>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAllScheduled(): Promise<Array<ILocalNotification>> {
|
getAllScheduled(): Promise<ILocalNotification[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
* @returns {Promise<Array<ILocalNotification>>}
|
* @returns {Promise<Array<ILocalNotification>>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAllTriggered(): Promise<Array<ILocalNotification>> {
|
getAllTriggered(): Promise<ILocalNotification[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -680,7 +680,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
@Cordova()
|
@Cordova()
|
||||||
addActions(
|
addActions(
|
||||||
groupId: any,
|
groupId: any,
|
||||||
actions: Array<ILocalNotificationAction>
|
actions: ILocalNotificationAction[]
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -743,7 +743,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Not an official interface, however its possible to manually fire events.
|
* Not an official interface, however its possible to manually fire events.
|
||||||
** @param eventName The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall. Custom event names are possible for actions
|
* @param eventName The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall. Custom event names are possible for actions
|
||||||
* @param args Optional arguments
|
* @param args Optional arguments
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -105,11 +105,11 @@ export interface ConfigurationData {
|
|||||||
/**
|
/**
|
||||||
* The height of the image or video in pixels. The value is zero for sound clips.
|
* The height of the image or video in pixels. The value is zero for sound clips.
|
||||||
*/
|
*/
|
||||||
height: number;
|
height: number;
|
||||||
/**
|
/**
|
||||||
* The width of the image or video in pixels. The value is zero for sound clips.
|
* The width of the image or video in pixels. The value is zero for sound clips.
|
||||||
*/
|
*/
|
||||||
width: number;
|
width: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -293,41 +293,41 @@ export class Media extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_NONE: number = 0;
|
MEDIA_NONE = 0;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_STARTING: number = 1;
|
MEDIA_STARTING = 1;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_RUNNING: number = 2;
|
MEDIA_RUNNING = 2;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_PAUSED: number = 3;
|
MEDIA_PAUSED = 3;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_STOPPED: number = 4;
|
MEDIA_STOPPED = 4;
|
||||||
|
|
||||||
// error codes
|
// error codes
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_ERR_ABORTED: number = 1;
|
MEDIA_ERR_ABORTED = 1;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_ERR_NETWORK: number = 2;
|
MEDIA_ERR_NETWORK = 2;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_ERR_DECODE: number = 3;
|
MEDIA_ERR_DECODE = 3;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
MEDIA_ERR_NONE_SUPPORTED: number = 4;
|
MEDIA_ERR_NONE_SUPPORTED = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a media file
|
* Open a media file
|
||||||
|
@ -250,7 +250,7 @@ export class MixpanelPeople extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
unset(propertiesArray: Array<string>): Promise<any> {
|
unset(propertiesArray: string[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ export interface UserInfo {
|
|||||||
export class MSAdal extends IonicNativePlugin {
|
export class MSAdal extends IonicNativePlugin {
|
||||||
createAuthenticationContext(
|
createAuthenticationContext(
|
||||||
authority: string,
|
authority: string,
|
||||||
validateAuthority: boolean = true
|
validateAuthority = true
|
||||||
) {
|
) {
|
||||||
let authContext: any;
|
let authContext: any;
|
||||||
if (
|
if (
|
||||||
|
@ -71,7 +71,6 @@ export interface MusicControlsOptions {
|
|||||||
* // text displayed in the status bar when the notification (and the ticker) are updated, optional
|
* // text displayed in the status bar when the notification (and the ticker) are updated, optional
|
||||||
* ticker : 'Now playing "Time is Running Out"',
|
* ticker : 'Now playing "Time is Running Out"',
|
||||||
* // All icons default to their built-in android equivalents
|
* // All icons default to their built-in android equivalents
|
||||||
* // The supplied drawable name, e.g. 'media_play', is the name of a drawable found under android/res/drawable* folders
|
|
||||||
* playIcon: 'media_play',
|
* playIcon: 'media_play',
|
||||||
* pauseIcon: 'media_pause',
|
* pauseIcon: 'media_pause',
|
||||||
* prevIcon: 'media_prev',
|
* prevIcon: 'media_prev',
|
||||||
|
@ -18,7 +18,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* useLocale: true,
|
* useLocale: true,
|
||||||
* maxResults: 5
|
* maxResults: 5
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818, options)
|
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818, options)
|
||||||
* .then((result: NativeGeocoderReverseResult[]) => console.log(JSON.stringify(result[0])))
|
* .then((result: NativeGeocoderReverseResult[]) => console.log(JSON.stringify(result[0])))
|
||||||
* .catch((error: any) => console.log(error));
|
* .catch((error: any) => console.log(error));
|
||||||
@ -68,7 +68,7 @@ export class NativeGeocoder extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encapsulates format information about a reverse geocoding result.
|
* Encapsulates format information about a reverse geocoding result.
|
||||||
* more Info:
|
* more Info:
|
||||||
* - https://developer.apple.com/documentation/corelocation/clplacemark
|
* - https://developer.apple.com/documentation/corelocation/clplacemark
|
||||||
* - https://developer.android.com/reference/android/location/Address.html
|
* - https://developer.android.com/reference/android/location/Address.html
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ export class NavigationBar extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* hide automatically (or not) the navigation bar.
|
* hide automatically (or not) the navigation bar.
|
||||||
* @param autohide {boolean}
|
* @param autohide {boolean}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -43,7 +43,7 @@ export class NavigationBar extends IonicNativePlugin {
|
|||||||
setUp(autohide?: boolean): Promise<any> { return; }
|
setUp(autohide?: boolean): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the navigation bar.
|
* Hide the navigation bar.
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -37,7 +37,7 @@ declare const navigator: any;
|
|||||||
* let connectSubscription = this.network.onConnect().subscribe(() => {
|
* let connectSubscription = this.network.onConnect().subscribe(() => {
|
||||||
* console.log('network connected!');
|
* console.log('network connected!');
|
||||||
* // We just got a connection but we need to wait briefly
|
* // We just got a connection but we need to wait briefly
|
||||||
*
// before we determine the connection type. Might need to wait.
|
* // before we determine the connection type. Might need to wait.
|
||||||
* // prior to doing any api requests as well.
|
* // prior to doing any api requests as well.
|
||||||
* setTimeout(() => {
|
* setTimeout(() => {
|
||||||
* if (this.network.type === 'wifi') {
|
* if (this.network.type === 'wifi') {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin, CordovaProperty } from '@ionic-native/core';
|
import {
|
||||||
|
Plugin,
|
||||||
|
Cordova,
|
||||||
|
IonicNativePlugin,
|
||||||
|
CordovaProperty
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
declare let window: any;
|
declare let window: any;
|
||||||
|
|
||||||
@ -67,8 +72,8 @@ export interface NdefTag {
|
|||||||
platforms: ['Android', 'BlackBerry 10', 'Windows', 'Windows Phone 8']
|
platforms: ['Android', 'BlackBerry 10', 'Windows', 'Windows Phone 8']
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
*@{ NFC } class methods
|
* @{ NFC } class methods
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NFC extends IonicNativePlugin {
|
export class NFC extends IonicNativePlugin {
|
||||||
/**
|
/**
|
||||||
@ -84,7 +89,9 @@ export class NFC extends IonicNativePlugin {
|
|||||||
clearFunction: 'invalidateSession',
|
clearFunction: 'invalidateSession',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
beginSession(onSuccess?: Function, onFailure?: Function): Observable<any> { return; }
|
beginSession(onSuccess?: Function, onFailure?: Function): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an event listener for any NDEF tag.
|
* Registers an event listener for any NDEF tag.
|
||||||
@ -99,7 +106,12 @@ export class NFC extends IonicNativePlugin {
|
|||||||
clearFunction: 'removeNdefListener',
|
clearFunction: 'removeNdefListener',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
addNdefListener(onSuccess?: Function, onFailure?: Function): Observable<NdefEvent> { return; }
|
addNdefListener(
|
||||||
|
onSuccess?: Function,
|
||||||
|
onFailure?: Function
|
||||||
|
): Observable<NdefEvent> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an event listener for tags matching any tag type.
|
* Registers an event listener for tags matching any tag type.
|
||||||
@ -114,7 +126,12 @@ export class NFC extends IonicNativePlugin {
|
|||||||
clearFunction: 'removeTagDiscoveredListener',
|
clearFunction: 'removeTagDiscoveredListener',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
addTagDiscoveredListener(onSuccess?: Function, onFailure?: Function): Observable<any> { return; }
|
addTagDiscoveredListener(
|
||||||
|
onSuccess?: Function,
|
||||||
|
onFailure?: Function
|
||||||
|
): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an event listener for NDEF tags matching a specified MIME type.
|
* Registers an event listener for NDEF tags matching a specified MIME type.
|
||||||
@ -130,7 +147,13 @@ export class NFC extends IonicNativePlugin {
|
|||||||
clearFunction: 'removeMimeTypeListener',
|
clearFunction: 'removeMimeTypeListener',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
addMimeTypeListener(mimeType: string, onSuccess?: Function, onFailure?: Function): Observable<any> { return; }
|
addMimeTypeListener(
|
||||||
|
mimeType: string,
|
||||||
|
onSuccess?: Function,
|
||||||
|
onFailure?: Function
|
||||||
|
): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an event listener for formatable NDEF tags.
|
* Registers an event listener for formatable NDEF tags.
|
||||||
@ -143,7 +166,12 @@ export class NFC extends IonicNativePlugin {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
addNdefFormatableListener(onSuccess?: Function, onFailure?: Function): Observable<any> { return; }
|
addNdefFormatableListener(
|
||||||
|
onSuccess?: Function,
|
||||||
|
onFailure?: Function
|
||||||
|
): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes an NdefMessage(array of ndef records) to a NFC tag.
|
* Writes an NdefMessage(array of ndef records) to a NFC tag.
|
||||||
@ -151,13 +179,17 @@ export class NFC extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
write(message: any[]): Promise<any> { return; }
|
write(message: any[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Makes a NFC tag read only. **Warning** this is permanent.
|
* Makes a NFC tag read only. **Warning** this is permanent.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
makeReadyOnly(): Promise<any> { return; }
|
makeReadyOnly(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares an NDEF Message(array of ndef records) via peer-to-peer.
|
* Shares an NDEF Message(array of ndef records) via peer-to-peer.
|
||||||
@ -165,20 +197,26 @@ export class NFC extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
share(message: any[]): Promise<any> { return; }
|
share(message: any[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop sharing NDEF data via peer-to-peer.
|
* Stop sharing NDEF data via peer-to-peer.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
unshare(): Promise<any> { return; }
|
unshare(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Erase a NDEF tag
|
* Erase a NDEF tag
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
erase(): Promise<any> { return; }
|
erase(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a file to another device via NFC handover.
|
* Send a file to another device via NFC handover.
|
||||||
@ -186,46 +224,58 @@ export class NFC extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
handover(uris: string[]): Promise<any> { return; }
|
handover(uris: string[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop sharing NDEF data via NFC handover.
|
* Stop sharing NDEF data via NFC handover.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopHandover(): Promise<any> { return; }
|
stopHandover(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the device's NFC settings.
|
* Opens the device's NFC settings.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showSettings(): Promise<any> { return; }
|
showSettings(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if NFC is available and enabled on this device.
|
* Check if NFC is available and enabled on this device.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
enabled(): Promise<any> { return; }
|
enabled(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @{ NFC } class utility methods
|
* @{ NFC } class utility methods
|
||||||
* for use with
|
* for use with
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Convert byte array to string
|
* Convert byte array to string
|
||||||
* @param bytes {number[]}
|
* @param bytes {number[]}
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
bytesToString(bytes: number[]): string { return; }
|
bytesToString(bytes: number[]): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Convert string to byte array.
|
* Convert string to byte array.
|
||||||
* @param str {string}
|
* @param str {string}
|
||||||
* @returns {number[]}
|
* @returns {number[]}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
stringToBytes(str: string): number[] { return; };
|
stringToBytes(str: string): number[] {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Convert byte array to hex string
|
* Convert byte array to hex string
|
||||||
*
|
*
|
||||||
@ -233,8 +283,9 @@ export class NFC extends IonicNativePlugin {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
bytesToHexString(bytes: number[]): string { return; };
|
bytesToHexString(bytes: number[]): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
@ -245,16 +296,14 @@ export class NFC extends IonicNativePlugin {
|
|||||||
pluginRef: 'ndef'
|
pluginRef: 'ndef'
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
*@{ Ndef } class methods
|
* @description
|
||||||
*@description
|
* Utility methods for creating ndef records for the ndef tag format.
|
||||||
* Utility methods for creating ndef records for the ndef tag format.
|
* Move records into array before usage. Then pass an array to methods as parameters.
|
||||||
* Move records into array before usage. Then pass an array to methods as parameters.
|
* Do not pass bytes as parameters for these methods, conversion is built in.
|
||||||
* Do not pass bytes as parameters for these methods, conversion is built in.
|
* For usage with nfc.write() and nfc.share()
|
||||||
* For usage with nfc.write() and nfc.share()
|
*/
|
||||||
*/
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Ndef extends IonicNativePlugin {
|
export class Ndef extends IonicNativePlugin {
|
||||||
|
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
TNF_EMPTY: number;
|
TNF_EMPTY: number;
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
@ -288,43 +337,82 @@ export class Ndef extends IonicNativePlugin {
|
|||||||
RTD_HANDOVER_SELECT: number[];
|
RTD_HANDOVER_SELECT: number[];
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
record(tnf: number, type: number[] | string, id: number[] | string, payload: number[] | string): NdefRecord { return; }
|
record(
|
||||||
|
tnf: number,
|
||||||
|
type: number[] | string,
|
||||||
|
id: number[] | string,
|
||||||
|
payload: number[] | string
|
||||||
|
): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
textRecord(text: string, languageCode?: string, id?: number[] | string): NdefRecord { return; }
|
textRecord(
|
||||||
|
text: string,
|
||||||
|
languageCode?: string,
|
||||||
|
id?: number[] | string
|
||||||
|
): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
uriRecord(uri: string, id?: number[] | string): NdefRecord { return; }
|
uriRecord(uri: string, id?: number[] | string): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
absoluteUriRecord(uri: string, payload: number[] | string, id?: number[] | string): NdefRecord { return; }
|
absoluteUriRecord(
|
||||||
|
uri: string,
|
||||||
|
payload: number[] | string,
|
||||||
|
id?: number[] | string
|
||||||
|
): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
mimeMediaRecord(mimeType: string, payload: string): NdefRecord { return; }
|
mimeMediaRecord(mimeType: string, payload: string): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
smartPoster(ndefRecords: any[], id?: number[] | string ): NdefRecord { return; }
|
smartPoster(ndefRecords: any[], id?: number[] | string): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
emptyRecord(): NdefRecord { return; }
|
emptyRecord(): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
androidApplicationRecord(packageName: string): NdefRecord { return; }
|
androidApplicationRecord(packageName: string): NdefRecord {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
encodeMessage(ndefRecords: any): any { return; }
|
encodeMessage(ndefRecords: any): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
decodeMessage(bytes: any): any { return; }
|
decodeMessage(bytes: any): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
docodeTnf(tnf_byte: any): any { return; }
|
docodeTnf(tnf_byte: any): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
encodeTnf(mb: any, me: any, cf: any, sr: any, il: any, tnf: any): any { return; }
|
encodeTnf(mb: any, me: any, cf: any, sr: any, il: any, tnf: any): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
tnfToString(tnf: any): string { return; }
|
tnfToString(tnf: any): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
textHelper: TextHelper;
|
textHelper: TextHelper;
|
||||||
@ -343,32 +431,51 @@ export class Ndef extends IonicNativePlugin {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NfcUtil extends IonicNativePlugin {
|
export class NfcUtil extends IonicNativePlugin {
|
||||||
|
@Cordova({ sync: true })
|
||||||
|
toHex(i: number): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
toHex(i: number): string { return; }
|
toPrintable(i: number): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
toPrintable(i: number): string { return; }
|
bytesToString(i: number[]): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
bytesToString(i: number[]): string { return; }
|
stringToBytes(s: string): number[] {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
stringToBytes(s: string): number[] { return; }
|
bytesToHexString(bytes: number[]): string {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
bytesToHexString(bytes: number[]): string { return; }
|
isType(record: NdefRecord, tnf: number, type: number[] | string): boolean {
|
||||||
|
return;
|
||||||
@Cordova({ sync: true })
|
}
|
||||||
isType(record: NdefRecord, tnf: number, type: number[]|string): boolean { return; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TextHelper extends IonicNativePlugin {
|
export class TextHelper extends IonicNativePlugin {
|
||||||
decodePayload(data: number[]): string { return; }
|
decodePayload(data: number[]): string {
|
||||||
encodePayload(text: string, lang: string): number[] { return; }
|
return;
|
||||||
|
}
|
||||||
|
encodePayload(text: string, lang: string): number[] {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class UriHelper extends IonicNativePlugin {
|
export class UriHelper extends IonicNativePlugin {
|
||||||
decodePayload(data: number[]): string { return; }
|
decodePayload(data: number[]): string {
|
||||||
encodePayload(uri: string): number[] { return; }
|
return;
|
||||||
|
}
|
||||||
|
encodePayload(uri: string): number[] {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,10 +325,10 @@ export enum OSActionType {
|
|||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* #!/usr/bin/env node
|
* #!/usr/bin/env node
|
||||||
|
*
|
||||||
* var fs = require('fs');
|
* var fs = require('fs');
|
||||||
* var path = require('path');
|
* var path = require('path');
|
||||||
|
*
|
||||||
* var filestocopy = [{
|
* var filestocopy = [{
|
||||||
* "resources/android/icon/drawable-hdpi-icon.png":
|
* "resources/android/icon/drawable-hdpi-icon.png":
|
||||||
* "platforms/android/res/drawable-hdpi/ic_stat_onesignal_default.png"
|
* "platforms/android/res/drawable-hdpi/ic_stat_onesignal_default.png"
|
||||||
@ -345,12 +345,12 @@ export enum OSActionType {
|
|||||||
* "resources/android/icon/drawable-xxxhdpi-icon.png":
|
* "resources/android/icon/drawable-xxxhdpi-icon.png":
|
||||||
* "platforms/android/res/drawable-xxxhdpi/ic_stat_onesignal_default.png"
|
* "platforms/android/res/drawable-xxxhdpi/ic_stat_onesignal_default.png"
|
||||||
* } ];
|
* } ];
|
||||||
|
*
|
||||||
* module.exports = function(context) {
|
* module.exports = function(context) {
|
||||||
|
*
|
||||||
* // no need to configure below
|
* // no need to configure below
|
||||||
* var rootdir = context.opts.projectRoot;
|
* var rootdir = context.opts.projectRoot;
|
||||||
|
*
|
||||||
* filestocopy.forEach(function(obj) {
|
* filestocopy.forEach(function(obj) {
|
||||||
* Object.keys(obj).forEach(function(key) {
|
* Object.keys(obj).forEach(function(key) {
|
||||||
* var val = obj[key];
|
* var val = obj[key];
|
||||||
@ -364,7 +364,7 @@ export enum OSActionType {
|
|||||||
* }
|
* }
|
||||||
* });
|
* });
|
||||||
* });
|
* });
|
||||||
|
*
|
||||||
* };
|
* };
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -660,7 +660,7 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Enable logging to help debug if you run into an issue setting up OneSignal.
|
* Enable logging to help debug if you run into an issue setting up OneSignal.
|
||||||
* The logging levels are as follows: 0 = None, 1= Fatal, 2 = Errors, 3 = Warnings, 4 = Info, 5 = Debug, 6 = Verbose
|
* The logging levels are as follows: 0 = None, 1= Fatal, 2 = Errors, 3 = Warnings, 4 = Info, 5 = Debug, 6 = Verbose
|
||||||
|
*
|
||||||
* The higher the value the more information is shown.
|
* The higher the value the more information is shown.
|
||||||
*
|
*
|
||||||
* @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
|
* @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
|
||||||
|
@ -8,77 +8,77 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|||||||
* @usage
|
* @usage
|
||||||
* You can open any of these settings:
|
* You can open any of these settings:
|
||||||
* ```
|
* ```
|
||||||
* "about", // ios
|
* "about", // ios
|
||||||
"accessibility", // ios, android
|
* "accessibility", // ios, android
|
||||||
"account", // ios, android
|
* "account", // ios, android
|
||||||
"airplane_mode", // ios, android
|
* "airplane_mode", // ios, android
|
||||||
"apn", // android
|
* "apn", // android
|
||||||
"application_details", // ios, android
|
* "application_details", // ios, android
|
||||||
"application_development", // android
|
* "application_development", // android
|
||||||
"application", // android
|
* "application", // android
|
||||||
"autolock", // ios
|
* "autolock", // ios
|
||||||
"battery_optimization", // android
|
* "battery_optimization", // android
|
||||||
"bluetooth", // ios, android
|
* "bluetooth", // ios, android
|
||||||
"castle", // ios
|
* "castle", // ios
|
||||||
"captioning", // android
|
* "captioning", // android
|
||||||
"cast", // android
|
* "cast", // android
|
||||||
"cellular_usage", // ios
|
* "cellular_usage", // ios
|
||||||
"configuration_list", // ios
|
* "configuration_list", // ios
|
||||||
"data_roaming", // android
|
* "data_roaming", // android
|
||||||
"date", // ios, android
|
* "date", // ios, android
|
||||||
"display", // ios, android
|
* "display", // ios, android
|
||||||
"dream", // android
|
* "dream", // android
|
||||||
"facetime", // ios
|
* "facetime", // ios
|
||||||
"home", // android
|
* "home", // android
|
||||||
"keyboard", // ios, android
|
* "keyboard", // ios, android
|
||||||
"keyboard_subtype", // android
|
* "keyboard_subtype", // android
|
||||||
"locale", // ios, android
|
* "locale", // ios, android
|
||||||
"location", // ios, android
|
* "location", // ios, android
|
||||||
"locations", // ios
|
* "locations", // ios
|
||||||
"manage_all_applications", // android
|
* "manage_all_applications", // android
|
||||||
"manage_applications", // android
|
* "manage_applications", // android
|
||||||
"memory_card", // android
|
* "memory_card", // android
|
||||||
"music", // ios
|
* "music", // ios
|
||||||
"music_equalizer", // ios
|
* "music_equalizer", // ios
|
||||||
"music_volume", // ios
|
* "music_volume", // ios
|
||||||
"network", // ios, android
|
* "network", // ios, android
|
||||||
"nike_ipod", // ios
|
* "nike_ipod", // ios
|
||||||
"nfcsharing", // android
|
* "nfcsharing", // android
|
||||||
"nfc_payment", // android
|
* "nfc_payment", // android
|
||||||
"nfc_settings", // android
|
* "nfc_settings", // android
|
||||||
"notes", // ios
|
* "notes", // ios
|
||||||
"notification_id", // ios
|
* "notification_id", // ios
|
||||||
"passbook", // ios
|
* "passbook", // ios
|
||||||
"phone", // ios
|
* "phone", // ios
|
||||||
"photos", // ios
|
* "photos", // ios
|
||||||
"print", // android
|
* "print", // android
|
||||||
"privacy", // android
|
* "privacy", // android
|
||||||
"quick_launch", // android
|
* "quick_launch", // android
|
||||||
"reset", // ios
|
* "reset", // ios
|
||||||
"ringtone", // ios
|
* "ringtone", // ios
|
||||||
"browser", // ios
|
* "browser", // ios
|
||||||
"search", // ios, android
|
* "search", // ios, android
|
||||||
"security", // android
|
* "security", // android
|
||||||
"settings", // ios, android
|
* "settings", // ios, android
|
||||||
"show_regulatory_info",
|
* "show_regulatory_info",
|
||||||
"sound", // ios, android
|
* "sound", // ios, android
|
||||||
"software_update", // ios
|
* "software_update", // ios
|
||||||
"storage", // ios, android
|
* "storage", // ios, android
|
||||||
"store", // ios, android
|
* "store", // ios, android
|
||||||
"sync", // android
|
* "sync", // android
|
||||||
"tethering", // ios
|
* "tethering", // ios
|
||||||
"twitter", // ios
|
* "twitter", // ios
|
||||||
"touch", // ios
|
* "touch", // ios
|
||||||
"usage", // ios, android
|
* "usage", // ios, android
|
||||||
"user_dictionary", // android
|
* "user_dictionary", // android
|
||||||
"video", // ios
|
* "video", // ios
|
||||||
"voice_input", // android
|
* "voice_input", // android
|
||||||
"vpn", // ios
|
* "vpn", // ios
|
||||||
"wallpaper", // ios
|
* "wallpaper", // ios
|
||||||
"wifi_ip", // android
|
* "wifi_ip", // android
|
||||||
"wifi", // ios, android
|
* "wifi", // ios, android
|
||||||
"wireless" // android
|
* "wireless" // android
|
||||||
```
|
* ```
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
|
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
|
||||||
*
|
*
|
||||||
|
@ -78,7 +78,9 @@ export class PayPal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
version(): Promise<string> { return; }
|
version(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You must preconnect to PayPal to prepare the device for processing payments.
|
* You must preconnect to PayPal to prepare the device for processing payments.
|
||||||
@ -90,7 +92,9 @@ export class PayPal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
init(clientIdsForEnvironments: PayPalEnvironment): Promise<any> { return; }
|
init(clientIdsForEnvironments: PayPalEnvironment): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You must preconnect to PayPal to prepare the device for processing payments.
|
* You must preconnect to PayPal to prepare the device for processing payments.
|
||||||
@ -102,7 +106,12 @@ export class PayPal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
prepareToRender(environment: string, configuration: PayPalConfiguration): Promise<any> { return; }
|
prepareToRender(
|
||||||
|
environment: string,
|
||||||
|
configuration: PayPalConfiguration
|
||||||
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start PayPal UI to collect payment from the user.
|
* Start PayPal UI to collect payment from the user.
|
||||||
@ -113,7 +122,9 @@ export class PayPal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
renderSinglePaymentUI(payment: PayPalPayment): Promise<any> { return; }
|
renderSinglePaymentUI(payment: PayPalPayment): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Once a user has consented to future payments, when the user subsequently initiates a PayPal payment
|
* Once a user has consented to future payments, when the user subsequently initiates a PayPal payment
|
||||||
@ -126,14 +137,18 @@ export class PayPal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
clientMetadataID(): Promise<any> { return; }
|
clientMetadataID(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Please Read Docs on Future Payments at https://github.com/paypal/PayPal-iOS-SDK#future-payments
|
* Please Read Docs on Future Payments at https://github.com/paypal/PayPal-iOS-SDK#future-payments
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
renderFuturePaymentUI(): Promise<any> { return; }
|
renderFuturePaymentUI(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Please Read Docs on Profile Sharing at https://github.com/paypal/PayPal-iOS-SDK#profile-sharing
|
* Please Read Docs on Profile Sharing at https://github.com/paypal/PayPal-iOS-SDK#profile-sharing
|
||||||
@ -143,7 +158,9 @@ export class PayPal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
renderProfileSharingUI(scopes: string[]): Promise<any> { return; }
|
renderProfileSharingUI(scopes: string[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PayPalEnvironment {
|
export interface PayPalEnvironment {
|
||||||
@ -155,7 +172,13 @@ export interface PayPalEnvironment {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class PayPalPayment {
|
export class PayPalPayment {
|
||||||
constructor(amount: string, currency: string, shortDescription: string, intent: string, details?: PayPalPaymentDetails) {
|
constructor(
|
||||||
|
amount: string,
|
||||||
|
currency: string,
|
||||||
|
shortDescription: string,
|
||||||
|
intent: string,
|
||||||
|
details?: PayPalPaymentDetails
|
||||||
|
) {
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
this.currency = currency;
|
this.currency = currency;
|
||||||
this.shortDescription = shortDescription;
|
this.shortDescription = shortDescription;
|
||||||
@ -183,7 +206,7 @@ export class PayPalPayment {
|
|||||||
* Optional Build Notation code ("BN code"), obtained from partnerprogram@paypal.com,
|
* Optional Build Notation code ("BN code"), obtained from partnerprogram@paypal.com,
|
||||||
* for your tracking purposes.
|
* for your tracking purposes.
|
||||||
*/
|
*/
|
||||||
bnCode: string = 'PhoneGap_SP';
|
bnCode = 'PhoneGap_SP';
|
||||||
/**
|
/**
|
||||||
* Optional invoice number, for your tracking purposes. (up to 256 characters)
|
* Optional invoice number, for your tracking purposes. (up to 256 characters)
|
||||||
*/
|
*/
|
||||||
@ -202,12 +225,12 @@ export class PayPalPayment {
|
|||||||
/**
|
/**
|
||||||
* Optional array of PayPalItem objects.
|
* Optional array of PayPalItem objects.
|
||||||
*/
|
*/
|
||||||
items: Array<PayPalItem>;
|
items: PayPalItem[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional payee email, if your app is paying a third-party merchant.
|
* Optional payee email, if your app is paying a third-party merchant.
|
||||||
* The payee's email. It must be a valid PayPal email address.
|
* The payee's email. It must be a valid PayPal email address.
|
||||||
*/
|
*/
|
||||||
payeeEmail: string;
|
payeeEmail: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -235,7 +258,13 @@ export class PayPalItem {
|
|||||||
* @param {String} currency: ISO standard currency code.
|
* @param {String} currency: ISO standard currency code.
|
||||||
* @param {String} sku: The stock keeping unit for this item. 50 characters max (optional)
|
* @param {String} sku: The stock keeping unit for this item. 50 characters max (optional)
|
||||||
*/
|
*/
|
||||||
constructor(name: string, quantity: number, price: string, currency: string, sku?: string) {
|
constructor(
|
||||||
|
name: string,
|
||||||
|
quantity: number,
|
||||||
|
price: string,
|
||||||
|
currency: string,
|
||||||
|
sku?: string
|
||||||
|
) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
this.price = price;
|
this.price = price;
|
||||||
@ -405,8 +434,7 @@ export class PayPalConfiguration implements PayPalConfigurationOptions {
|
|||||||
* see defaults for options available
|
* see defaults for options available
|
||||||
*/
|
*/
|
||||||
constructor(options?: PayPalConfigurationOptions) {
|
constructor(options?: PayPalConfigurationOptions) {
|
||||||
|
const defaults: PayPalConfigurationOptions = {
|
||||||
let defaults: PayPalConfigurationOptions = {
|
|
||||||
defaultUserEmail: null,
|
defaultUserEmail: null,
|
||||||
defaultUserPhoneCountryCode: null,
|
defaultUserPhoneCountryCode: null,
|
||||||
defaultUserPhoneNumber: null,
|
defaultUserPhoneNumber: null,
|
||||||
@ -425,7 +453,7 @@ export class PayPalConfiguration implements PayPalConfigurationOptions {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (options && typeof options === 'object') {
|
if (options && typeof options === 'object') {
|
||||||
for (let i in options) {
|
for (const i in options) {
|
||||||
if (defaults.hasOwnProperty(i)) {
|
if (defaults.hasOwnProperty(i)) {
|
||||||
defaults[i] = options[i];
|
defaults[i] = options[i];
|
||||||
}
|
}
|
||||||
@ -450,7 +478,15 @@ export class PayPalShippingAddress {
|
|||||||
* @param {String} postalCode: ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries.
|
* @param {String} postalCode: ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries.
|
||||||
* @param {String} countryCode: 2-letter country code. 2 characters max.
|
* @param {String} countryCode: 2-letter country code. 2 characters max.
|
||||||
*/
|
*/
|
||||||
constructor(recipientName: string, line1: string, line2: string, city: string, state: string, postalCode: string, countryCode: string) {
|
constructor(
|
||||||
|
recipientName: string,
|
||||||
|
line1: string,
|
||||||
|
line2: string,
|
||||||
|
city: string,
|
||||||
|
state: string,
|
||||||
|
postalCode: string,
|
||||||
|
countryCode: string
|
||||||
|
) {
|
||||||
this.recipientName = recipientName;
|
this.recipientName = recipientName;
|
||||||
this.line1 = line1;
|
this.line1 = line1;
|
||||||
this.line2 = line2;
|
this.line2 = line2;
|
||||||
|
@ -43,13 +43,14 @@ export interface IPedometerData {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Pedometer extends IonicNativePlugin {
|
export class Pedometer extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if step counting is available. Only works on iOS.
|
* Checks if step counting is available. Only works on iOS.
|
||||||
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isStepCountingAvailable(): Promise<boolean> { return; }
|
isStepCountingAvailable(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Distance estimation indicates the ability to use step information to supply the approximate distance travelled by the user.
|
* Distance estimation indicates the ability to use step information to supply the approximate distance travelled by the user.
|
||||||
@ -58,7 +59,9 @@ export class Pedometer extends IonicNativePlugin {
|
|||||||
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isDistanceAvailable(): Promise<boolean> { return; }
|
isDistanceAvailable(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Floor counting indicates the ability to count the number of floors the user walks up or down using stairs.
|
* Floor counting indicates the ability to count the number of floors the user walks up or down using stairs.
|
||||||
@ -67,27 +70,33 @@ export class Pedometer extends IonicNativePlugin {
|
|||||||
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isFloorCountingAvailable(): Promise<boolean> { return; }
|
isFloorCountingAvailable(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the delivery of recent pedestrian-related data to your Cordova app.
|
* Starts the delivery of recent pedestrian-related data to your Cordova app.
|
||||||
*
|
*
|
||||||
* When the app is suspended, the delivery of updates stops temporarily.
|
* When the app is suspended, the delivery of updates stops temporarily.
|
||||||
* Upon returning to foreground or background execution, the pedometer object begins updates again.
|
* Upon returning to foreground or background execution, the pedometer object begins updates again.
|
||||||
* @return {Observable<IPedometerData>} Returns a Observable that recieves repeatly data from pedometer in background.
|
* @return {Observable<IPedometerData>} Returns a Observable that recieves repeatly data from pedometer in background.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stopPedometerUpdates'
|
clearFunction: 'stopPedometerUpdates'
|
||||||
})
|
})
|
||||||
startPedometerUpdates(): Observable<IPedometerData> { return; }
|
startPedometerUpdates(): Observable<IPedometerData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the delivery of recent pedestrian data updates to your Cordova app.
|
* Stops the delivery of recent pedestrian data updates to your Cordova app.
|
||||||
* @return {Promise<boolean>} Returns a promise that resolves when pedometer watching was stopped
|
* @return {Promise<boolean>} Returns a promise that resolves when pedometer watching was stopped
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopPedometerUpdates(): Promise<any> { return; }
|
stopPedometerUpdates(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the data between the specified start and end dates.
|
* Retrieves the data between the specified start and end dates.
|
||||||
@ -100,6 +109,10 @@ export class Pedometer extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
queryData(options: { startDate: Date, endDate: Date }): Promise<IPedometerData> { return; }
|
queryData(options: {
|
||||||
|
startDate: Date;
|
||||||
|
endDate: Date;
|
||||||
|
}): Promise<IPedometerData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaInstance,
|
||||||
|
Plugin,
|
||||||
|
IonicNativePlugin,
|
||||||
|
checkAvailability
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
declare const Notification: any;
|
declare const Notification: any;
|
||||||
|
|
||||||
@ -7,22 +13,25 @@ declare const Notification: any;
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class PLNObject {
|
export class PLNObject {
|
||||||
|
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(title: string, options: LocalNotificationOptions) {
|
constructor(title: string, options: LocalNotificationOptions) {
|
||||||
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
|
if (
|
||||||
|
checkAvailability(
|
||||||
|
PhonegapLocalNotification.pluginRef,
|
||||||
|
null,
|
||||||
|
PhonegapLocalNotification.pluginName
|
||||||
|
) === true
|
||||||
|
) {
|
||||||
this._objectInstance = new Notification(title, options);
|
this._objectInstance = new Notification(title, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
close(): void { }
|
close(): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LocalNotificationOptions {
|
export interface LocalNotificationOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the direction of the notification. One of "auto", "ltr" or "rtl"
|
* Sets the direction of the notification. One of "auto", "ltr" or "rtl"
|
||||||
*/
|
*/
|
||||||
@ -47,7 +56,6 @@ export interface LocalNotificationOptions {
|
|||||||
* Sets the icon of the notification
|
* Sets the icon of the notification
|
||||||
*/
|
*/
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,20 +102,22 @@ export interface LocalNotificationOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PhonegapLocalNotification extends IonicNativePlugin {
|
export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A global object that lets you interact with the Notification API.
|
* A global object that lets you interact with the Notification API.
|
||||||
* @param title {string} Title of the local notification.
|
* @param title {string} Title of the local notification.
|
||||||
* @param Options {LocalNotificationOptions} An object containing optional property/value pairs.
|
* @param Options {LocalNotificationOptions} An object containing optional property/value pairs.
|
||||||
* @returns {PLNObject}
|
* @returns {PLNObject}
|
||||||
*/
|
*/
|
||||||
create(title: string, options: LocalNotificationOptions) { return new PLNObject(title, options); }
|
create(title: string, options: LocalNotificationOptions) {
|
||||||
|
return new PLNObject(title, options);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* requests permission from the user to show a local notification.
|
* requests permission from the user to show a local notification.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestPermission(): Promise<any> { return; }
|
requestPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
import { Plugin, Cordova, IonicNativePlugin, CordovaOptions, wrap } from '@ionic-native/core';
|
import {
|
||||||
|
Plugin,
|
||||||
|
Cordova,
|
||||||
|
IonicNativePlugin,
|
||||||
|
CordovaOptions,
|
||||||
|
wrap
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observer } from 'rxjs/Observer';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
@ -22,12 +28,22 @@ export interface CordovaFiniteObservableOptions extends CordovaOptions {
|
|||||||
*
|
*
|
||||||
* Wraps method that returns an observable that can be completed. Provided opts.resultFinalPredicate dictates when the observable completes.
|
* Wraps method that returns an observable that can be completed. Provided opts.resultFinalPredicate dictates when the observable completes.
|
||||||
*/
|
*/
|
||||||
export function CordovaFiniteObservable(opts: CordovaFiniteObservableOptions = {}) {
|
export function CordovaFiniteObservable(
|
||||||
|
opts: CordovaFiniteObservableOptions = {}
|
||||||
|
) {
|
||||||
opts.observable = true;
|
opts.observable = true;
|
||||||
return (target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>) => {
|
return (
|
||||||
|
target: Object,
|
||||||
|
methodName: string,
|
||||||
|
descriptor: TypedPropertyDescriptor<any>
|
||||||
|
) => {
|
||||||
return {
|
return {
|
||||||
value: function(...args: any[]) {
|
value(...args: any[]) {
|
||||||
const wrappedObservable: Observable<any> = wrap(this, methodName, opts).apply(this, args);
|
const wrappedObservable: Observable<any> = wrap(
|
||||||
|
this,
|
||||||
|
methodName,
|
||||||
|
opts
|
||||||
|
).apply(this, args);
|
||||||
return new Observable<any>((observer: Observer<any>) => {
|
return new Observable<any>((observer: Observer<any>) => {
|
||||||
const wrappedSubscription = wrappedObservable.subscribe({
|
const wrappedSubscription = wrappedObservable.subscribe({
|
||||||
next: (x: any) => {
|
next: (x: any) => {
|
||||||
@ -36,8 +52,12 @@ export function CordovaFiniteObservable(opts: CordovaFiniteObservableOptions = {
|
|||||||
observer.complete();
|
observer.complete();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: (err: any) => { observer.error(err); },
|
error: (err: any) => {
|
||||||
complete: () => { observer.complete(); }
|
observer.error(err);
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
observer.complete();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return () => {
|
return () => {
|
||||||
wrappedSubscription.unsubscribe();
|
wrappedSubscription.unsubscribe();
|
||||||
@ -91,13 +111,13 @@ export function CordovaFiniteObservable(opts: CordovaFiniteObservableOptions = {
|
|||||||
plugin: 'cordova-plugin-photo-library',
|
plugin: 'cordova-plugin-photo-library',
|
||||||
pluginRef: 'cordova.plugins.photoLibrary',
|
pluginRef: 'cordova.plugins.photoLibrary',
|
||||||
repo: 'https://github.com/terikon/cordova-plugin-photo-library',
|
repo: 'https://github.com/terikon/cordova-plugin-photo-library',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
|
||||||
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
|
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
|
||||||
platforms: ['Android', 'Browser', 'iOS']
|
platforms: ['Android', 'Browser', 'iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PhotoLibrary extends IonicNativePlugin {
|
export class PhotoLibrary extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves library items. Library item contains photo metadata like width and height, as well as photoURL and thumbnailURL.
|
* Retrieves library items. Library item contains photo metadata like width and height, as well as photoURL and thumbnailURL.
|
||||||
* @param options {GetLibraryOptions} Optional, like thumbnail size and chunks settings.
|
* @param options {GetLibraryOptions} Optional, like thumbnail size and chunks settings.
|
||||||
@ -108,7 +128,9 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
resultFinalPredicate: 'isLastChunk',
|
resultFinalPredicate: 'isLastChunk',
|
||||||
resultTransform: 'library'
|
resultTransform: 'library'
|
||||||
})
|
})
|
||||||
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> { return; }
|
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asks user permission to access photo library.
|
* Asks user permission to access photo library.
|
||||||
@ -118,7 +140,9 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
requestAuthorization(options?: RequestAuthorizationOptions): Promise<void> { return; }
|
requestAuthorization(options?: RequestAuthorizationOptions): Promise<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns list of photo albums on device.
|
* Returns list of photo albums on device.
|
||||||
@ -127,7 +151,9 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getAlbums(): Promise<AlbumItem[]> { return; }
|
getAlbums(): Promise<AlbumItem[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides means to request URL of thumbnail, with specified size or quality.
|
* Provides means to request URL of thumbnail, with specified size or quality.
|
||||||
@ -139,7 +165,12 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getThumbnailURL(photo: string | LibraryItem, options?: GetThumbnailOptions): Promise<string> { return; }
|
getThumbnailURL(
|
||||||
|
photo: string | LibraryItem,
|
||||||
|
options?: GetThumbnailOptions
|
||||||
|
): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides means to request photo URL by id.
|
* Provides means to request photo URL by id.
|
||||||
@ -151,7 +182,9 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getPhotoURL(photo: string | LibraryItem, options?: any): Promise<string> { return; }
|
getPhotoURL(photo: string | LibraryItem, options?: any): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns thumbnail as Blob.
|
* Returns thumbnail as Blob.
|
||||||
@ -163,7 +196,12 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getThumbnail(photo: string | LibraryItem, options?: GetThumbnailOptions): Promise<Blob> { return; }
|
getThumbnail(
|
||||||
|
photo: string | LibraryItem,
|
||||||
|
options?: GetThumbnailOptions
|
||||||
|
): Promise<Blob> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns photo as Blob.
|
* Returns photo as Blob.
|
||||||
@ -175,7 +213,9 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getPhoto(photo: string | LibraryItem, options?: any): Promise<Blob> { return; }
|
getPhoto(photo: string | LibraryItem, options?: any): Promise<Blob> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves image to specified album. Album will be created if not exists.
|
* Saves image to specified album. Album will be created if not exists.
|
||||||
@ -189,7 +229,13 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
saveImage(url: string, album: AlbumItem | string, options?: GetThumbnailOptions): Promise<LibraryItem> { return; }
|
saveImage(
|
||||||
|
url: string,
|
||||||
|
album: AlbumItem | string,
|
||||||
|
options?: GetThumbnailOptions
|
||||||
|
): Promise<LibraryItem> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves video to specified album. Album will be created if not exists.
|
* Saves video to specified album. Album will be created if not exists.
|
||||||
@ -201,8 +247,9 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
saveVideo(url: string, album: AlbumItem | string): Promise<void> { return; }
|
saveVideo(url: string, album: AlbumItem | string): Promise<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +39,6 @@ export class PhotoViewer extends IonicNativePlugin {
|
|||||||
* @param title {string}
|
* @param title {string}
|
||||||
* @param options {PhotoViewerOptions}
|
* @param options {PhotoViewerOptions}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
show(url: string, title?: string, options?: PhotoViewerOptions): void { }
|
show(url: string, title?: string, options?: PhotoViewerOptions): void {}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Pin Check
|
* @name Pin Check
|
||||||
* @description
|
* @description
|
||||||
* This plugin is for use with Apache Cordova and allows your application to check whether pin/keyguard or passcode is setup on iOS and Android phones.
|
* This plugin is for use with Apache Cordova and allows your application to check whether pin/keyguard or passcode is setup on iOS and Android phones.
|
||||||
*
|
*
|
||||||
@ -34,7 +34,7 @@ import { Injectable } from '@angular/core';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class PinCheck extends IonicNativePlugin {
|
export class PinCheck extends IonicNativePlugin {
|
||||||
/**
|
/**
|
||||||
* check whether pin/keyguard or passcode is setup
|
* check whether pin/keyguard or passcode is setup
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Pin Dialog
|
* @name Pin Dialog
|
||||||
* @description
|
* @description
|
||||||
* PhoneGap numeric password dialog plugin for Android and iOS.
|
* PhoneGap numeric password dialog plugin for Android and iOS.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-pin-dialog`. For more info, please see the [Pin Dialog plugin docs](https://github.com/Paldom/PinDialog).
|
* Requires Cordova plugin: `cordova-plugin-pin-dialog`. For more info, please see the [Pin Dialog plugin docs](https://github.com/Paldom/PinDialog).
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
@ -47,6 +46,11 @@ export class PinDialog extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 4 // no error callback
|
errorIndex: 4 // no error callback
|
||||||
})
|
})
|
||||||
prompt(message: string, title: string, buttons: string[]): Promise<{ buttonIndex: number, input1: string }> { return; }
|
prompt(
|
||||||
|
message: string,
|
||||||
|
title: string,
|
||||||
|
buttons: string[]
|
||||||
|
): Promise<{ buttonIndex: number; input1: string }> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Plugin,
|
||||||
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
export interface PinterestUser {
|
export interface PinterestUser {
|
||||||
/**
|
/**
|
||||||
@ -172,13 +177,13 @@ export interface PinterestPin {
|
|||||||
plugin: 'cordova-plugin-pinterest',
|
plugin: 'cordova-plugin-pinterest',
|
||||||
pluginRef: 'cordova.plugins.Pinterest',
|
pluginRef: 'cordova.plugins.Pinterest',
|
||||||
repo: 'https://github.com/zyramedia/cordova-plugin-pinterest',
|
repo: 'https://github.com/zyramedia/cordova-plugin-pinterest',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-pinterest --variable APP_ID=YOUR_APP_ID',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-pinterest --variable APP_ID=YOUR_APP_ID',
|
||||||
installVariables: ['APP_ID'],
|
installVariables: ['APP_ID'],
|
||||||
platforms: ['Android', 'iOS']
|
platforms: ['Android', 'iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Pinterest extends IonicNativePlugin {
|
export class Pinterest extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for authentication scopes
|
* Convenience constant for authentication scopes
|
||||||
*/
|
*/
|
||||||
@ -196,7 +201,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} The response object will contain the user's profile data, as well as the access token (if you need to use it elsewhere, example: send it to your server and perform actions on behalf of the user).
|
* @returns {Promise<any>} The response object will contain the user's profile data, as well as the access token (if you need to use it elsewhere, example: send it to your server and perform actions on behalf of the user).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
login(scopes: string[]): Promise<any> { return; }
|
login(scopes: string[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the authenticated user's profile
|
* Gets the authenticated user's profile
|
||||||
@ -206,7 +213,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMe(fields?: string): Promise<PinterestUser> { return; }
|
getMe(fields?: string): Promise<PinterestUser> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -217,7 +226,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMyPins(fields?: string, limit?: number): Promise<Array<PinterestPin>> { return; }
|
getMyPins(fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -228,7 +239,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMyBoards(fields?: string, limit?: number): Promise<Array<PinterestBoard>> { return; }
|
getMyBoards(fields?: string, limit?: number): Promise<PinterestBoard[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the authenticated user's likes.
|
* Get the authenticated user's likes.
|
||||||
@ -239,7 +252,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMyLikes(fields?: string, limit?: number): Promise<Array<PinterestPin>> { return; }
|
getMyLikes(fields?: string, limit?: number): Promise<PinterestPin[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the authenticated user's followers.
|
* Get the authenticated user's followers.
|
||||||
@ -250,7 +265,12 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMyFollowers(fields?: string, limit?: number): Promise<Array<PinterestUser>> { return; }
|
getMyFollowers(
|
||||||
|
fields?: string,
|
||||||
|
limit?: number
|
||||||
|
): Promise<PinterestUser[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the authenticated user's followed boards.
|
* Get the authenticated user's followed boards.
|
||||||
@ -261,7 +281,12 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMyFollowedBoards(fields?: string, limit?: number): Promise<Array<PinterestBoard>> { return; }
|
getMyFollowedBoards(
|
||||||
|
fields?: string,
|
||||||
|
limit?: number
|
||||||
|
): Promise<PinterestBoard[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the authenticated user's followed interests.
|
* Get the authenticated user's followed interests.
|
||||||
@ -272,7 +297,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getMyFollowedInterests(fields?: string, limit?: number): Promise<any> { return; }
|
getMyFollowedInterests(fields?: string, limit?: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a user's profile.
|
* Get a user's profile.
|
||||||
@ -284,7 +311,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getUser(username: string, fields?: string): Promise<PinterestUser> { return; }
|
getUser(username: string, fields?: string): Promise<PinterestUser> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a board's data.
|
* Get a board's data.
|
||||||
@ -296,7 +325,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getBoard(boardId: string, fields?: string): Promise<PinterestBoard> { return; }
|
getBoard(boardId: string, fields?: string): Promise<PinterestBoard> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Pins of a specific board.
|
* Get Pins of a specific board.
|
||||||
@ -309,7 +340,13 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getBoardPins(boardId: string, fields?: string, limit?: number): Promise<Array<PinterestPin>> { return; }
|
getBoardPins(
|
||||||
|
boardId: string,
|
||||||
|
fields?: string,
|
||||||
|
limit?: number
|
||||||
|
): Promise<PinterestPin[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a board.
|
* Delete a board.
|
||||||
@ -317,7 +354,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
* @returns {Promise<PinterestUser>}
|
* @returns {Promise<PinterestUser>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteBoard(boardId: string): Promise<any> { return; }
|
deleteBoard(boardId: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new board for the authenticated user.
|
* Create a new board for the authenticated user.
|
||||||
@ -329,7 +368,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
createBoard(name: string, desc?: string): Promise<PinterestBoard> { return; }
|
createBoard(name: string, desc?: string): Promise<PinterestBoard> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Pin by ID.
|
* Get a Pin by ID.
|
||||||
@ -341,7 +382,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getPin(pinId: string, fields?: string): Promise<PinterestPin> { return; }
|
getPin(pinId: string, fields?: string): Promise<PinterestPin> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a pin
|
* Deletes a pin
|
||||||
@ -349,7 +392,9 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deletePin(pinId: string): Promise<any> { return; }
|
deletePin(pinId: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Pin
|
* Creates a Pin
|
||||||
@ -363,6 +408,12 @@ export class Pinterest extends IonicNativePlugin {
|
|||||||
successIndex: 4,
|
successIndex: 4,
|
||||||
errorIndex: 5
|
errorIndex: 5
|
||||||
})
|
})
|
||||||
createPin(note: string, boardId: string, imageUrl: string, link?: string): Promise<PinterestPin> { return; }
|
createPin(
|
||||||
|
note: string,
|
||||||
|
boardId: string,
|
||||||
|
imageUrl: string,
|
||||||
|
link?: string
|
||||||
|
): Promise<PinterestPin> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,17 +110,17 @@ export class ProDeploy {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* constructor(private pro: Pro) { }
|
* constructor(private pro: Pro) { }
|
||||||
*
|
*
|
||||||
* // Get app info
|
* // Get app info
|
||||||
* this.pro.getAppInfo().then((res: AppInfo) => {
|
* this.pro.getAppInfo().then((res: AppInfo) => {
|
||||||
* console.log(res)
|
* console.log(res)
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
* // Get live update info
|
* // Get live update info
|
||||||
* this.pro.deploy.info().then((res: DeployInfo) => {
|
* this.pro.deploy.info().then((res: DeployInfo) => {
|
||||||
* console.log(res)
|
* console.log(res)
|
||||||
* })
|
* })
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Pro',
|
pluginName: 'Pro',
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
Plugin,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +40,7 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
* );
|
* );
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @advanced
|
* @advanced
|
||||||
*
|
*
|
||||||
* Accepted orientation values:
|
* Accepted orientation values:
|
||||||
@ -59,7 +64,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ScreenOrientation extends IonicNativePlugin {
|
export class ScreenOrientation extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience enum for possible orientations
|
* Convenience enum for possible orientations
|
||||||
*/
|
*/
|
||||||
@ -81,7 +85,9 @@ export class ScreenOrientation extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'orientationchange'
|
event: 'orientationchange'
|
||||||
})
|
})
|
||||||
onChange(): Observable<void> { return; }
|
onChange(): Observable<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lock the orientation to the passed value.
|
* Lock the orientation to the passed value.
|
||||||
@ -90,18 +96,19 @@ export class ScreenOrientation extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
lock(orientation: string): Promise<any> { return; }
|
lock(orientation: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlock and allow all orientations.
|
* Unlock and allow all orientations.
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
unlock(): void { }
|
unlock(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current orientation of the device.
|
* Get the current orientation of the device.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
type: string;
|
type: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ export class SiriShortcuts extends IonicNativePlugin {
|
|||||||
* @return Promise<void>
|
* @return Promise<void>
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
remove(persistentIdentifiers: string|string[]): Promise<void> {
|
remove(persistentIdentifiers: string | string[]): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ export class SiriShortcuts extends IonicNativePlugin {
|
|||||||
* @return Promise<SiriShortcut|null>
|
* @return Promise<SiriShortcut|null>
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getActivatedShortcut(): Promise<SiriShortcut|null> {
|
getActivatedShortcut(): Promise<SiriShortcut | null> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
|||||||
})
|
})
|
||||||
startListening(
|
startListening(
|
||||||
options?: SpeechRecognitionListeningOptions
|
options?: SpeechRecognitionListeningOptions
|
||||||
): Observable<Array<string>> {
|
): Observable<string[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
|||||||
* @return {Promise< Array<string> >} list of languages
|
* @return {Promise< Array<string> >} list of languages
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getSupportedLanguages(): Promise<Array<string>> {
|
getSupportedLanguages(): Promise<string[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ export class SQLiteObject {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> {
|
sqlBatch(sqlStatements: (string | string[] | any)[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@ export interface ImageObj {
|
|||||||
openCashDrawer?: boolean;
|
openCashDrawer?: boolean;
|
||||||
}
|
}
|
||||||
export interface PrintCommand {
|
export interface PrintCommand {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Characther encoding is used to getByte data from all subsequent commands. Default 'US-ASCII'
|
* Characther encoding is used to getByte data from all subsequent commands. Default 'US-ASCII'
|
||||||
* Choose the format of the return value Defined in StarPRNT.Encoding or the Encoding enum.
|
* Choose the format of the return value Defined in StarPRNT.Encoding or the Encoding enum.
|
||||||
@ -137,13 +136,13 @@ export interface PrintCommand {
|
|||||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||||
* Example: {appendBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
* Example: {appendBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||||
*/
|
*/
|
||||||
appendBytes?: Array<number>;
|
appendBytes?: number[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||||
* Example: {appendRawBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
* Example: {appendRawBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||||
*/
|
*/
|
||||||
appendRawBytes?: Array<number>;
|
appendRawBytes?: number[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set command of the character space is generated and added to the command buffer. Character Spacs (Unit: Dots) Example: 4
|
* Set command of the character space is generated and added to the command buffer. Character Spacs (Unit: Dots) Example: 4
|
||||||
@ -156,7 +155,7 @@ export interface PrintCommand {
|
|||||||
appendEmphasis?: string;
|
appendEmphasis?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable emphasis mode is generated and added to the command buffer. Example: {enableEmphasis:true}
|
* Enable emphasis mode is generated and added to the command buffer. Example: {enableEmphasis:true}
|
||||||
*/
|
*/
|
||||||
enableEmphasis?: boolean;
|
enableEmphasis?: boolean;
|
||||||
|
|
||||||
@ -242,7 +241,7 @@ export interface PrintCommand {
|
|||||||
* Example: {appendHorizontalTabPosition:[15, 35]}
|
* Example: {appendHorizontalTabPosition:[15, 35]}
|
||||||
* Delete positions Example: {appendHorizontalTabPosition:[]}
|
* Delete positions Example: {appendHorizontalTabPosition:[]}
|
||||||
*/
|
*/
|
||||||
appendHorizontalTabPosition?: Array<number>;
|
appendHorizontalTabPosition?: number[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print command of the logo is generated and added to the command buffer. The logo has to be uploaded to the printer using the Star Print utility.
|
* Print command of the logo is generated and added to the command buffer. The logo has to be uploaded to the printer using the Star Print utility.
|
||||||
@ -335,7 +334,7 @@ export interface PrintCommand {
|
|||||||
* Example: {enableMultiple:true, width:2, height:2}
|
* Example: {enableMultiple:true, width:2, height:2}
|
||||||
* Disable Example: {enableMultiple:false}
|
* Disable Example: {enableMultiple:false}
|
||||||
*/
|
*/
|
||||||
enableMultiple?: boolean;
|
enableMultiple?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print command of the QR code is generated and added to the command buffer.
|
* Print command of the QR code is generated and added to the command buffer.
|
||||||
@ -420,7 +419,7 @@ export enum Emulation {
|
|||||||
/** SM-S210i, SM-S220i, SM-S230i, SM-T300i/T300, SM-T400i */
|
/** SM-S210i, SM-S220i, SM-S230i, SM-T300i/T300, SM-T400i */
|
||||||
EscPosMobile = 'EscPosMobile',
|
EscPosMobile = 'EscPosMobile',
|
||||||
/** SP700 */
|
/** SP700 */
|
||||||
StarDotImpact = 'StarDotImpact',
|
StarDotImpact = 'StarDotImpact'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -651,18 +650,17 @@ export interface CommandsArray extends Array<PrintCommand> {}
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class StarPRNT extends IonicNativePlugin {
|
export class StarPRNT extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for Emulation
|
* Constant for Emulation
|
||||||
*/
|
*/
|
||||||
Emulation = {
|
Emulation = {
|
||||||
StarPRNT: 'StarPRNT',
|
StarPRNT: 'StarPRNT',
|
||||||
StarPRNTL: 'StarPRNTL',
|
StarPRNTL: 'StarPRNTL',
|
||||||
StarLine: 'StarLine',
|
StarLine: 'StarLine',
|
||||||
StarGraphic: 'StarGraphic',
|
StarGraphic: 'StarGraphic',
|
||||||
EscPos: 'EscPos',
|
EscPos: 'EscPos',
|
||||||
EscPosMobile: 'EscPosMobile',
|
EscPosMobile: 'EscPosMobile',
|
||||||
StarDotImpact: 'StarDotImpact',
|
StarDotImpact: 'StarDotImpact'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -958,7 +956,11 @@ export class StarPRNT extends IonicNativePlugin {
|
|||||||
observable: true,
|
observable: true,
|
||||||
callbackStyle: 'node'
|
callbackStyle: 'node'
|
||||||
})
|
})
|
||||||
connect(port: string, emulation: string, hasBarcodeReader: boolean): Observable<any> {
|
connect(
|
||||||
|
port: string,
|
||||||
|
emulation: string,
|
||||||
|
hasBarcodeReader: boolean
|
||||||
|
): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
Plugin,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Status Bar
|
* @name Status Bar
|
||||||
@ -42,7 +47,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
overlaysWebView(doesOverlay: boolean) { };
|
overlaysWebView(doesOverlay: boolean) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the default statusbar (dark text, for light backgrounds).
|
* Use the default statusbar (dark text, for light backgrounds).
|
||||||
@ -50,7 +55,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
styleDefault() { };
|
styleDefault() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the lightContent statusbar (light text, for dark backgrounds).
|
* Use the lightContent statusbar (light text, for dark backgrounds).
|
||||||
@ -58,7 +63,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
styleLightContent() { };
|
styleLightContent() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||||
@ -66,7 +71,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
styleBlackTranslucent() { };
|
styleBlackTranslucent() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||||
@ -74,7 +79,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
styleBlackOpaque() { };
|
styleBlackOpaque() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the status bar to a specific named color. Valid options:
|
* Set the status bar to a specific named color. Valid options:
|
||||||
@ -87,7 +92,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
backgroundColorByName(colorName: string) { };
|
backgroundColorByName(colorName: string) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
||||||
@ -99,7 +104,7 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
backgroundColorByHexString(hexString: string) { };
|
backgroundColorByHexString(hexString: string) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the StatusBar
|
* Hide the StatusBar
|
||||||
@ -107,20 +112,19 @@ export class StatusBar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
hide() { };
|
hide() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the StatusBar
|
* Show the StatusBar
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
show() { };
|
show() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the StatusBar is currently visible or not.
|
* Whether the StatusBar is currently visible or not.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
isVisible: boolean;
|
isVisible: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@ export interface StreamingAudioOptions {
|
|||||||
bgColor?: string;
|
bgColor?: string;
|
||||||
/** Background image for audio player. */
|
/** Background image for audio player. */
|
||||||
bgImage?: string;
|
bgImage?: string;
|
||||||
/**
|
/**
|
||||||
* Background image scale for audio player.
|
* Background image scale for audio player.
|
||||||
* Valid values are:
|
* Valid values are:
|
||||||
* fit
|
* fit
|
||||||
* stretch
|
* stretch
|
||||||
* aspectStretch.
|
* aspectStretch.
|
||||||
@ -35,9 +35,9 @@ export interface StreamingAudioOptions {
|
|||||||
bgImageScale?: string;
|
bgImageScale?: string;
|
||||||
/** Start audio player in full screen. iOS only. */
|
/** Start audio player in full screen. iOS only. */
|
||||||
initFullscreen?: boolean;
|
initFullscreen?: boolean;
|
||||||
/**
|
/**
|
||||||
* Keeps the screen lit and stops it from locking
|
* Keeps the screen lit and stops it from locking
|
||||||
* while audio is playing. Android only.
|
* while audio is playing. Android only.
|
||||||
*/
|
*/
|
||||||
keepAwake?: boolean;
|
keepAwake?: boolean;
|
||||||
/** Executes after success playing audio. */
|
/** Executes after success playing audio. */
|
||||||
@ -87,7 +87,7 @@ export class StreamingMedia extends IonicNativePlugin {
|
|||||||
* @param options {StreamingVideoOptions} Options
|
* @param options {StreamingVideoOptions} Options
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
playVideo(videoUrl: string, options?: StreamingVideoOptions): void { }
|
playVideo(videoUrl: string, options?: StreamingVideoOptions): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Streams an audio
|
* Streams an audio
|
||||||
@ -95,24 +95,23 @@ export class StreamingMedia extends IonicNativePlugin {
|
|||||||
* @param options {StreamingAudioOptions} Options
|
* @param options {StreamingAudioOptions} Options
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
playAudio(audioUrl: string, options?: StreamingAudioOptions): void { }
|
playAudio(audioUrl: string, options?: StreamingAudioOptions): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops streaming audio
|
* Stops streaming audio
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
stopAudio(): void { }
|
stopAudio(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pauses streaming audio
|
* Pauses streaming audio
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true, platforms: ['iOS'] })
|
@Cordova({ sync: true, platforms: ['iOS'] })
|
||||||
pauseAudio(): void { }
|
pauseAudio(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resumes streaming audio
|
* Resumes streaming audio
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true, platforms: ['iOS'] })
|
@Cordova({ sync: true, platforms: ['iOS'] })
|
||||||
resumeAudio(): void { }
|
resumeAudio(): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { Injectable } from '@angular/core';
|
|||||||
* @description
|
* @description
|
||||||
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
|
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
|
||||||
* Makes the IDFA and Google Ad Identifier available in the Tealium data layer.
|
* Makes the IDFA and Google Ad Identifier available in the Tealium data layer.
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import { TealiumAdIdentifier } from '@ionic-native/tealium-adidentifier';
|
* import { TealiumAdIdentifier } from '@ionic-native/tealium-adidentifier';
|
||||||
@ -30,12 +30,10 @@ import { Injectable } from '@angular/core';
|
|||||||
pluginRef: 'window.tealiumAdIdentifier', // the variable reference to call the plugin, example: navigator.geolocation
|
pluginRef: 'window.tealiumAdIdentifier', // the variable reference to call the plugin, example: navigator.geolocation
|
||||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
install: '' // OPTIONAL install command, in case the plugin requires variables
|
||||||
})
|
})
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TealiumAdIdentifier extends IonicNativePlugin {
|
export class TealiumAdIdentifier extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function stores the ad identifier information as persistent data
|
* This function stores the ad identifier information as persistent data
|
||||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||||
@ -55,5 +53,4 @@ export class TealiumAdIdentifier extends IonicNativePlugin {
|
|||||||
setVolatile(instanceName: string): Promise<any> {
|
setVolatile(instanceName: string): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { Injectable } from '@angular/core';
|
|||||||
* @description
|
* @description
|
||||||
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
|
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
|
||||||
* Implements a Broadcast Receiver for the INSTALL_REFERRER intent.
|
* Implements a Broadcast Receiver for the INSTALL_REFERRER intent.
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import { TealiumInstallReferrer } from '@ionic-native/tealium-installreferrer';
|
* import { TealiumInstallReferrer } from '@ionic-native/tealium-installreferrer';
|
||||||
@ -15,7 +15,7 @@ import { Injectable } from '@angular/core';
|
|||||||
*
|
*
|
||||||
* constructor(private installReferrer: TealiumInstallReferrer) { }
|
* constructor(private installReferrer: TealiumInstallReferrer) { }
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* this.installReferrer.setPersistent("main");
|
* this.installReferrer.setPersistent("main");
|
||||||
* this.installReferrer.setVolatile("main");
|
* this.installReferrer.setVolatile("main");
|
||||||
*
|
*
|
||||||
@ -30,12 +30,10 @@ import { Injectable } from '@angular/core';
|
|||||||
pluginRef: 'window.tealiumInstallReferrer', // the variable reference to call the plugin, example: navigator.geolocation
|
pluginRef: 'window.tealiumInstallReferrer', // the variable reference to call the plugin, example: navigator.geolocation
|
||||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||||
platforms: ['Android'], // Array of platforms supported, example: ['Android', 'iOS']
|
platforms: ['Android'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
install: '' // OPTIONAL install command, in case the plugin requires variables
|
||||||
})
|
})
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TealiumInstallReferrer extends IonicNativePlugin {
|
export class TealiumInstallReferrer extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function stores the install referrer information as persistent data
|
* This function stores the install referrer information as persistent data
|
||||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||||
@ -55,5 +53,4 @@ export class TealiumInstallReferrer extends IonicNativePlugin {
|
|||||||
setVolatile(instanceName: string): Promise<any> {
|
setVolatile(instanceName: string): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,38 +2,38 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
export interface TealConfig {
|
export interface TealConfig {
|
||||||
/**
|
/**
|
||||||
* Your Tealium account name
|
* Your Tealium account name
|
||||||
*/
|
*/
|
||||||
account: string;
|
account: string;
|
||||||
/**
|
/**
|
||||||
* Your Tealium profile name
|
* Your Tealium profile name
|
||||||
*/
|
*/
|
||||||
profile: string;
|
profile: string;
|
||||||
/**
|
/**
|
||||||
* Your Tealium environment name (dev, qa, prod)
|
* Your Tealium environment name (dev, qa, prod)
|
||||||
*/
|
*/
|
||||||
environment: string;
|
environment: string;
|
||||||
/**
|
/**
|
||||||
* Arbitrary instance name string. Must be consistent for all calls to Tealium API.
|
* Arbitrary instance name string. Must be consistent for all calls to Tealium API.
|
||||||
*/
|
*/
|
||||||
instance: string;
|
instance: string;
|
||||||
/**
|
/**
|
||||||
* Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted.
|
* Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted.
|
||||||
*/
|
*/
|
||||||
isLifecycleEnabled?: string;
|
isLifecycleEnabled?: string;
|
||||||
/**
|
/**
|
||||||
* Not usually required. Sets a custom URL override for dispatches to UDH.
|
* Not usually required. Sets a custom URL override for dispatches to UDH.
|
||||||
*/
|
*/
|
||||||
collectDispatchURL?: string;
|
collectDispatchURL?: string;
|
||||||
/**
|
/**
|
||||||
* Your Tealium UDH profile. Only active if you do not have collectDispatchURL set.
|
* Your Tealium UDH profile. Only active if you do not have collectDispatchURL set.
|
||||||
*/
|
*/
|
||||||
collectDispatchProfile?: string;
|
collectDispatchProfile?: string;
|
||||||
/**
|
/**
|
||||||
* Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted.
|
* Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted.
|
||||||
*/
|
*/
|
||||||
isCrashReporterEnabled?: string;
|
isCrashReporterEnabled?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,14 +76,12 @@ export interface TealConfig {
|
|||||||
pluginRef: 'window.tealium', // the variable reference to call the plugin, example: navigator.geolocation
|
pluginRef: 'window.tealium', // the variable reference to call the plugin, example: navigator.geolocation
|
||||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
install: '' // OPTIONAL install command, in case the plugin requires variables
|
||||||
})
|
})
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Tealium extends IonicNativePlugin {
|
export class Tealium extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function initializes the Tealium Cordova plugin.
|
* This function initializes the Tealium Cordova plugin.
|
||||||
* This should usually be done inside the "deviceReady" handler.
|
* This should usually be done inside the "deviceReady" handler.
|
||||||
* @param config {TealConfig}
|
* @param config {TealConfig}
|
||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
@ -123,7 +121,11 @@ export class Tealium extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
track(eventType: string, dataObject: any, instanceName: string): Promise<any> {
|
track(
|
||||||
|
eventType: string,
|
||||||
|
dataObject: any,
|
||||||
|
instanceName: string
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +137,11 @@ export class Tealium extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addPersistent(keyName: string, value: string | string[] | any, instanceName: string): Promise<any> {
|
addPersistent(
|
||||||
|
keyName: string,
|
||||||
|
value: string | string[] | any,
|
||||||
|
instanceName: string
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +153,11 @@ export class Tealium extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addVolatile(keyName: string, value: string | string[], instanceName: string): Promise<any> {
|
addVolatile(
|
||||||
|
keyName: string,
|
||||||
|
value: string | string[],
|
||||||
|
instanceName: string
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,10 +191,14 @@ export class Tealium extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getPersistent(keyName: string, instanceName: string, callback: any): Promise<any> {
|
getPersistent(
|
||||||
|
keyName: string,
|
||||||
|
instanceName: string,
|
||||||
|
callback: any
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This function retrieves a value from the Tealium Volatile data store
|
* This function retrieves a value from the Tealium Volatile data store
|
||||||
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
||||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||||
@ -192,19 +206,27 @@ export class Tealium extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getVolatile(keyName: string, instanceName: string, callback: any): Promise<any> {
|
getVolatile(
|
||||||
|
keyName: string,
|
||||||
|
instanceName: string,
|
||||||
|
callback: any
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function adds a remote command for later execution
|
* This function adds a remote command for later execution
|
||||||
* @param commandName {string} The command name for this Remote Command
|
* @param commandName {string} The command name for this Remote Command
|
||||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addRemoteCommand(commandName: string, instanceName: string, callback: any): Promise<any> {
|
addRemoteCommand(
|
||||||
|
commandName: string,
|
||||||
|
instanceName: string,
|
||||||
|
callback: any
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,5 +238,4 @@ export class Tealium extends IonicNativePlugin {
|
|||||||
getVisitorId(): Promise<any> {
|
getVisitorId(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ export interface ThreeDeeTouchForceTouch {
|
|||||||
* @name 3D Touch
|
* @name 3D Touch
|
||||||
* @description
|
* @description
|
||||||
* The 3D Touch plugin adds 3D Touch capabilities to your Cordova app.
|
* The 3D Touch plugin adds 3D Touch capabilities to your Cordova app.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-3dtouch`. For more info, please see the [3D Touch plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-3dtouch).
|
* Requires Cordova plugin: `cordova-plugin-3dtouch`. For more info, please see the [3D Touch plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-3dtouch).
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
|
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
|
||||||
* ```typescript
|
* ```typescript
|
||||||
@ -160,7 +160,7 @@ export class ThreeDeeTouch extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void { }
|
configureQuickActions(quickActions: ThreeDeeTouchQuickAction[]): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
||||||
|
@ -46,17 +46,22 @@ import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class Uid extends IonicNativePlugin {
|
export class Uid extends IonicNativePlugin {
|
||||||
/** Get the device Universally Unique Identifier (UUID). */
|
/** Get the device Universally Unique Identifier (UUID). */
|
||||||
@CordovaProperty UUID: string;
|
@CordovaProperty
|
||||||
|
UUID: string;
|
||||||
|
|
||||||
/** Get the device International Mobile Station Equipment Identity (IMEI). */
|
/** Get the device International Mobile Station Equipment Identity (IMEI). */
|
||||||
@CordovaProperty IMEI: string;
|
@CordovaProperty
|
||||||
|
IMEI: string;
|
||||||
|
|
||||||
/** Get the device International mobile Subscriber Identity (IMSI). */
|
/** Get the device International mobile Subscriber Identity (IMSI). */
|
||||||
@CordovaProperty IMSI: string;
|
@CordovaProperty
|
||||||
|
IMSI: string;
|
||||||
|
|
||||||
/** Get the sim Integrated Circuit Card Identifier (ICCID). */
|
/** Get the sim Integrated Circuit Card Identifier (ICCID). */
|
||||||
@CordovaProperty ICCID: string;
|
@CordovaProperty
|
||||||
|
ICCID: string;
|
||||||
|
|
||||||
/** Get the Media Access Control address (MAC). */
|
/** Get the Media Access Control address (MAC). */
|
||||||
@CordovaProperty MAC: string;
|
@CordovaProperty
|
||||||
|
MAC: string;
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,6 @@ export class Vibration extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
vibrate(time: number | Array<number>) { }
|
vibrate(time: number | number[]) { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,10 @@ export interface MediaFile {
|
|||||||
* @param {Function} successCallback
|
* @param {Function} successCallback
|
||||||
* @param {Function} [errorCallback]
|
* @param {Function} [errorCallback]
|
||||||
*/
|
*/
|
||||||
getFormatData(successCallback: (data: MediaFileData) => any, errorCallback?: (err: any) => any): any;
|
getFormatData(
|
||||||
|
successCallback: (data: MediaFileData) => any,
|
||||||
|
errorCallback?: (err: any) => any
|
||||||
|
): any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MediaFileData {
|
export interface MediaFileData {
|
||||||
@ -57,43 +60,41 @@ export interface MediaFileData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface VideoCapturePlusOptions {
|
export interface VideoCapturePlusOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of videos to record, default 1 (on iOS always 1)
|
* The number of videos to record, default 1 (on iOS always 1)
|
||||||
*/
|
*/
|
||||||
limit?: number;
|
limit?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Max duration in seconds, default 0, which is 'forever'
|
* Max duration in seconds, default 0, which is 'forever'
|
||||||
*/
|
*/
|
||||||
duration?: number;
|
duration?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to true to override the default low quality setting
|
* Set to true to override the default low quality setting
|
||||||
*/
|
*/
|
||||||
highquality?: boolean;
|
highquality?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to true to override the default backfacing camera setting.
|
* Set to true to override the default backfacing camera setting.
|
||||||
* You'll want to sniff the useragent/device and pass the best overlay based on that.. assuming iphone here
|
* You'll want to sniff the useragent/device and pass the best overlay based on that.. assuming iphone here
|
||||||
*/
|
*/
|
||||||
frontcamera?: boolean;
|
frontcamera?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* put the png overlay in your assets folder
|
* put the png overlay in your assets folder
|
||||||
*/
|
*/
|
||||||
portraitOverlay?: string;
|
portraitOverlay?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* not passing an overlay means no image is shown for the landscape orientation
|
* not passing an overlay means no image is shown for the landscape orientation
|
||||||
*/
|
*/
|
||||||
landscapeOverlay?: string;
|
landscapeOverlay?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS only
|
* iOS only
|
||||||
*/
|
*/
|
||||||
overlayText?: string;
|
overlayText?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,7 +139,6 @@ export interface VideoCapturePlusOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoCapturePlus extends IonicNativePlugin {
|
export class VideoCapturePlus extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts recordings
|
* Starts recordings
|
||||||
* @param [options] {VideoCapturePlusOptions} Configure options
|
* @param [options] {VideoCapturePlusOptions} Configure options
|
||||||
@ -147,6 +147,7 @@ export class VideoCapturePlus extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
captureVideo(options?: VideoCapturePlusOptions): Promise<MediaFile[]> { return; }
|
captureVideo(options?: VideoCapturePlusOptions): Promise<MediaFile[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface TranscodeOptions {
|
export interface TranscodeOptions {
|
||||||
|
|
||||||
/** The path to the video on the device. */
|
/** The path to the video on the device. */
|
||||||
fileUri: string;
|
fileUri: string;
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ export interface TranscodeOptions {
|
|||||||
/** Number of audio channels. iOS only. Defaults to 2. */
|
/** Number of audio channels. iOS only. Defaults to 2. */
|
||||||
audioChannels?: number;
|
audioChannels?: number;
|
||||||
|
|
||||||
/** Sample rate for the audio. iOS only. Defaults to 44100*/
|
/* Sample rate for the audio. iOS only. Defaults to 44100*/
|
||||||
audioSampleRate?: number;
|
audioSampleRate?: number;
|
||||||
|
|
||||||
/** Sample rate for the audio. iOS only. Defaults to 128 kilobits (128000). */
|
/** Sample rate for the audio. iOS only. Defaults to 128 kilobits (128000). */
|
||||||
@ -50,7 +49,6 @@ export interface TranscodeOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface TrimOptions {
|
export interface TrimOptions {
|
||||||
|
|
||||||
/** Path to input video. */
|
/** Path to input video. */
|
||||||
fileUri: string;
|
fileUri: string;
|
||||||
|
|
||||||
@ -65,11 +63,9 @@ export interface TrimOptions {
|
|||||||
|
|
||||||
/** Progress on transcode. info will be a number from 0 to 100 */
|
/** Progress on transcode. info will be a number from 0 to 100 */
|
||||||
progress?: (info: any) => void;
|
progress?: (info: any) => void;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateThumbnailOptions {
|
export interface CreateThumbnailOptions {
|
||||||
|
|
||||||
/** The path to the video on the device */
|
/** The path to the video on the device */
|
||||||
fileUri: string;
|
fileUri: string;
|
||||||
|
|
||||||
@ -87,18 +83,14 @@ export interface CreateThumbnailOptions {
|
|||||||
|
|
||||||
/** Quality of the thumbnail (between 1 and 100). */
|
/** Quality of the thumbnail (between 1 and 100). */
|
||||||
quality?: number;
|
quality?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetVideoInfoOptions {
|
export interface GetVideoInfoOptions {
|
||||||
|
|
||||||
/** The path to the video on the device. */
|
/** The path to the video on the device. */
|
||||||
fileUri: string;
|
fileUri: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VideoInfo {
|
export interface VideoInfo {
|
||||||
|
|
||||||
/** Width of the video in pixels. */
|
/** Width of the video in pixels. */
|
||||||
width: number;
|
width: number;
|
||||||
|
|
||||||
@ -116,7 +108,6 @@ export interface VideoInfo {
|
|||||||
|
|
||||||
/** Bitrate of the video in bits per second. */
|
/** Bitrate of the video in bits per second. */
|
||||||
bitrate: number;
|
bitrate: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -156,7 +147,6 @@ export interface VideoInfo {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoEditor extends IonicNativePlugin {
|
export class VideoEditor extends IonicNativePlugin {
|
||||||
|
|
||||||
OptimizeForNetworkUse = {
|
OptimizeForNetworkUse = {
|
||||||
NO: 0,
|
NO: 0,
|
||||||
YES: 1
|
YES: 1
|
||||||
@ -177,7 +167,9 @@ export class VideoEditor extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
transcodeVideo(options: TranscodeOptions): Promise<string> { return; }
|
transcodeVideo(options: TranscodeOptions): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trim a video
|
* Trim a video
|
||||||
@ -188,7 +180,9 @@ export class VideoEditor extends IonicNativePlugin {
|
|||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
trim(options: TrimOptions): Promise<string> { return; }
|
trim(options: TrimOptions): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a JPEG thumbnail from a video
|
* Create a JPEG thumbnail from a video
|
||||||
@ -198,7 +192,9 @@ export class VideoEditor extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
createThumbnail(options: CreateThumbnailOptions): Promise<string> { return; }
|
createThumbnail(options: CreateThumbnailOptions): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info on a video (width, height, orientation, duration, size, & bitrate)
|
* Get info on a video (width, height, orientation, duration, size, & bitrate)
|
||||||
@ -208,6 +204,7 @@ export class VideoEditor extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getVideoInfo(options: GetVideoInfoOptions): Promise<VideoInfo> { return; }
|
getVideoInfo(options: GetVideoInfoOptions): Promise<VideoInfo> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
*/
|
*/
|
||||||
export interface VideoOptions {
|
export interface VideoOptions {
|
||||||
/**
|
/**
|
||||||
* Set the initial volume of the video playback, where 0.0 is 0% volume and 1.0 is 100%.
|
* Set the initial volume of the video playback, where 0.0 is 0% volume and 1.0 is 100%.
|
||||||
* For example: for a volume of 30% set the value to 0.3.
|
* For example: for a volume of 30% set the value to 0.3.
|
||||||
*/
|
*/
|
||||||
volume?: number;
|
volume?: number;
|
||||||
/**
|
/**
|
||||||
* There are two options for the scaling mode. SCALE_TO_FIT which is default and SCALE_TO_FIT_WITH_CROPPING.
|
* There are two options for the scaling mode. SCALE_TO_FIT which is default and SCALE_TO_FIT_WITH_CROPPING.
|
||||||
@ -52,7 +52,6 @@ export interface VideoOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoPlayer extends IonicNativePlugin {
|
export class VideoPlayer extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plays the video from the passed url.
|
* Plays the video from the passed url.
|
||||||
* @param fileUrl {string} File url to the video.
|
* @param fileUrl {string} File url to the video.
|
||||||
@ -60,11 +59,13 @@ export class VideoPlayer extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Resolves promise when the video was played successfully.
|
* @returns {Promise<any>} Resolves promise when the video was played successfully.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
play(fileUrl: string, options?: VideoOptions): Promise<any> { return; }
|
play(fileUrl: string, options?: VideoOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the video playback immediatly.
|
* Stops the video playback immediatly.
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
close(): void { }
|
close(): void {}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
Plugin,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface IntentOptions {
|
export interface IntentOptions {
|
||||||
@ -14,7 +19,7 @@ export interface IntentOptions {
|
|||||||
class: string;
|
class: string;
|
||||||
};
|
};
|
||||||
flags?: number[];
|
flags?: number[];
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Web Intent
|
* @name Web Intent
|
||||||
@ -46,7 +51,8 @@ export interface IntentOptions {
|
|||||||
pluginName: 'WebIntent',
|
pluginName: 'WebIntent',
|
||||||
plugin: 'com-darryncampbell-cordova-plugin-intent',
|
plugin: 'com-darryncampbell-cordova-plugin-intent',
|
||||||
pluginRef: 'plugins.intentShim',
|
pluginRef: 'plugins.intentShim',
|
||||||
repo: 'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent',
|
repo:
|
||||||
|
'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent',
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -55,61 +61,71 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty ACTION_SEND: string;
|
@CordovaProperty
|
||||||
|
ACTION_SEND: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty ACTION_VIEW: string;
|
@CordovaProperty
|
||||||
|
ACTION_VIEW: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty EXTRA_TEXT: string;
|
@CordovaProperty
|
||||||
|
EXTRA_TEXT: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty EXTRA_SUBJECT: string;
|
@CordovaProperty
|
||||||
|
EXTRA_SUBJECT: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty EXTRA_STREAM: string;
|
@CordovaProperty
|
||||||
|
EXTRA_STREAM: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty EXTRA_EMAIL: string;
|
@CordovaProperty
|
||||||
|
EXTRA_EMAIL: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty ACTION_CALL: string;
|
@CordovaProperty
|
||||||
|
ACTION_CALL: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty ACTION_SENDTO: string;
|
@CordovaProperty
|
||||||
|
ACTION_SENDTO: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty ACTION_GET_CONTENT: string;
|
@CordovaProperty
|
||||||
|
ACTION_GET_CONTENT: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty ACTION_PICK: string;
|
@CordovaProperty
|
||||||
|
ACTION_PICK: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launches an Android intent
|
* Launches an Android intent
|
||||||
@ -223,7 +239,7 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
sendResult({ extras: {}}): Promise<any> {
|
sendResult({ extras: {} }): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,12 @@ export interface WheelSelectorOptions {
|
|||||||
/**
|
/**
|
||||||
* The items to display (array of items).
|
* The items to display (array of items).
|
||||||
*/
|
*/
|
||||||
items: Array<Array<WheelSelectorItem>>;
|
items: WheelSelectorItem[][];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Which items to display by default.
|
* Which items to display by default.
|
||||||
*/
|
*/
|
||||||
defaultItems?: Array<DefaultItem>;
|
defaultItems?: DefaultItem[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The 'ok' button text
|
* The 'ok' button text
|
||||||
@ -55,7 +55,7 @@ export interface WheelSelectorOptions {
|
|||||||
* key/value to be displayed
|
* key/value to be displayed
|
||||||
* Default: description
|
* Default: description
|
||||||
*/
|
*/
|
||||||
displayKey?: string;
|
displayKey?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WheelSelectorData {
|
export interface WheelSelectorData {
|
||||||
@ -155,7 +155,7 @@ export interface WheelSelectorData {
|
|||||||
* ],
|
* ],
|
||||||
* displayKey: 'name',
|
* displayKey: 'name',
|
||||||
* defaultItems: [
|
* defaultItems: [
|
||||||
* {index:0, value: this.jsonData.firstNames[2].name},
|
* {index:0, value: this.jsonData.firstNames[2].name},
|
||||||
* {index: 0, value: this.jsonData.lastNames[3].name}
|
* {index: 0, value: this.jsonData.lastNames[3].name}
|
||||||
* ]
|
* ]
|
||||||
* }).then(
|
* }).then(
|
||||||
|
@ -8,8 +8,8 @@ export interface ZeroconfService {
|
|||||||
name: string;
|
name: string;
|
||||||
port: number;
|
port: number;
|
||||||
hostname: string;
|
hostname: string;
|
||||||
ipv4Addresses: Array<string>;
|
ipv4Addresses: string[];
|
||||||
ipv6Addresses: Array<string>;
|
ipv6Addresses: string[];
|
||||||
txtRecord: any;
|
txtRecord: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
tslint.json
15
tslint.json
@ -1,3 +1,16 @@
|
|||||||
{
|
{
|
||||||
"extends": "tslint-ionic-rules"
|
"extends": ["tslint-ionic-rules"],
|
||||||
|
"rules": {
|
||||||
|
"ordered-imports": false,
|
||||||
|
"no-empty": false,
|
||||||
|
"no-import-side-effect": false,
|
||||||
|
"no-redundant-jsdoc": false,
|
||||||
|
"ban-types": false,
|
||||||
|
"no-shadowed-variable": false,
|
||||||
|
"only-arrow-functions": false,
|
||||||
|
"ter-no-proto": false,
|
||||||
|
"adjacent-overload-signatures": false,
|
||||||
|
"no-constant-condition": false,
|
||||||
|
"no-extra-boolean-cast": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user