OVERVIEW Desktop and mobile applications development steps - Medisana/vitadock-api GitHub Wiki
Use case: Desktop / Mobile applications
-
Database
- Access Token/Secret pair per User
- Unauthorized Access Token/Secret pair per User
-
Web Services:
- Register URL scheme (e.g. myapp://) and provide REST callback service OR
- Leave callback URL blank and ask the User for the Verification Token
-
Logic OAuth: (~300 LOC total, OAuth 1.0, standard libraries can be used if slightly modified)
- Calculate signature
- Create Authorization Header
- Call REST Service to register device
- Call REST Services to request Unauthorized Token/Secret pair
- Redirect to Login page (system browser!)
-
Data retrieval: (~300 LOC total)
- Read JSON data for each module
- ~5 general values (measurement date, note, etc.)
- 1-3 primary values (systole, glucose, weight etc.)
- up to 8 secondary values (target values, bmi, activity etc. etc.)
Permission request mobile / desktop application
Figure 1 - Data access with a mobile / desktop application
Data transfer mobile / desktop application
Figure 2 - Request permission with a mobile / desktop application
Example code for a various implementations is available at Medisana GitHub.