0.1.6 • Published 2 years ago

react-native-transtracker-library v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-transtracker-library

TransTracker Library

Installation

npm install react-native-transtracker-library

Configuration

We recommend you to use the react-native-permissions ( or any similliar ) library to request the permission.

  • iOS permission you can request PERMISSIONS.IOS.LOCATION_ALWAYS Info.plist
<key>NSLocationAlwaysUsageDescription</key>
<string>Needed to access location</string>

<key>UIBackgroundModes</key>
<array>
	<string>location</string>
	<string>processing</string>
</array>

Podfile

# ( Check react-native-permissions for setup)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}LocationAccuracy"
pod 'Permission-LocationAlways', :path => "#{permissions_path}LocationAlways"
  • Android permission you can request PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION and PERMISSIONS.ANDROID.ACCESS_BACKGROUND_LOCATION
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Please see the example folder for more detail.

Usage

/// Import service
import { trackerEmitter, initiateService, startService, stopService } from 'react-native-transtracker-library';

/// Received event from native ( if needed )
trackerEmitter.addListener('onLocationChanged', function (e) {
    setLocation(e);
});

/// Initiate service location before initiate try to check permission location
/// [apiKey] from TransTRACK
/// [externalId] is unique id to identify the account from telematics ( FMS ) web application
/// [trackerId] is used to identify the device ( IMEI or other ) it can be same as externalId
/// different IMEI, will be charged different fee for each device
initiateService(apiKey, externalId, trackerId);

Support and feedback

  • To renew the subscription, contact our sales team at contact@transtrack.id
  • For any other info, reach our support or post and submit a feature request or a bug through our Github issues.
  • See the contributing guide to learn how to contribute to the repository and the development workflow.

About TransTRACK.ID

We are here with the aim of providing the right solutions for the telematics world in Indonesia. Different & unique cultural wealth is the main key to our solution for Indonesia. Since the beginning of 2019, we have been operating, we have always learned to provide solutions. In almost all regions in Indonesia our solution has been present and we are just starting this story.

abort-controllerabsolute-pathacceptsababacorn-jsxacorn-globalsadd-streamaggregate-erroracornagent-baseacorn-walkajvansi-alignansi-escapesanseransi-cyanansi-fragmentsansi-grayansi-stylesansi-regexansi-colorsargparseanymatchansi-wraparray-filterarr-diffarr-unionarr-flattenansi-redarray-ifyarray-reducearray-sliceJSONStreamarray.prototype.flatmaparray-uniquearray-unionarray-maparrifyasapassign-symbolsastral-regexasync-retryarray-includesat-least-nodebabel-jestbabel-eslintasynckitasyncbabel-plugin-istanbulatobbabel-plugin-jest-hoistbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-preset-current-node-syntaxbabel-preset-jestbabel-plugin-dynamic-import-nodebabel-preset-fbjsbalanced-matchbasebabel-plugin-syntax-trailing-function-commasbindingsbabel-plugin-polyfill-regeneratorboxenbig-integerbracesbplist-parserbrowser-process-hrtimebrace-expansionblbserbplist-creatorbufferbase64-jscache-basebefore-after-hookbuffer-fromcacheable-lookupbuffer-crc32caller-callsitecaller-pathcacheable-requestcamelcasecamelcase-keysbytescallsitescaniuse-litechalkbrowserslistcall-bindchar-regexchardetcapture-exitci-infoclean-stackcli-cursorcli-boxescli-spinnerscliuicli-widthclass-utilscloneclone-responsecollect-v8-coveragecolor-supportcjs-module-lexerclone-deepcolor-convertcolorettecombined-streamcocollection-visitcomponent-emittercolor-namecommand-existscompare-funccommondircompressibleconcat-mapconcat-streamcompressionconnectconventional-changelogconventional-changelog-angularconventional-changelog-conventionalcommitsconventional-changelog-atomconfigstorecommanderconventional-changelog-emberconventional-changelog-coreconventional-changelog-jshintconventional-changelog-jqueryconventional-changelog-expressconventional-commits-parserconventional-changelog-writerconventional-recommended-bumpconvert-source-mapconventional-changelog-codemirrorcore-jsconventional-changelog-preset-loaderconventional-changelog-eslintconventional-commits-filtercopy-descriptorcosmiconfigcrypto-random-stringcross-spawncore-util-iscore-js-compatcssomcsstypedebugdargsdateformatdecamelize-keysdayjsdecamelizedecimal.jscssstyledecompress-responsedata-urlsdedentdecode-uri-componentdeep-isdefaultsdefine-propertiesdeldefer-to-connectdefine-propertydelayed-streamdenodeifydeprecationdetect-newlinedeep-extenddeepmergedestroydepddoctrinedot-propduplexer3diff-sequenceselectron-to-chromiumemitteryemoji-regexencodingdomexceptionend-of-streamee-firstenquirererror-stack-parsererrorhandlerencodeurlescape-goates-abstractescape-htmlerror-exeslint-plugin-eslint-commentsescodegenescape-string-regexpescaladees-to-primitiveeslint-plugin-jesteslint-plugin-reacteslint-plugin-react-hooksenvinfoeslint-plugin-react-native-globalseslint-visitor-keysesprimaespreeesqueryeslint-plugin-react-nativeestraverseeslint-plugin-flowtypeetagesutilseslint-utilseventemitter3eslint-scopeexecaevent-target-shimexec-shexternal-editorexpectexpand-bracketsfancy-logfast-globfast-diffexitesrecursefastqfast-levenshteinfast-deep-equalfb-watchmanfbjsfbjs-scriptsfiguresextglobextend-shallowfbjs-css-varsfast-json-stable-stringifyfill-rangefind-cache-dirfinalhandlerfile-entry-cachefind-upfilter-objflat-cachefile-uri-to-pathfor-inflattedform-datafragment-cachefs.realpathfs-extrafseventsfreshfunctional-red-black-treeget-caller-fileget-pkg-repogensyncget-package-typeget-streamget-symbol-descriptionget-valueget-intrinsicfunction-bindgit-remote-origin-urlgit-url-parsegit-upgitconfiglocalget-stdinglobbyglob-parentglobglobal-dirsgotgit-raw-commitsgraceful-fsgit-semver-tagshard-rejectionhashas-symbolshandlebarsglobalshas-flaghas-valuehas-bigintsgrowlyhas-valueshas-yarnhermes-enginehas-tostringtaghosted-git-infohtml-escaperhttp-errorshtml-encoding-snifferhermes-profile-transformerhttp-proxy-agenthttp2-wrapperhuman-signalsimport-cwdhttps-proxy-agentimage-sizeimport-freshhttp-cache-semanticsieee754import-fromiconv-liteimport-lazyimport-localimurmurhashinflightiniinquirerinternal-slotignoreindent-stringis-accessor-descriptorinterpretinheritsipis-absoluteis-arrayishis-callableis-bufferis-boolean-objectis-core-moduleis-data-descriptoris-ciis-bigintis-descriptorinvariantis-date-objectis-directoryis-dockeris-extendableis-extglobis-generator-fnis-fullwidth-code-pointis-git-repositoryis-interactiveis-installed-globallyis-git-dirtyis-globis-npmis-objis-path-cwdis-numberis-path-insideis-negative-zerois-plain-objectis-number-objectis-shared-array-bufferis-regexis-sshis-streamis-typedarrayis-relativeis-stringis-plain-objis-unicode-supportedis-symbolis-unc-pathis-weakrefis-windowsis-potential-custom-element-nameis-text-pathis-yarn-globalistanbul-lib-coverageisomorphic-fetchisarrayisexeistanbul-lib-reportistanbul-lib-instrumentisobjectis-wsljest-changed-filesjest-configjest-diffjest-docblockjest-eachistanbul-lib-source-mapsjest-cliistanbul-reportsjest-environment-nodejest-get-typejest-haste-mapjest-environment-jsdomjest-leak-detectorjest-jasmine2jest-pnp-resolverjest-message-utiljest-mockjest-runnerjest-resolve-dependenciesjest-resolvejest-snapshotjest-serializerjest-regex-utiljest-utiljest-validatejest-watcherjetifierjs-tokensjsc-androidjsdomjs-yamljson-parse-better-errorsjest-workerjson-bufferjson-schema-traversejest-runtimejson-stable-stringifyjest-matcher-utilsjson-stable-stringify-without-jsonifyjsonparsejson5jsonifyjson-stringify-safejsx-ast-utilsjson-parse-even-better-errorsjsonfilejsesckleurkeyvkind-oflevnlines-and-columnsload-json-fileklawlocate-pathlatest-versionlodash.mergelevenlodash.ismatchlodash.debouncelogkittylog-symbolslodash.throttlelodash.truncatelodashloose-envifymacos-releaselru-cachemap-cachemake-dirmakeerrormerge2metromap-visitmeowmetro-babel-transformerlowercase-keysmerge-streammap-objmetro-minify-uglifymetro-configmetro-coremetro-react-native-babel-presetmetro-react-native-babel-transformermetro-resolvermetro-babel-registermetro-inspector-proxymetro-symbolicatemetro-source-mapmetro-cachemime-dbmimic-responseminimatchmimemicromatchminimistmin-indentmimic-fnmime-typesmodify-valuesmixin-deepminimist-optionsnegotiatornanomatchmkdirpnice-tryneo-asyncmsnatural-comparenew-github-release-urlnannode-int64mute-streamnode-fetchnocachenode-releasesnormalize-pathnode-notifiernode-stream-zipnullthrowsnwsapinpm-run-pathnormalize-urlobject-assigndir-globob1object-copyobject.assignobject.pickobject-visitobject-inspecton-finishedobject.fromentriesobject-keysnormalize-package-dataobject.entriesobject.valuesonetimeonceobject.hasownon-headersos-tmpdirorap-cancelableoptionatoros-namep-each-seriesp-limitp-finallypackage-jsonp-mapparent-modulep-tryoptionsparse-node-versionparse5parse-pathpascalcaseparseurlopenparse-jsonparse-urlpath-parsepicocolorsp-locatepath-keypath-existspicomatchpifypath-is-absoluteplistplugin-errorpiratesprettier-linter-helperspkg-dirprepend-httppath-typeprelude-lsprepend-filepretty-formatposix-character-classespromiseprop-typespromptsprogresspseudomapprocess-nextick-argsqspumppupaqpunycodeprotocolsquery-stringpslqueue-microtaskrcread-pkgreact-refreshrange-parserreadable-streamrechoirreact-isread-pkg-upreact-devtools-coreregenerate-unicode-propertiesredentquick-lruregexp.prototype.flagsregex-notregenerator-transformregenerateregenerator-runtimeregistry-auth-tokenregistry-urlregjsparserregjsgenregexppremove-trailing-separatorrequire-from-stringrepeat-stringrepeat-elementrequire-main-filenameregexpu-coreresolve-alpnresolve-cwdresolveresolve-fromresolve-globalresolve-urlreusifyresponselikersvprestore-cursorrequire-directoryretrun-parallelrun-asyncrimrafrxjsrx-literx-lite-aggregatessanesafe-regexsaxesretrysemver-diffschedulersafer-buffersemverserialize-errorsendset-valuesetprototypeofserve-staticset-blockingshebang-commandshebang-regexsafe-buffershell-quoteshallow-cloneshelljssimple-plistsetimmediateside-channelsaxslashshellwordssnapdragonslice-ansisnapdragon-utilsnapdragon-nodesource-mapsource-map-resolvesisteransisignal-exitsource-map-urlspdx-license-idssource-map-supportsplit-on-firstspdx-expression-parsesplitspdx-exceptionsspdx-correctsprintf-jssplit-stringsplit2stackframestatusesstatic-extendstack-utilsstream-buffersstring-widthstrict-uri-encodestring.prototype.matchallstring.prototype.trimendstacktrace-parserstrip-bomstring-lengthstring.prototype.trimstartstring_decoderstrip-indentstrip-eofstrip-ansisupports-colorsupports-preserve-symlinks-flagsudo-promptsupports-hyperlinksstrip-final-newlinesymbol-treestrip-json-commentsterminal-linktabletemp-dirtemp-writethroattext-extensionsthroughthrough2tmptime-stamptemptest-excludeto-fast-propertiestext-tableto-object-pathto-regexto-regex-rangeto-readable-streamtmpltr46tsutilstype-checktype-festtslibtype-detecttypedarray-to-buffertough-cookietoidentifieruglify-jsua-parser-jstypedarrayultrontrim-newlinesunbox-primitiveunicode-canonical-property-names-ecmascriptunicode-match-property-value-ecmascriptunc-path-regexuglify-esunicode-match-property-ecmascriptuniversal-user-agentuniversalifyunion-valueunicode-property-aliases-ecmascriptupdate-notifierurl-parse-laxunpipeurixuseutil-deprecateutils-mergeuse-subscriptionuuidv8-compile-cacheuri-jsvalidate-npm-package-licenseunique-stringunset-valuevlqurl-joinw3c-hr-timew3c-xmlserializervarywebidl-conversionswhatwg-fetchwalkerwhatwg-encodingwhatwg-mimetypewhichwhich-modulewidest-linev8-to-istanbulwindows-releaseword-wrapwhatwg-urlwcwidthwsxcodewrite-file-atomicwrap-ansiwordwrapwhich-boxed-primitivexmlcharsxml-name-validatorxmlbuilderxtendxmldocyargsyallistxpipeyamlxdg-basedirwrappyyargs-parseryocto-queuey18n
0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago