0.1.4 • Published 1 year ago

react-native-jsi-device-info v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-jsi-device-info

npm version npm total downloads npm monthly downloads npm weekly downloads

Device Information Through JSI for React Native.

Installation

Vanilla React Native

yarn

yarn add react-native-jsi-device-info

or

npm

npm install react-native-jsi-device-info

And

cd ios && pod install

Expo

expo install react-native-jsi-device-info
expo prebuild

Basic usage example

import JSIDeviceInfo from "react-native-jsi-device-info";

JSIDeviceInfo.getDeviceName() // returns Device Name 
// Example
// iOS: "Khant Si Thu's iPhone 7"
// Android: ?
// Windows: ?

Run the example app for more.

API

Note that many APIs are platform-specific. If there is no implementation for a platform, then the "default" return values you will receive are "unknown" for string, -1 for number, and false for boolean. Arrays and Objects will be empty ([] and {} respectively).

The example app in this repository shows an example usage of every single API, consult the example app if you have questions, and if you think you see a problem make sure you can reproduce it using the example app before reporting it, thank you.

MethodReturn TypeiOSAndroid
getAndroidId()string
getApiLevel()number
getApplicationName()string
getAvailableLocationProviders()Object🚧🚧
getBaseOs()string
getBuildId()string
getBatteryLevel()string
getBootloader()string🚧🚧
getBrand()string
getBuildNumber()string
getBundleId()string
isCameraPresent()boolean🚧🚧
getCarrier()string🚧🚧
getCodename()string🚧🚧
getDevice()string🚧🚧
getDeviceId()string🚧🚧
getDeviceType()string🚧🚧
getDisplay()string🚧🚧
getDeviceName()string
getDeviceToken()string
getFirstInstallTime()number🚧🚧
getFingerprint()string
getFontScale()number🚧🚧
getFreeDiskStorage()number🚧🚧
getFreeDiskStorageOld()number🚧🚧
getHardware()string🚧🚧
getHost()string🚧🚧
getIpAddress()string
getIncremental()string🚧🚧
getInstallerPackageName()string🚧🚧
getInstallReferrer()string🚧🚧
getInstanceId()string🚧🚧
getLastUpdateTime()number🚧🚧
getMacAddress()string🚧🚧
getManufacturer()string
getMaxMemory()number🚧🚧
getModel()string
getPhoneNumber()string🚧🚧
getPowerState()object🚧🚧
getProduct()string🚧🚧
getPreviewSdkInt()number🚧🚧
getReadableVersion()string🚧🚧
getSerialNumber()string🚧🚧
getSecurityPatch()string
getSystemAvailableFeatures()string[]🚧🚧
getSystemName()string🚧🚧
getSystemVersion()string🚧🚧
getTags()string🚧🚧
getType()string🚧🚧
getTotalDiskCapacity()number🚧🚧
getTotalDiskCapacityOld()number🚧🚧
getTotalMemory()number🚧🚧
getUniqueId()string🚧🚧
getUsedMemory()number🚧🚧
getUserAgent()string🚧🚧
getVersion()string🚧🚧
getBrightness()number🚧🚧
hasGms()boolean🚧🚧
hasHms()boolean🚧🚧
hasNotch()boolean🚧🚧
hasSystemFeature()boolean🚧🚧
isAirplaneMode()boolean🚧🚧
isBatteryCharging()boolean🚧🚧
isEmulator()boolean🚧🚧
isKeyboardConnected()boolean🚧🚧
isLandscape()boolean🚧🚧
isLocationEnabled()boolean🚧🚧
isMouseConnected()boolean🚧🚧
isHeadphonesConnected()boolean🚧🚧
isPinOrFingerprintSet()boolean🚧🚧
isTablet()boolean🚧🚧
isTabletMode()boolean🚧🚧
supported32BitAbis()string[]🚧🚧
supported64BitAbis()string[]🚧🚧
supportedAbis()string[]🚧🚧
syncUniqueId()string🚧🚧

Thanks to these libraries & their authors:

The initial work done by authors of the following libraries has helped a lot in keeping this repo updated.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

ababacornacceptsabort-controllerabsolute-pathacorn-jsxagent-baseajvadd-streamansi-cyanaggregate-erroracorn-walkanseransi-escapesacorn-globalsansi-fragmentsansi-alignansi-colorsansi-grayansi-redansi-stylesansi-regexansi-wrapanymatchargparseJSONStreamarray-filterarr-diffarr-flattenarr-unionarray-unionarray-maparray.prototype.flatmaparray-uniquearray.prototype.maparray-includesarrifyarray-sliceastral-regexarray-reduceassign-symbolsast-typesasapasynckitasync-retryat-least-nodeasyncatobbabel-jestbabel-plugin-istanbulbabel-plugin-jest-hoistarray-ifybabel-eslintbabel-plugin-polyfill-regeneratorbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-syntax-trailing-function-commasbabel-preset-fbjsbalanced-matchbasebabel-preset-jestbabel-plugin-dynamic-import-nodebig-integerblbase64-jsbefore-after-hookbplist-creatorboxenbindingsbracesbufferbrace-expansionbserbrowser-process-hrtimebrowserslistbuffer-frombplist-parserbuffer-crc32bytescacheable-requestcaller-pathcache-basecamelcasecamelcase-keyscall-bindcaniuse-litecapture-exitbabel-preset-current-node-syntaxcallsiteschar-regexchardetcaller-callsitecjs-module-lexerclass-utilscli-cursorci-infoclean-stackcli-boxescli-spinnerscliuicloneclone-deepcoclone-responsechalkcollection-visitcolor-convertcolor-namecolor-supportcollect-v8-coveragecli-widthcommand-existscombined-streamcolorettecompare-funccommandercompare-versionscommondircompressioncompressiblecomponent-emitterconcat-mapconfigstoreconventional-changelogconventional-changelog-codemirrorconventional-changelog-atomconventional-changelog-conventionalcommitsconcat-streamconventional-changelog-coreconventional-changelog-angularconnectconventional-changelog-emberconventional-changelog-eslintconventional-changelog-jqueryconventional-changelog-preset-loaderconventional-commits-filterconventional-changelog-jshintconventional-commits-parserconventional-changelog-expresscopy-descriptorconventional-recommended-bumpcosmiconfigcore-jscore-util-iscrypto-random-stringcross-spawnconvert-source-mapcssomcsstypecore-js-compatdata-urlsdata-uri-to-bufferdargsdateformatdecamelizecssstyledayjsdecamelize-keysdecode-uri-componentconventional-changelog-writerdecimal.jsdecompress-responsedeep-extenddedentdeep-isdeepmergedefer-to-connectdefine-propertiesdefaultsdebugdegeneratordelayed-streamdefine-propertydeldepddetect-newlinedestroydenodeifydeprecationdir-globdoctrinedomexceptiondot-propduplexer3diff-sequenceselectron-to-chromiumee-firstencodeurlemoji-regexemitteryencodingenquirerend-of-streamerror-exerrorhandlererror-stack-parseres-array-method-boxes-properlyenvinfoes-get-iteratores-abstractes-to-primitiveescape-goatescape-htmlescape-string-regexpescodegenes-shim-unscopablesescaladeeslint-plugin-flowtypeeslint-plugin-jesteslint-plugin-reacteslint-plugin-react-hookseslint-plugin-react-nativeeslint-plugin-react-native-globalseslint-utilseslint-scopeeslint-plugin-eslint-commentsesrecurseeslint-visitor-keysespreeesqueryesutilsestraverseesprimaevent-target-shimetagexpand-bracketsexecaexiteventemitter3expectexec-shextend-shallowfast-deep-equalextglobexternal-editorfancy-logfast-globfast-difffast-levenshteinfb-watchmanfbjsfast-json-stable-stringifyfastqfill-rangefile-entry-cachefilter-objfbjs-scriptsfile-uri-to-pathfinalhandlerfind-cache-dirfiguresfind-upflattedflat-cachefind-versionsfor-inform-datafbjs-css-varsfreshfs.realpathfragment-cachefseventsftpfunctional-red-black-treefunctions-have-namesfunction.prototype.nameget-intrinsicget-package-typegensyncget-pkg-repoget-symbol-descriptionget-streamget-uriget-stdinfs-extraget-valuegit-raw-commitsgit-remote-origin-urlgit-semver-tagsget-caller-fileglobglob-parentgit-upgit-url-parseglobalsgrowlygothandlebarsglobbyhasgitconfiglocalhard-rejectionhas-property-descriptorshas-flagglobal-dirshas-bigintshas-symbolshas-tostringtaggraceful-fshas-valuehas-valueshermes-profile-transformerhas-yarnhtml-escaperhttp-errorshermes-enginehttps-proxy-agenthosted-git-infoimage-sizehttp-proxy-agentignoreimport-cwdiconv-litehttp-cache-semanticsimport-lazyimport-freshhtml-encoding-snifferhuman-signalsieee754function-bindimport-fromindent-stringinflightiniinheritsinterpretinquireripinternal-slotis-accessor-descriptoris-absoluteis-arrayishis-argumentsis-boolean-objectimurmurhashimport-localis-bigintis-data-descriptoris-callableis-ciis-bufferis-date-objectis-extendableis-directoryis-core-moduleis-extglobis-generator-fnis-fullwidth-code-pointis-globis-git-repositoryis-dockeris-git-dirtyis-installed-globallyis-descriptoris-mapinvariantis-interactiveis-number-objectis-npmis-objis-path-cwdis-plain-objis-path-insideis-plain-objectis-relativeis-numberis-potential-custom-element-nameis-setis-streamis-stringis-shared-array-bufferis-symbolis-sshis-typedarrayis-text-pathis-weakrefisarrayis-wslis-regexis-unicode-supportedisexeis-yarn-globalis-windowsistanbul-lib-coverageistanbul-lib-reportistanbul-lib-instrumentisobjectisomorphic-fetchiterate-iteratoristanbul-lib-source-mapsiterate-valuejest-clijest-diffjest-configis-negative-zerois-unc-pathjest-eachjest-changed-filesjest-docblockistanbul-reportsjest-environment-nodejest-haste-mapjest-get-typejest-jasmine2jest-matcher-utilsjest-message-utiljest-regex-utiljest-mockjest-leak-detectorjest-pnp-resolverjest-resolvejest-resolve-dependenciesjest-runtimejest-snapshotjest-serializerjest-runnerjest-watcherjest-utiljest-validatejest-workerjs-tokensjetifierjsescjsc-androidjsdomjson-parse-better-errorsjson-parse-even-better-errorsjest-environment-jsdomjs-yamljson-bufferjson-stringify-safejsonfilejson5jsonifyjson-stable-stringifyjsonparsekleurkind-ofjsx-ast-utilsklawkeyvlatest-versionjson-schema-traverselines-and-columnslevenjson-stable-stringify-without-jsonifylocate-pathlodash.debouncelodash.mergelodash.ismatchlodash.throttlelodash.truncatelog-symbolslogkittyloose-envifylowercase-keyslru-cachemake-dirmacos-releasemap-cachemakeerrormeowlevnload-json-filemerge-streamlodashmetro-cachemerge2metro-babel-transformermetro-inspector-proxymetro-babel-registermetro-minify-uglifymetro-react-native-babel-presetmetro-resolvermap-visitmetro-source-mapmetro-coremetro-symbolicatemetro-configmetro-react-native-babel-transformermicromatchmap-objmime-typesmimic-responsemin-indentmime-dbmimeminimatchminimistmkdirpmetromute-streammodify-valuesmimic-fnmsnanomatchnegotiatormixin-deepnatural-comparenew-github-release-urlnetmasknanminimist-optionsnode-fetchneo-asyncnocachenice-trynode-int64npm-run-pathnormalize-package-datanullthrowsnormalize-pathnode-notifiernwsapiobject-assignob1object-inspectobject-copynormalize-urlobject-keysobject-visitobject.assignobject.entriesobject.fromentrieson-finishedobject.valueson-headersonceobject.hasownobject.pickopenopencollective-postinstallonetimeoptionatornode-releasesoraoptionsnode-stream-zipp-limitos-namep-finallyp-cancelablep-each-seriespackage-jsonp-mapp-locateparent-modulep-tryparse-node-versionparse-pathpac-proxy-agentparse5os-tmpdirpac-resolverparseurlpath-existspath-is-absolutepascalcaseparse-jsonpicocolorspath-parsepath-typepiratespkg-dirpifypicomatchplugin-errorpath-keyplease-upgrade-nodeplistparse-urlposix-character-classesprepend-fileprettier-linter-helperspretty-formatprogressprepend-httppromptsprelude-lspromise.allsettledprotocolsprop-typesproxy-agentproxy-from-envpumpprocess-nextick-argspunycodepseudomappslpromisepupaquery-stringquick-lruqueue-microtaskraw-bodyrange-parserqrcreact-isreact-devtools-coreread-pkgreadable-streamread-pkg-uprechoirregenerator-runtimeredentreact-refreshregex-notregenerateqsregexpu-coreregexppregenerator-transformregistry-urlregexp.prototype.flagsregjsgenregistry-auth-tokenremove-trailing-separatorrepeat-stringrepeat-elementrequire-directoryrequire-main-filenameresolve-cwdresolveresolve-fromresolve-urlrequire-from-stringretregenerate-unicode-propertiesrestore-cursorresolve-globalretryregjsparserrimrafrun-asyncrx-litersvprx-lite-aggregatesresponselikereusifysafer-bufferrun-parallelsafe-regexsanesafe-bufferrxjssaxessemver-compareschedulersemver-diffsemver-regexsendserve-staticsemverset-valueserialize-errorsetprototypeofshallow-clonesetimmediateshebang-regexshebang-commandset-blockingshellwordsside-channelshell-quotesignal-exitsimple-plistslashshelljsslice-ansisisteransismart-buffersnapdragonsnapdragon-utilsource-mapsockssnapdragon-nodesocks-proxy-agentsaxspdx-expression-parsesource-map-urlsource-map-resolvesplitspdx-exceptionssource-map-supportspdx-license-idssplit-on-firstsplit-stringstack-utilsstacktrace-parsersplit2sprintf-jsstatic-extendstatusesstackframestream-buffersspdx-correctstrict-uri-encodestrip-eofstring.prototype.trimendstring-widthstring-lengthstring.prototype.matchallstrip-bomstrip-ansistrip-json-commentsstring_decoderstring.prototype.trimstartsupports-colorstrip-final-newlinesupports-hyperlinksstrip-indentsudo-promptsymbol-treetemptabletemp-dirtemp-writetext-tableterminal-linktest-excludetext-extensionsthroatthroughtime-stampthrough2tmpto-object-pathsupports-preserve-symlinks-flagto-fast-propertiesto-regexto-readable-streamto-regex-rangetoidentifiertough-cookietype-checktr46trim-newlinestype-detecttsutilstypedarrayultrontypedarray-to-bufferuglify-esua-parser-jsunc-path-regexunicode-canonical-property-names-ecmascriptuglify-jsunicode-match-property-ecmascripttmplunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunique-stringunbox-primitivetslibuniversalifyunpipeunion-valueuniversal-user-agentunset-valueupdate-notifierurixuri-jstype-festuseuse-subscriptionurl-parse-laxutils-mergeutil-deprecatev8-compile-cacheuuidv8-to-istanbulvalidate-npm-package-licensevaryvm2w3c-hr-timewalkerw3c-xmlserializerwebidl-conversionswcwidthwhatwg-encodinguse-sync-external-storewhatwg-fetchvlqwhatwg-mimetypewhatwg-urlwhichwhich-boxed-primitivewidest-linewhich-modulewildcard-matchwindows-releaseword-wrapwhich-pm-runsurl-joinwrap-ansixcodewswrappywrite-file-atomicxmlbuilderxml-name-validatorxpipexmldocxregexpxdg-basedirxtendyallistwordwrapyamlyargsyargs-parserxmlcharsy18nyocto-queue
0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago