{"_id":"@appery/cordova-plugin-badge","_rev":"1-f651cf0e6e22f37225a869e6295e4b0b","name":"@appery/cordova-plugin-badge","dist-tags":{"latest":"0.8.10"},"versions":{"0.8.9":{"name":"@appery/cordova-plugin-badge","version":"0.8.9","description":"Shows the count of unread messages as a badge on the app icon.","cordova":{"id":"cordova-plugin-badge","platforms":["ios","osx","android","browser","windows"]},"repository":{"type":"git","url":"git+https://github.com/katzer/cordova-plugin-badge.git"},"keywords":["appplant","badge","shortcutbadger","ecosystem:cordova","cordova-ios","cordova-osx","cordova-android","cordova-browser","cordova-windows"],"engines":[{"name":"cordova","version":">=6.0.0"},{"name":"apple-ios","version":">=10.0.0"},{"name":"cordova-android","version":">=4"},{"name":"cordova-plugman","version":">=4.2.0"}],"author":{"name":"Sebastián Katzer"},"license":"Apache 2.0","bugs":{"url":"https://github.com/katzer/cordova-plugin-badge/issues"},"homepage":"https://github.com/katzer/cordova-plugin-badge#readme","_id":"@appery/cordova-plugin-badge@0.8.9","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-ovDsBUArg7BoC2P1F0IxMKr5gO3SzWzAV2kT0lQT/wyeVR2l6k/PuR1V1WxLjEZR//iqvY7k1obrReERtrfJ2Q==","shasum":"51c8f4718a8a96425af14167f1e5db62e008eb90","tarball":"https://registry.npmjs.org/@appery/cordova-plugin-badge/-/cordova-plugin-badge-0.8.9.tgz","fileCount":29,"unpackedSize":570988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEsvfcAMuh7aBSx2qLhCGm7LtkPif49yYmKd3nSriZpyAiEAq5/ulLfDDmjBj21+ecawiiAaY0wnr0I9X4bx0KmF8M8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi57YyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp70Q//ebYlwPY9js78xclHRk5Q5ujBSrNaixX9uErHi1FJHBVv+dNb\r\njrkFdQYAVfPWcNmG0sMA0a+KyxMyQAkLthOL9nGL6wKI+0PupckG4wFZqCzF\r\n0VIYp3ou9sidu5c84EOKtnCzV+iy2+2oNYoKJTtKk91OQlUnJC3Xnfs3oxJS\r\n4DXMWp1N0Hreyds0azomQTFr75QaP82OM4zbOoVxmtWZf1/XOqX0sQ3ACYNv\r\nbvzqFOKIhy60hxKDDufnoo3fygYBp8cEkpM//d6YfHEiRvDj/biQhzpwi5TX\r\nH3PsUa7c7zPUOdF8Bg5+wzA2aPcBrfhCdQ2wPtbNNEQWZ7MSxVkm4mbtY3qr\r\niM731TFmo0khE3+l/LZeeEM9UFljrX/s+oPzEd2owuW0k/hsoE4hR4/771Of\r\npWiR9NtZkido7f8VVy7xTCqgiQAbWJ0D4HtzqJMkl1JQNI7xlDYVXaI1V8H9\r\ndX8A1f5B2tNC543sfcPZgb6i/ydyDulhMKSWzzrmCdLEKJLrNomhJRTy4ceo\r\nOFPi6B1cay+77PBgw5FxSpEZP6M+M/n3YMow+Fyw320cyXjsRexkNPHfz3ME\r\n4qjJpAt7JUvg3L4BxeCS/HrASWX4fMkopiNoGS7lvDv2+9lWKFFIh3zkmhlU\r\ndytEOgs/djQdilb73WNrsQYC4NLZENh569U=\r\n=/zxS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"appery","email":"alexander.antsypov@appery.io"},"directories":{},"maintainers":[{"name":"appery","email":"alexander.antsypov@appery.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-badge_0.8.9_1659352626472_0.7453968943464646"},"_hasShrinkwrap":false},"0.8.10":{"name":"@appery/cordova-plugin-badge","version":"0.8.10","description":"Shows the count of unread messages as a badge on the app icon.","cordova":{"id":"@appery/cordova-plugin-badge","platforms":["ios","osx","android","browser","windows"]},"repository":{"type":"git","url":"git+https://github.com/katzer/cordova-plugin-badge.git"},"keywords":["appplant","badge","shortcutbadger","ecosystem:cordova","cordova-ios","cordova-osx","cordova-android","cordova-browser","cordova-windows"],"engines":[{"name":"cordova","version":">=6.0.0"},{"name":"apple-ios","version":">=10.0.0"},{"name":"cordova-android","version":">=4"},{"name":"cordova-plugman","version":">=4.2.0"}],"author":{"name":"Sebastián Katzer"},"license":"Apache 2.0","bugs":{"url":"https://github.com/katzer/cordova-plugin-badge/issues"},"homepage":"https://github.com/katzer/cordova-plugin-badge#readme","_id":"@appery/cordova-plugin-badge@0.8.10","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-xeWyUdqP6j2FU+0ezj+bLTDAzWMjPox+Ik6DgnkeGc0z+yWVZBYpttwxNs/LuzGPB2vBD57NGl2gATVIxD621w==","shasum":"32d02cb2953638d364e2f1408b82d0e4c5163b7f","tarball":"https://registry.npmjs.org/@appery/cordova-plugin-badge/-/cordova-plugin-badge-0.8.10.tgz","fileCount":29,"unpackedSize":571006,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqALJb/kSDeiIMHcNf9M0lJHp+nbLhbMdkTkIILmebcAiAZU71FNs4CyUki95K+cCWugjNgrubfEg7YOvAcF9KD5Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi58MTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJmA//Vk6rPtCv0SvN+Y3ZECDDsv6TzqiKmJqa8GxKsnK4Qy/ddbtf\r\n1UhVV6LUKhXgR1wbUiHNmYo0Y2iBxyi1bmmK+EFx1tN2qfQCo8tfcvQB6m4J\r\nfZN8SE1KsD/U5s3H9t+U5YJuY92ijJqR8sSOHo3mdhcNfyAcYvtmxto6fwpL\r\nGhCOQjQ2bSULUeNpb0T7zb6QgEy8J7gdAtEDykCxOtX3sfMEup3pdUBMDZx1\r\nIJ6oQBHbf5V/vqG/G/YSMz8rubCQb9PTe0vkzQnOtw7yC+mDDWdQedUBMoOk\r\ndqxXfCjrtQ5XcSly4FqHD9BoEynmGyF40CQncta1qRTGA9RlrbD4LIWJXjF3\r\nRTzTTn2EaTvoNNQDPySCOpCDdwa1v1zwRXwO5CTeQtZskL2TGBtyDB6jZSZ2\r\nM0KElPbCyTKlLpwfcjSfxgpQdf33Jn+NlDSSYP+a+EchBiQTmXaTReRMT2pm\r\nhjrWIabKTBWSI6t/HenNu0kOPRL/UKN5uXlZ6PNuM7lwqLdB7WPJO2jEdci4\r\n4SSW0/JAibY640br+yPRy95rwqscJddHvoljax/OOpXYhxBhzBIw8ac8da93\r\nmqSymmhW4elit73g1R+iAip6PL9J1p8bNrQByfdzGNSkRM3jgiveWVxyNZdZ\r\n7SHYMF8WFlMaSmYb9MZfm3SRigc1tO9BNes=\r\n=UtYx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"appery","email":"alexander.antsypov@appery.io"},"directories":{},"maintainers":[{"name":"appery","email":"alexander.antsypov@appery.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-badge_0.8.10_1659355923003_0.9335355179621136"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-01T11:17:06.409Z","0.8.9":"2022-08-01T11:17:06.695Z","modified":"2022-08-01T12:12:03.255Z","0.8.10":"2022-08-01T12:12:03.199Z"},"maintainers":[{"name":"appery","email":"alexander.antsypov@appery.io"}],"description":"Shows the count of unread messages as a badge on the app icon.","homepage":"https://github.com/katzer/cordova-plugin-badge#readme","keywords":["appplant","badge","shortcutbadger","ecosystem:cordova","cordova-ios","cordova-osx","cordova-android","cordova-browser","cordova-windows"],"repository":{"type":"git","url":"git+https://github.com/katzer/cordova-plugin-badge.git"},"author":{"name":"Sebastián Katzer"},"bugs":{"url":"https://github.com/katzer/cordova-plugin-badge/issues"},"license":"Apache 2.0","readme":"\n<p align=\"left\"><b><a href=\"https://github.com/katzer/cordova-plugin-badge/tree/example\">SAMPLE APP</a> :point_right:</b></p>\n\n# Cordova Badge Plugin <br> [![npm version](https://badge.fury.io/js/cordova-plugin-badge.svg)](https://badge.fury.io/js/cordova-plugin-badge) [![Code Climate](https://codeclimate.com/github/katzer/cordova-plugin-badge/badges/gpa.svg)](https://codeclimate.com/github/katzer/cordova-plugin-badge) [![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L3HKQCD9UA35A \"Donate once-off to this project using Paypal\")\n\n[Cordova][cordova] plugin to access and modify the badge number of the app icon on various mobile platforms including iOS, Android and Windows.\n\n<img height=\"150px\" align=\"right\" hspace=\"19\" vspace=\"12\" src=\"http://4.bp.blogspot.com/-GBwBSN92DvU/UB8Kut7Oz0I/AAAAAAAAJKs/mJgBmj1RKqU/s1600/whatsapp+wp8+10.png\"></img>\n\n### How they appear to the user\n\nUsers see notifications in the following ways:\n\n- Badging the app’s icon\n- Progress indicator (OSX based on https://github.com/hokein/DockProgressBar)\n\n\n### Supported Platforms\n\n- __Android / Amazon FireOS__ (via [ShortcutBadger][shortcut_badger])\n- __Browser__ (via [favico.js][favico_js])\n- __iOS 10+__\n- __OSX__\n- __Windows__ (Phone and Desktop)\n\n\n## Installation\n\nThe plugin can be installed via [Cordova-CLI][CLI] and is publicly available on [NPM][npm].\n\nExecute from the projects root folder:\n\n    $ cordova plugin add cordova-plugin-badge\n\nOr install a specific version:\n\n    $ cordova plugin add cordova-plugin-badge@VERSION\n\nOr install the latest head version:\n\n    $ cordova plugin add https://github.com/katzer/cordova-plugin-badge.git\n\nOr install from local source:\n\n    $ cordova plugin add <path> --nofetch --nosave\n\n\n## Usage\n\nThe plugin creates the object `cordova.plugins.notification.badge` and is accessible after *deviceready* has been fired.\n\n```js\ndocument.addEventListener('deviceready', function () {\n    // cordova.plugins.notification.badge is now available\n}, false);\n```\n\n### Set the badge number\n\nBadge numbers cannot be negative. The maximum might be restricted by the OS.\nA callback is optional and will be invoked with the current badge number.\n\n```js\ncordova.plugins.notification.badge.set(10);\n```\n\n<p align=\"center\">\n    <img height=\"150px\" src=\"images/ios.png\">\n    &nbsp;&nbsp;&nbsp;&nbsp;\n    <img height=\"150px\" src=\"images/android.png\">\n    &nbsp;&nbsp;&nbsp;&nbsp;\n    <img height=\"150px\" src=\"images/windows.png\">\n</p>\n\nThere's built-in support to increase the badge number:\n\n```js\ncordova.plugins.notification.badge.increase(1, function (badge) {\n    // badge is now 11 (10 + 1)\n});\n```\n\nTo decrease the badge number:\n\n```js\ncordova.plugins.notification.badge.decrease(2, function (badge) {\n    // badge is now 9 (11 - 2)\n});\n```\n\nAnd to clear out the badge number:\n\n```js\ncordova.plugins.notification.badge.clear();\n```\n\n### Get the badge number\n\nThe default value is 0. The badge number wont get lost after reboot or app restart.\n\n```js\ncordova.plugins.notification.badge.get(function (badge) {\n    ...\n});\n```\n\n__Note:__ Modifying the badge number outside of the plugin does result into wrong behaivor!\n\n### Configurations\n\nTo clear the badge number automatically if the user taps the app icon:\n\n```js\ncordova.plugins.notification.badge.configure({ autoClear: true });\n```\n\nOSX supports additional indicators. Other than to `badge` these are `circular` and `download`.\n\n```js\ncordova.plugins.notification.badge.configure({ indicator: 'circular' });\n```\n\n<p align=\"center\">\n    <img src=\"images/osx-badge.png\">\n    &nbsp;&nbsp;&nbsp;&nbsp;\n    <img src=\"images/osx-circular.png\">\n    &nbsp;&nbsp;&nbsp;&nbsp;\n    <img src=\"images/osx-download.png\">\n</p>\n\n\n## Permissions\n\nThe plugin might ask for granting permissions to modify the badge number.\nThat's done automatically but it's also possible to request them manually:\n\n```javascript\ncordova.plugins.notification.badge.requestPermission(function (granted) {\n    ...\n});\n```\n\n<p align=\"center\">\n    <img height=\"200px\" src=\"images/ios-permission.png\">\n</p>\n\nTo check if they have been granted already:\n\n```javascript\ncordova.plugins.notification.badge.hasPermission(function (granted) {\n    ...\n});\n```\n\n\n## Quirks\n\nOn Android not all launchers support badges. In order to set badges the plugin uses [ShortcutBadger][shortcut_badger]. Check out their website to see which launchers are supported.\n\nIf you're using PhoneGap Build please make sure you specify gradle as your Android build tool in config.xml:\n\n```xml\n<preference name=\"android-build-tool\" value=\"gradle\" />\n```\n\nTo specify a custom version of _ShortcutBadger_ follow this [guide][gradle-guide]. The name of the property is `appShortcutBadgerVersion`.\n\n```gradle\n# In <your-project>/platforms/android/gradle.properties\nappShortcutBadgerVersion=1.1.22\n```\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\n## License\n\nThis software is released under the [Apache 2.0 License][apache2_license].\n\nMade with :yum: from Leipzig\n\n© 2013 [appPlant GmbH][appplant]\n\n\n[cordova]: https://cordova.apache.org\n[shortcut_badger]: https://github.com/leolin310148/ShortcutBadger\n[favico_js]: http://lab.ejci.net/favico.js/\n[CLI]: http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface\n[npm]: https://www.npmjs.com/package/cordova-plugin-badge\n[gradle-guide]: https://cordova.apache.org/docs/en/latest/guide/platforms/android/#configuring-gradle\n[apache2_license]: http://opensource.org/licenses/Apache-2.0\n[appplant]: http://appplant.de\n","readmeFilename":"README.md"}