{"_id":"@awarns/phone-sensors","_rev":"4-dec1eca132a2149226fab30d0b011506","name":"@awarns/phone-sensors","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"@awarns/phone-sensors","version":"1.0.0","description":"Reliable and concurrent access to smartphone's sensors","main":"index","typings":"index.d.ts","nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"keywords":["NativeScript","TypeScript","Android","Sensors"],"authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0"},"gitHead":"135c971ba189a1edfe2bfb1affe15c2886f9049c","_id":"@awarns/phone-sensors@1.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-EhzVrnpUCe7a9feBAKXTer+uj6TgvpPWGQ5umkCeANTg+i3DJ9qsVvpZQ87iuZGtx+kvEOE6apsycgdHsJLKhw==","shasum":"0ab6a141b9c197f689670bff481321f745d5cc9f","tarball":"https://registry.npmjs.org/@awarns/phone-sensors/-/phone-sensors-1.0.0.tgz","fileCount":41,"unpackedSize":45106,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhbmFkFMmFxJEcMnncrIWe0TQR6RbifozybhS2pj9jswIgAyqNkOGd8LBo20+J7jlxyoVAzczjVwjTQEt9dF+XtGQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEcTVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqc+g/+OINtbbdtLvU9u6VhNAzCmyZcaqKNZE4L+co1ynmYjarcDe26\r\nUTd7wbDWGegHQuSdSAA9qAW5vvGu7XyPF5meX7JdFgAMSZ8ysgamflEKawEn\r\nBtK8K93vtUjqWue8dPZHQMVctxqK8RQeDp5wN0Q7+Thn5LY2JMKt+F8GNkxw\r\n4HvUI8maCZKGTZ7wiFzkZs6ejS5Vk0QmkwcISSfFMgZ8484rEEdu04CCIMqe\r\nL9eLDFxxuGkKX34eHDaqDt8On2/Pxva57gRI/SHgPNl3L4+CXq6jqdA01OIQ\r\niNHW8YlPP+tKlb/CzBMBBEFlkvFogF9Ijj9UafB0har6tgAHXDRU6wlQCC0H\r\nG+ZAjtL5ctOyMXIAEwBhSVoGZwHYfZ5k6T31E/Y3fKXrRGrx0fCEykz5LnVi\r\n1C7sEPD6mWD7amtrPcTry47/fxE5cqH3M9NVjrPPTV2v3DJTaai4IMxPMIWh\r\nEd5dOPwq7XqHY/0S0I8N9aS4TXDcJKvUmZgzUPCjaErva5FB2zbMxowwQmTP\r\nUJzmPKCq1Z0SnRq0qUMfza97o4ibZ/wybRBD+FZgYIvA79OWhLQ4N1eLWfeS\r\nPI+PxnX01VQBmX+TRPiTyzxuokyAwGL2DE9ndUdsaNfxad0XQzX5DIAKnx1T\r\ngLdOS6rHCEDNXOS+KpGwzKB5b1cTOo9VKow=\r\n=yFCc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"matey","email":"matey@uji.es"},"directories":{},"maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phone-sensors_1.0.0_1662108884888_0.28741455203197375"},"_hasShrinkwrap":false},"1.1.0":{"name":"@awarns/phone-sensors","version":"1.1.0","description":"Reliable and concurrent access to smartphone's sensors","main":"index","typings":"index.d.ts","nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"keywords":["NativeScript","TypeScript","Android","Sensors"],"authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0"},"gitHead":"8d1eea4f1308ecd0fd6cc554d9d869919e25d8c8","_id":"@awarns/phone-sensors@1.1.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-bvq4pqR2cKSoXQU9gJR3T94W+bQwRRU/9ljRa6O0Ms4pXiNlYXz/jsBxlA59/AfdX8lkgq+CF6ZZzZuTZkHSDQ==","shasum":"7488c07ebe257fe0f212e4b9f5c3b6834a565225","tarball":"https://registry.npmjs.org/@awarns/phone-sensors/-/phone-sensors-1.1.0.tgz","fileCount":56,"unpackedSize":53123,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmMyuP3YGA9oQyWH/SWfsbTUfUpM7MuO6SqKB+YzzoWAiEA6SlffsgZXuhjnV5mbTGMWdKDh62YqyjHemO2KCm6JgU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPn9OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpA4w//Wc0glFM6uTBFkfgQhGA0C6wNADeC4ZJawdji9TqXoHNP7uJ0\r\n6XOjJ0mqMTSFeXH9O4k9MLyxUP7LwvD6h9LSAtAlS8tUo61h+sL05DTD5BJ2\r\nq410YNVBA133/KbnLLEnWVP4+xGCc8wh+wiJjiMn2N8w/J4m7/huuVRGAvkg\r\n+mQ9PPBI+H8eGKonALJG+7oH3Yw2yfWEIiBlIpfXkmHq28qVtpW76ofjkdnH\r\nr3WDeIaU3c7/5U8GqBqomkrUWvGPg4kI/Bgxqzqmrn9TnIBID2bE1ruV7Hu4\r\nWpJs9kCE5KP332fXTPLFsKHjRc+UlmKiikQLWQKV2Kxg66h2NW7Dh+AiJAZx\r\nAnkqo0+ANUX2547K2zWt8HLNFDRGMTSwEYh8dXSWmqkrWfswsabWwj+VUWSY\r\n4XgqNXMbKJbTbKHXBi4YWcinf/0Upiws2/Wubgf273PAyqpNR7tAJP5OQ6ZE\r\nZ2ptn2+ojB7RozRlDOfmeibaJXbllHYhV9KPzOYU2yseoU9fisVh9Jv/Vk4G\r\nwoUxTd9zoIEwGWcjGAyC+EdJ52PMHUm3v5U0wweakwb8E2E8fNfwyO8x7kzL\r\nzYv45p3NpsNRKnAc27djbgKLpjhiZchSoTVIggtCffqZSekv6MkHMd6PnRCb\r\nr3X8v5i5lYIUUhBLRenb4Bgvrt48NbecjvA=\r\n=p+4i\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"matey","email":"matey@uji.es"},"directories":{},"maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phone-sensors_1.1.0_1665040206475_0.46656187283138273"},"_hasShrinkwrap":false},"1.2.0":{"name":"@awarns/phone-sensors","version":"1.2.0","description":"Reliable and concurrent access to smartphone's sensors","main":"index","typings":"index.d.ts","nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"keywords":["NativeScript","TypeScript","Android","Sensors"],"authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0"},"gitHead":"3c5956a09fb95fced6b9671c9eff65ec95891466","_id":"@awarns/phone-sensors@1.2.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-DXpLp8Lg8gWmQsDa42nL2BcgC2vXxyCP/komofBi/7VHZG/o9G01650y4SwJLHmK+45F/0DYMDgnFcwX1hU2MA==","shasum":"6d7f40e79108d36ebdac018da07f9d8de1da65f0","tarball":"https://registry.npmjs.org/@awarns/phone-sensors/-/phone-sensors-1.2.0.tgz","fileCount":56,"unpackedSize":55509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQ9+i3YbNPxsdXexyEnmnW/Sn9a9CX0b6kUM1MikgjOAiEAr8DClgHuqeljtiCSYb0pkO7a8kIj2f+gvy0XM0/m88I="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVlC+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTwA/9EgMpat77Xzx9u97e394msqJhB+RjaP60s7Wi6MJTb28Ok37l\r\nvkJHDDbIA+AQn3gnq3M4vBPiB3sRAh/Fu6Nl0IgYwFdoTNkKgORQwYA1AOy2\r\nhzVvN2VykYatgq2OQGmx1nxfkcIehBzwVMHkXoCquUHNBc8BuW1UwbuOoAuz\r\n1gfFzC2xtSx3EPZSKJNHG2lRPiaw7Fdu56v4ZqxI99YXyJd0L4bObB+ElLqh\r\n9mVOqX6Lh3Jw8xsTnCXfe7T2y6UitZ0K7PeWJ8hXSPSPqWNOQOeR/3H85WD7\r\nCBRFKq42ibpLm7CHGyRboXa85zE1YTbMNA9QLGybGk5KRTY+75EwA8nv1kSt\r\n9xtcwckmZZs3UUF78UauU7aLtMYVP616Gkf3gzUPbMyytnAGtW+a9CX9gFBa\r\nTxG5MOL2Zhr6IwEBBb1OZff3/dMng2gMYvDRBoz3JJyJXFYpgJeaTWZ9BhcT\r\nLidB97QlEfHovyKsc1Q5//6PjdnWTpkANQb/i+I0MCrSBndOlWbfs8TqPXsD\r\nJjn6CAn7XnJJuYIt8BgshYI0IDbkbrmDdFVJoUedmT+6QEoNfy0NRhvqK6YU\r\nzFwW9RsGwROcxfhHBe4+pHdWv0Yy4or/yn0kQaVcefSbebrFMSXsMHE4bKZP\r\nPNgxDwKaWDyYxO47IUyjj2JN/vp5Pzgips4=\r\n=TlDy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"matey","email":"matey@uji.es"},"directories":{},"maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phone-sensors_1.2.0_1666601149798_0.6518406056619415"},"_hasShrinkwrap":false},"1.2.1":{"name":"@awarns/phone-sensors","version":"1.2.1","description":"Reliable and concurrent access to smartphone's sensors","main":"index","typings":"index.d.ts","nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"keywords":["NativeScript","TypeScript","Android","Sensors"],"authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0"},"gitHead":"1c3171d214f807ff19e193239544fb6a9ddc14e2","_id":"@awarns/phone-sensors@1.2.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-1yrrDBWoCNXjLRLwQW3XMqhnhX+Jd/EDBEZycucSkXraOxfc3QSiN5svLLVuLmbjtu2k2ZPzW1OU92D2PE+/ZQ==","shasum":"8170277fdb157ed95d21701ba22477f302b63827","tarball":"https://registry.npmjs.org/@awarns/phone-sensors/-/phone-sensors-1.2.1.tgz","fileCount":56,"unpackedSize":55533,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB0Xl7/kaugP8uTxbjcNYhmpZS0zcKTfX4I3/7qUandtAiAmOOniZhWfL8qURve/TDTtmiWz+Mq4ZyN4SwL/A95Wwg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV9/VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobSQ/8DlCGCwFxzAWh0HMmG1Kb/XMtQvBFZ3oDV7R70O5ax51RlZSc\r\nUQZgc8SJN89JXrmKcIfMdH2/9P+BVTRNzebo3gsTAx6jpYXnFAaAJ4ZvTJeF\r\nE2lRoTJu7JeYxgU5jZ1Yx2URw3gdrUnAJd7waRq8Yq9sGnXuCRqqmJ3oWcxn\r\nmCSLDRNnzVw3oO8ywNPkmS8ip4jnlQFRIe2UNZBB1EiupW5QeyFiornqJcoF\r\n2vY+Vw65zbiKMKMeUb7hz2G9Q/wm7d2PtPLM17GA6UQ4xGbfjS2xpmgt0blY\r\njY+pe01wG/YQcqXu6cX34L2yheG+piJ70/Su8qRNPxdENyWvttLAnOp38PVN\r\nvDXHZgMXamQYZkluCLBbzB7p45ltDawlFIGgP+jb651/6uGXlnOiFNmlxAzI\r\nTzUh5L9hNaEVaYwCt9YVAzuXGYMNvjn6TQrjafNH9jn0pP+KOO73RW8iPCND\r\nJZkB9MEBFEPrZ3OW0xW5bbbFjx54jNJXvi1C1QrysTxPVjZ3iizRtac/2FL3\r\nKtuuwpjhlrd6qO+HZYDebhK8oG1H3GRnV1WY548Y1TzRwNOHVIvWj1a6HbKB\r\nKRunV/a0+lBx7ozv/+LB7AIdYkDRBTmqBwW8ebR1Rlnc7lns2gVFRuXF9RNi\r\n0uCnQGFA96oaS2WteMACDLZunRSxleF2nXo=\r\n=9TCR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"matey","email":"matey@uji.es"},"directories":{},"maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phone-sensors_1.2.1_1666703317467_0.6440306347045124"},"_hasShrinkwrap":false},"1.2.2":{"name":"@awarns/phone-sensors","version":"1.2.2","description":"Reliable and concurrent access to smartphone's sensors","main":"index","typings":"index.d.ts","nativescript":{"platforms":{"ios":"6.0.0","android":"6.0.0"}},"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"keywords":["NativeScript","TypeScript","Android","Sensors"],"authors":[{"name":"Miguel Matey Sanz","email":"matey@uji.es"},{"name":"Alberto González Pérez","email":"algonzal@uji.es"}],"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","homepage":"http://github.com/GeoTecINIT/awarns-framework","bootstrapper":"@nativescript/plugin-seed","dependencies":{"@awarns/core":"^1.0.0"},"gitHead":"1f5da4417cbb8cbc36c0ccd4842021023e2d23d3","_id":"@awarns/phone-sensors@1.2.2","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-0Xy163vKiddEEONSxk3MUTQmSHPDN7rqMycACklTrIdbE7ac3XW2hRmWdJlNuNFGcXNVuX91xWcyyXqgH8RlEg==","shasum":"d0ced9baf2450454da38fe7038ac2ed8d1a51319","tarball":"https://registry.npmjs.org/@awarns/phone-sensors/-/phone-sensors-1.2.2.tgz","fileCount":56,"unpackedSize":43182,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDklfRWgqXg8txgwkI4hOnd8Kgza87ZC1/cTkPXGzwL3AiEAmoQc17mzoAxmqvBXHSo9Y13WeLZnuNRunN+7DrNlzOU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYne2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJdA/6AsE5YiGFZGJPAjQmEUS6Tjm07boS0nkEOw10N3qBgO5MxiIK\r\n4qydQ2JxiFRPj03wqmTuGAoj6aVhhRnlOrwsNOT0WUun1yTOPtNtrs4szlS/\r\nZNTQ2QhZrRXab6+a4vutdFGVXPqIx1vrFWnZU7ZhRrjBihRM+/h31ZNGUtSH\r\nN/3srFWwzVPXaiRU+zVV4WaBX86uhZjCgYLyrVig4KCDklmAdrYaXucvBaaq\r\nqfOnpbBpNv96xq0WRB31kajZl1aqNumivD64XOXOpwSogMQ5tdziUSSeu41s\r\ngDgMJrCrFl36AEohDaYRM8Mv+wfvsv0EaMtST4fYv5/6W8xA3+DdPa9e19CC\r\nodMmezEl2868G/0cWv9D+tz6A1D+sztO+8Op9fdp7LORg1Eo6KIPArQAkTLL\r\nfHat2iaQFzW+2AUsl7blRQyqTkTo69TFgc2+PzOHJVE/Vd7utiHHF0VUr6Ow\r\neTN4lXXhhbJkvL+1RSD0vu3B54WGn8rUTJD1aveLDls21w8iCx61QfwVtICN\r\nCZIuJsLlq2TFxm5qGWIiMLxvHHDzeQk9TmFu4qPR5WyQ3yVv8C1OjHsOxWTa\r\ngZFZwBxQ1uJlfsHaef02JXMFYNT+atmfReZumH/8/+FAAty/6YjuuQOlWY/2\r\nn13Aa3kVFnCD8QyjKevfhvEWSYBBuWLW3mg=\r\n=JtwQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"matey","email":"matey@uji.es"},"directories":{},"maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phone-sensors_1.2.2_1667397558305_0.5792044338276183"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-02T08:54:44.812Z","1.0.0":"2022-09-02T08:54:45.041Z","modified":"2022-11-02T13:59:18.558Z","1.1.0":"2022-10-06T07:10:06.653Z","1.2.0":"2022-10-24T08:45:49.974Z","1.2.1":"2022-10-25T13:08:37.666Z","1.2.2":"2022-11-02T13:59:18.470Z"},"maintainers":[{"name":"matey","email":"matey@uji.es"},{"name":"albertogonper","email":"alberto.gonzalez95@gmail.com"}],"description":"Reliable and concurrent access to smartphone's sensors","homepage":"http://github.com/GeoTecINIT/awarns-framework","keywords":["NativeScript","TypeScript","Android","Sensors"],"repository":{"type":"git","url":"git+ssh://git@github.com/GeoTecINIT/awarns-framework.git"},"bugs":{"url":"http://github.com/GeoTecINIT/awarns-framework/issues"},"license":"Apache-2.0","readme":"# @awarns/phone-sensors\n[![npm (scoped)](https://img.shields.io/npm/v/@awarns/phone-sensors)](https://www.npmjs.com/package/@awarns/phone-sensors)\n[![npm](https://img.shields.io/npm/dm/@awarns/phone-sensors)](https://www.npmjs.com/package/@awarns/phone-sensors)\n\nThis module allows to collect data from the IMU sensors (i.e., accelerometer and gyroscope) and the magnetometer embedded\nin the mobile device. \n\nThis plugin acts as a wrapper on top of the [`BackgroundSensors`](https://github.com/GeoTecINIT/BackgroundSensors) Android library,\nwhich enables the data collection even when the application is in the background or the device is idle. This module\noffers tasks for starting and stopping the data collection process.\n\nInstall the plugin using the following command line instruction:\n\n```bash\nns plugin add @awarns/phone-sensors\n```\n\n## Usage\n\nAfter installing this plugin, you'll have access to two task groups with two tasks each to start and stop the data collection process.\nThe main difference between both tasks groups is the implementation of the underlying service that is being used for the data collection.\nOne group uses a standard data collection service, but the other one uses a special service that syncs the system clock with an NTP server\nto label the collected data with the most accurate timestamp.\nThe collected data from the sensors, will be a [TriAxial](#triaxial) record, described below.\n\n### Setup (Optional)\n\nThis plugin can be optionally registered using its loader during the framework initialization:\n\n```ts\n// ... platform imports\nimport { awarns } from '@awarns/core';\nimport { demoTasks } from '../tasks';\nimport { demoTaskGraph } from '../graph';\nimport { registerPhoneSensorsPlugin } from '@awarns/phone-sensors';\n\nawarns\n  .init(\n    demoTasks,\n    demoTaskGraph,\n    [\n      registerPhoneSensorsPlugin({ \n        enableVibrationOnStart: false\n      })\n    ]\n  )\n// ... handle initialization promise\n```\n\nPlugin loader parameter options:\n\n| Property                 | Type      | Description                                                                                                               |\n|--------------------------|-----------|---------------------------------------------------------------------------------------------------------------------------|\n| `enableVibrationOnStart` | `boolean` | (Optional) Enables or disables the generation of a vibration when the data collection service starts. Enabled by default. |\n\nIf the plugin is not registered, **the vibration will be enabled by default**.\n\n> **Warning**: due to restrictions imposed by the OS, the plugin can only be registered once (i.e., the first time the plugin is initialized). In other words,\n> if the plugin is first register with `enableVibrationOnStart` to `true`, and then the developer wants to disable the vibration, \n> setting `enableVibrationOnStart` to `false` **will take no effect**. If you want to change the value of `enableVibrationOnStart`,\n> you will have to uninstall the app.\n\n### Tasks \n\n#### Standard collection service tasks\n\n| Task name                                                                                                         | Description                                                                                                                                                           |\n|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`startDetecting{prefix}Phone{sensor}Changes`](#start-data-collection-for-a-sensor-with-a-specific-configuration) | Allows to start the data collection for a `sensor` with a specific configuration (see below). The `prefix` can be used to distinguish among different configurations. |\n| [`stopDetectingPhone{sensor}Changes`](#stop-data-collection-for-a-sensor)                                         | The complement to the previous task. Allows to stop collecting data from `sensor`.                                                                                    |\n\n\n#### NTP synced collection service tasks\n| Task name                                                                                                                  | Description                                                                                                                                                                                                                                                                                               |\n|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`startDetecting{prefix}PhoneNTPSynced{sensor}Changes`](#start-data-collection-for-a-sensor-with-a-specific-configuration) | Allows to start the data collection for a `sensor` with a specific configuration (see below). Before the collection starts, the system clock is synced with an NTP server to label the collected data with an accurate timestamp. The `prefix` can be used to distinguish among different configurations. |\n| [`stopDetectingPhoneNTPSynced{sensor}Changes`](#stop-data-collection-for-a-sensor)                                         | The complement to the previous task. Allows to stop collecting data from `sensor`.                                                                                                                                                                                                                        |\n\n\n#### Start data collection for a sensor with a specific configuration\nTo register these tasks for their use, you just need to import them and call their generator functions inside your application's task list:\n\n```typescript\nimport { Task } from '@awarns/core/tasks';\nimport {\n  startDetectingPhoneSensorChangesTask,\n  PhoneSensor,\n  SensorDelay,\n} from '@awarns/phone-sensors';\n\nexport const demoTasks: Array<Task> = [\n  startDetectingPhoneSensorChangesTask(PhoneSensor.ACCELEROMETER, { sensorDelay: SensorDelay.NORMAL, batchSize: 50 }),\n  // startDetectingPhoneAccelerometerChanges\n  \n  startDetectingPhoneSensorChangesTask(PhoneSensor.ACCELEROMETER, { sensorDelay: SensorDelay.FASTEST, batchSize: 50 }, 'Fast'),\n  // startDetectingFastPhoneAccelerometerChanges\n\n  startDetectingPhoneSensorChangesTask(PhoneSensor.GYROSCOPE, { sensorDelay: SensorDelay.NORMAL, batchSize: 50 }),\n  // startDetectingPhoneGyroscopeChanges\n\n  startDetectingPhoneNTPSyncedSensorChangesTask(PhoneSensor.GYROSCOPE, { sensorDelay: SensorDelay.NORMAL, batchSize: 50 }),\n  // startDetectingPhoneNTPSyncedGyroscopeChanges\n\n  startDetectingPhoneSensorChangesTask(PhoneSensor.MAGNETOMETER, { sensorDelay: SensorDelay.NORMAL, batchSize: 50 }),\n  // startDetectingPhoneMagnetometerChanges\n\n];\n```\n\n> **Warning**: the data collection for a `PhoneSensor` can only be started once, if `startDetectingFastPhoneAccelerometerChanges` is\n> executed after `startDetectingPhoneAccelerometerChanges` and while the collection is in progress, `startDetectingFastPhoneAccelerometerChanges`\n> will be ignored. Therefore, if you want to dynamically change the collection's configuration while the collection is in progress, \n>  you will have to stop the collection to start it again with the new desired configuration. \n\nTask generator parameters:\n\n| Parameter name          | Type                    | Description                                                                                                                    |\n|-------------------------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `sensor`                | `PhoneSensor`           | Sensor to collect data from. See below.                                                                                        |\n| `providerConfiguration` | `ProviderConfiguration` | Collection's configuration of the task. See below.                                                                             |\n| `prefix` _(Optional)_   | `string`                | Adds the prefix to the name of the task. Useful to create multiple tasks for the same sensor but with multiple configurations. |\n\n- PhoneSensor\n\n| Value           | Description                                  |\n|-----------------|----------------------------------------------|\n| `ACCELEROMETER` | Represents the phone's accelerometer sensor. |\n| `GYROSCOPE`     | Represents the phone's gyroscope sensor.     |\n| `MAGNETOMETER`  | Represents the phone's magnetometer sensor.  |\n\n- ProviderConfiguration\n\n| Property      | Type                                   | Description                                                                                                                                           |\n|---------------|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sensorDelay` | <code>SensorDelay &vert; number</code> | Indicates the time between two consecutive samples. It can be a `SensorDelay` (i.e., `UI`, `NORMAL`, `GAME` or `FASTEST`) or a value in milliseconds. |\n| `batchSize`   | `number`                               | Indicates the amount of samples to be delivered in each record.                                                                                       |\n\n> **Note**: the `sensorDelay` is taken as a suggestion by the Android OS. Samples could be delivered at a smaller or higher rate.\n\nTask output events:\n\n> These tasks don't produce significant events after they complete their execution aside from the regular `{task-name}Finished` events.\n>\n> However, once the start task has finished running, relevant events will be emitted by the internal listeners while the data collection is active. These are listed below.\n\n- [`accelerometerSamplesAcquired`](#events)\n- [`gyroscopeSamplesAcquired`](#events)\n- [`magnetometerSamplesAcquired`](#events)\n\n> Example usage in the application task graph:\n> ```ts\n> on('startEvent', run('startDetectingPhoneAccelerometerChanges'));\n> on('startEvent', run('startDetectingPhoneGyroscopeChanges'));\n> on('startEvent', run('startDetectingPhoneMagnetometerChanges'));\n> \n> on('accelerometerSamplesAcquired', run('writeRecords'));\n> on('gyroscopeSamplesAcquired', run('writeRecords'));\n> on('magnetometerSamplesAcquired', run('writeRecords'));\n>```\n> **Note**: To use the `writeRecords` task, the persistence package must be installed and configured. See [persistence package docs](../persistence/README.md).\n\n#### Stop data collection for a sensor\nTo register these tasks for their use, you just need to import them and call their generator functions inside your application's task list:\n\n```typescript\nimport { Task } from '@awarns/core/tasks';\nimport {\n  stopDetectingPhoneSensorChangesTask,\n  PhoneSensor,\n} from '@awarns/phone-sensors';\n\nexport const demoTasks: Array<Task> = [\n  stopDetectingPhoneSensorChangesTask(PhoneSensor.ACCELEROMETER),        // stopDetectingPhoneAccelerometerChanges\n  stopDetectingPhoneNTPSyncedSensorChangesTask(PhoneSensor.GYROSCOPE),   // stopDetectingPhoneNTPSyncedGyroscopeChanges\n  stopDetectingPhoneSensorChangesTask(PhoneSensor.MAGNETOMETER),         // stopDetectingPhoneMagnetometerChanges\n];\n```\n\n> **Note**: a stop task of a specific `PhoneSensor` can be used to stop the collection started by any start task\n> for that `PhoneSensor` no matter the specific configuration.\n\nTask generator parameters:\n\n| Parameter name          | Type                    | Description                              |\n|-------------------------|-------------------------|------------------------------------------|\n| `sensor`                | `WatchSensor`           | Sensor to stop the data collection from. |\n\nTask output events:\n\n> These tasks don't produce significant events after they complete their execution aside from the regular `{task-name}Finished` events.\n> \n> Example usage in the application task graph:\n> ```ts\n> on('startEvent', run('startDetectingPhoneAccelerometerChanges').every(1, 'minute'));\n> on('startEvent', run('startDetectingPhoneNTPSyncedGyroscopeChanges').every(1, 'minute'));\n> on('startEvent', run('startDetectingPhoneMagnetometerChanges').every(1, 'minute'));\n> \n> on('accelerometerSamplesAcquired', run('stopDetectingPhoneAccelerometerChanges'));\n> on('gyroscopeSamplesAcquired', run('stopDetectingPhoneNTPSyncedGyroscopeChanges'));\n> on('magnetometerSamplesAcquired', run('stopDetectingPhoneMagnetometerChanges'));\n>```\n> **Note**: it makes no sense to use these tasks without using before their complementary tasks to start the data collection.\n\n### Events\n\n| Name                           | Payload                 | Description                                                                              |\n|--------------------------------|-------------------------|------------------------------------------------------------------------------------------|\n| `accelerometerSamplesAcquired` | [`TriAxial`](#triaxial) | Contains a list of samples with the `x`, `y`, and `z` values of an accelerometer sensor. |\n| `gyroscopeSamplesAcquired`     | [`TriAxial`](#triaxial) | Contains a list of samples with the `x`, `y`, and `z` values of a gyroscope sensor.      |\n| `magnetometerSamplesAcquired`  | [`TriAxial`](#triaxial) | Contains a list of samples with the `x`, `y`, and `z` values of a magnetometer sensor.   |\n\n### Records\n\n#### TriAxial\n\n| Property    | Type                                  | Description                                                                                            |\n|-------------|---------------------------------------|--------------------------------------------------------------------------------------------------------|\n| `id`        | `string`                              | Record's unique id.                                                                                    |\n| `type`      | `string`                              | One of the following values: `accelerometer`, `gyroscope`, or `magnetometer`.                          |\n| `change`    | `Change`                              | Always `NONE`.                                                                                         |\n| `timestamp` | `Date`                                | The local time when the data was collected. It is equal to the time of the first sample in the record. |\n| `samples`   | [`TriAxialSample[]`](#triaxialsample) | List with the collected samples.                                                                       |\n\n##### `TriAxialSample`\n\n| Property    | Type     | Description                                                    |\n|-------------|----------|----------------------------------------------------------------|\n| `x`         | `number` | Value `x` of the sensor.                                       |\n| `y`         | `number` | Value `y` of the sensor.                                       |\n| `z`         | `number` | Value `z` of the sensor.                                       |\n| `timestamp` | `number` | The local time (UNIX timestamp) when the sample was collected. |\n\n\n## License\n\nApache License Version 2.0\n","readmeFilename":"README.md"}