Mobile App Configuration - lm-xbit/monitor-platform GitHub Wiki

The mobile APP is used as a prototype application by reporting collected GPS information back to server. To achieve the purpose, a configuration shall be used to let the mobile APP to find the server and report data for owning user.

All communication between APP and server shall go through HTTP/1.1

We use a simple JSON format as the configuraiton, so the configuration shall have following information

{

   code: "xyz1234",
   gate: {
      ssl: true or false,
      host: <ip v4 address>,
      port: 8080
   },
   app: {
      key: <server generate secret key>
      type: mobile-track,
      interval: 120
   }

}

In above configuration JSON, the **gate** subobject gives the server information that the APP shall contact for any operation (report data, get direction, etc.), the **app** sub-object gives information about the APP itself so server can know what kind of application it is and for which user the data shall be processed for.

  • code: the code to use to connect the APP. APP must send the code when connecting to server
  • gate.ssl: set to true of APP shall use HTTPS to contact the given IP and port
  • gate.host: the IP address or DNS to contact
  • gate.port: the port # to connect
  • app.key: this is a server generate unique for an APP installation. So different installations for different user will have different key, with which server can associate the report data to a specific application of a specific user.
  • app.type: this is used to identify the type of APP. For this version, it is always fixed to mobile-tracking
  • app.interval: the interval in seconds for APP to report data back
⚠️ **GitHub.com Fallback** ⚠️