proximity-client-electron

0.1.1 • Public • Published

Proximity Client

  • Dk = the k-th client device in a proximity domain size of K+1 devices
  • Rl = the l-th router in a proximity domain size of L+1 router devices
  • Sm = the m-th server device in a proximity domain size of M+1 server devices
  • Cn = the n-th cloud-server in a proximity domain size of N+1 cloud devices

Sensor Modes

  • Wifidirects hardware
  • Wifi hardware
  • Geolocation hardware

Functions

  • Offline dynamic data interactions and contents
  • Proximity based Virtual Private Network for offline dynamic transactions
  • Proximity based location mapping of entities
  • Proximity based distributed computing on the client-side
  • Proximity based business solutions such as proximity-commerce, proximity-social, etc
  • Proximity based financial solutions
  • Proximity based distributed machine learning
  • Proximity based robotics, artificial intelligence, and machine learning algorithms

Applications

  • Proximity commerce solutions
  • Proximity social solutions
  • Proximity IoTs
  • Proximity games
  • Service Infracstructure management
  • Offline proximity financial solutions
  • Proximity land-mapping for surveyors
  • Proximity on-premise customer relationship management solutions
  • Interior position machine learning solutions
  • Mobile traffic solutions and analytics
  • Proximity business intelligence

Research papers

  • Proximity Mathematical Analysis
  • Proximity Economics and Success Factor Analysis
  • Proximity Finance and Success Factor Analysis
  • Quantum Computing and Proximity
  • Proximity, Machine Learning, and Data Science

Installation

npm install --save proximity-client
react-native link proximity-client

Getting Started

Import
Else, to use the client API in a module, import and construct a proximity client as shown in the code below.
const ProximityClient = require("proximity-client-react-native")
const proximityClient = new ProximityClient(key, secret)
Register
Goto developer registration link to register and get a KEY and SECRET for your app. Then use
proximityClient.register(username, email, password)
to register a server user to grant access to the local and cloud proximity database.
Login
proximityClient.login(username, password)
Then server users can login with the command shown above to login to local and cloud proximity clients, servers, and start developing your applications.
Initialize
Ones the server is constructed and you've logged in successfully, you must always intialize the server before it is started as shown below
proximityClient.initialize()
Webplug
To be able to use the functions in the library in a webview, call the webplug(event) in the onMessage function of the webview. Then you can proximity client functions in your javascript code.
proximityClient.webplug(event)
SwitchOn
To switch on the client sensor and start detecting proximity based data such as devices and users in proximity, use the code below.
proximityClient.switchOn(mode)
GetDevices
proximityClient.getDevices(option)
To get devices in proximity or in the database, call the getDevices function as shown in the code above and parse in the right option argument as desired.
GetUsers
proximityClient.getUsers(option)
To get users in proximity or in the database, call the getUsers function as shown in the code above and parse in the right option argument as desired.
GetServices
proximityClient.getServices(option)
To get services in proximity or in the database, call the getServices function as shown in the code above and parse in the right option argument as desired.
GetProducts
proximityClient.getProducts(option)
To get products in proximity or in the database, call the getProducts function as shown in the code above and parse in the right option argument as desired.
Send
proximityClient.send(event, message)
To send messages or actions to proximity devices, proximity local servers, and/or proximity cloud servers; user the send function as shown in the code above.
On
proximityClient.on(event, cb)
To listen to events on a device, or any of the devices in proximity, use "on" event function and parse in a callback function as a second argument as shown above.
SwitchOff
proximityClient.switchOff(mode)
It is advisable to always switch off the proximity sensors when not needed. Use the "switchOff" function with a "mode" as argument to turn off the sensor as shown above
Logout
proximityServer.logout()
Sometimes, you may want to switch user control, use the command below to logout. Then, use the login command with the new user credentials

Local Queries
You may prefer to user REST API syntax to interface with the local server. In anycase this is for you, follow the syntax below to make queries to the local server ones started.
curl -X POST $PROXIMITY_LOCAL_REST_URI/[username]/[userId]/[deviceId]/[endpoints]
Cloud Queries
Use the syntax below to make query to the proximity cloud server
curl -X POST $PROXIMITY_CLOUD_REST_URI/[username]/[userId]/[deviceId]/[endpoints]
Endpoints
The list of REST endpoints available on both local and cloud proximity servers are:
  • /query
  • /first_proximity
  • /search

/proximity-client-electron/

    Package Sidebar

    Install

    npm i proximity-client-electron

    Weekly Downloads

    4

    Version

    0.1.1

    License

    ISC

    Unpacked Size

    94.7 kB

    Total Files

    17

    Last publish

    Collaborators

    • jaybashorun