{"id":16866444,"url":"https://github.com/maxgraey/fuse-device","last_synced_at":"2025-10-22T21:36:40.460Z","repository":{"id":66215614,"uuid":"65248735","full_name":"MaxGraey/fuse-device","owner":"MaxGraey","description":"Use the basic Device functions such as UUID and current localization from Fuse","archived":false,"fork":false,"pushed_at":"2017-10-20T19:41:40.000Z","size":206,"stargazers_count":13,"open_issues_count":1,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T11:17:25.096Z","etag":null,"topics":["android","device","fuse","information","ios","localization","uuid"],"latest_commit_sha":null,"homepage":null,"language":"Uno","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxGraey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-09T00:11:45.000Z","updated_at":"2019-11-30T04:35:53.000Z","dependencies_parsed_at":"2023-02-25T02:15:22.877Z","dependency_job_id":null,"html_url":"https://github.com/MaxGraey/fuse-device","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaxGraey/fuse-device","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Ffuse-device","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Ffuse-device/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Ffuse-device/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Ffuse-device/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxGraey","download_url":"https://codeload.github.com/MaxGraey/fuse-device/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Ffuse-device/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273139875,"owners_count":25052511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","device","fuse","information","ios","localization","uuid"],"created_at":"2024-10-13T14:50:36.830Z","updated_at":"2025-10-22T21:36:35.428Z","avatar_url":"https://github.com/MaxGraey.png","language":"Uno","funding_links":[],"categories":[],"sub_categories":[],"readme":"fuse-device\n============\n\nUse the basic Device functions such as UUID and current localization from Fuse.\n\n\n## Installation\n\nUsing [fusepm](https://github.com/bolav/fusepm)\n\n    $ fusepm install https://github.com/MaxGraey/fuse-device\n\nOr manually copy **Device.uno** to your project and add link in .unoproj [see example](https://github.com/MaxGraey/fuse-device/tree/master/example)\n\n### Support\n- **iOS**\n- **Android**\n- **Preview**\n\n\n### JavaScript\n\n```js\n    var Device = require('Device');\n\n    console.log('Current device language: ' + Device.locale); // format in BCP-47 for all mobile platforms\n    // output example: en-US\n\n    console.log('UUID:'                + Device.UUID);\n    // output example:\n    // UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n\n    console.log('Vendor name: '        + Device.vendor);\n    console.log('Model name: '         + Device.model);\n    console.log('System: '             + Device.system);\n    console.log('System version: '     + Device.systemVersion);\n    console.log('System SDK ver: '     + Device.SDKVersion);\n    console.log('Logical processors: ' + Device.cores);\n    console.log('is retina?: '         + Device.isRetina);\n```\n\nSince reading UUID in Android requires a run-time permission to `READ_PHONE_STATE`,\nthe UUID might not always be accessible via `Device.UUID` directly. To work around that,\nthere is a `getUUID()` method that returns the UUID in a promise.\n\nFor convenience, `getUUID()` is available on all target platforms, but it only triggers the permission request on Android.\n\n```js\n    var Device = require('Device');\n    if (Device.UUID == '') {\n        Device.getUUID().then(function(uuid) {\n            console.log('UUID: ' + uuid);\n            // output example:\n            // UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n        }).catch(function(error) {\n            console.log('UUID error: ' + error);\n            // output example:\n            // UUID error: Permissions could not be requested or granted.\n        });\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgraey%2Ffuse-device","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxgraey%2Ffuse-device","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgraey%2Ffuse-device/lists"}