Notes on Memas
Mumble
Table of contents
Introduction
PostmanThe directory ~/Documents/Work/Hnm/Clients/Karde/
on
Hannemyr PC is used for the project documentation. All documentation
directories referred to below are in subdirectories of this.
The project consists of two components:
- Memas: Android kiosk app (client) for PEU.
- Adminweb: Website (server) with administrative interface for SEU.
The project that produced the “Memas” native android app and Adminwb was originally named “Caneo”.
The source code of the original Memas client (as received from
Tellu) is archived at ~/src/gitrepo/karde/caneo-anderoid-v2/
.
For use in Android Studio, a copy is imported to
~/AndroidStudioProjects/caneo-anderoid-v2
on Hannemyr PC.
This should not be altered.
The development version of version 3 is located
at ~/AndroidStudioProjects/Memas-v3
Hannemyr PC.
The platform used for Adminweb is Grails 1. It is seriously outdated and can no longer be compiled. It uses a expanded dialect of Java called “groovy”.
Q&A with Tellu (norwegian)
SM
: Sverre Morka, 952 31 268
LB
: Lars Thomas Boye, 905 72 929.
2019-April-02 [SM & LB]:
- Er kildekoden til Memas og til Adminweb tilgjengelig?
Ja. Både Adminweb og Memas bruker veldig gamle og utdaterte biblioteker og SDK'er. Dette er litt problematisk for Adminweb, der noen av artefaktene ikke lenger er tilgjengelig i Maven Central. Kopier er nå iAssets
med datostempel 2019 April 12:caneo-android-v2.zip
– Memas app, javamemas-web.zip
– Adminweb, groovy.memas-stringutil.zip
– lite script, groovy
- Hva finnes av systemdokumentasjon?
Lite, men det som finnes er nå iDocumentation/
:mylife_technology_2013.ppt
memas_tellu_2013.docx
protocol.txt
- Finnes det ssh-tilgang til serveren for Adminweb (Rackspace)?
Ja. Det er to rackspace servere. Da google bestemte seg for å blokkere email fra hovedserveren har email-serveren blitt flyttet til en annen server. Rackspace serveren kjører en Glassfish container med web'en samt en postgresdatabase. - Er det mulig å få laget en SQL-dump av PostgreSQL-databasen?
Du kan tunnellere pgadmin til postgres-databasen og eksportere databasen. - Hvem styrer/kontrollerer DNS for https://adminweb.no/web/ (jeg ser at Domeneshop er registrar).
Dette administreres på domeneshop-kontoen til mylifeproducts (Riita). - Hva slags protokoll/bibliotek benyttes for kommunikasjonen mellom Memas og AdminWeb?
Memas kaller periodisk web'en med et tidsstempel for sin konfigurasjon over https. Dersom det er nyere tidsstempel for konfigurasjonen på web'en vil Memas laste ned ny konfigurasjon.
2019-April-03 [LB]:
caneo-android-v2
er Android-clienten.memas-web
er Adminweb.memas-stringutil
er et lite script vi har brukt til å konvertere tabeller med tekst-strenger til Android-ressurser (for appen).
2019-April-08 [LB]:
Jeg har gått gjennom Memas-appen og laget en oversikt over kommunikasjon mellom app og server, vedlagt [protocol.txt
].
Roadmap to the source code
There are three main subdirectories:
androidlib
: generic libraries?caneoAndroid
: the applicationcaneoLib
: Memas specific libraries?-
The following subdirectories may exist:
…/src/main/assets/photo
: stock photos (only belowcaneoAndroid
).…/src/main/java/no/tellu/caneo/
: program code.…/src/main/res/
: resources (strings, images and sounds).
The file caneoAndroid/src/main/AndroidManifest.xml
contains basic settings for the app:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="no.tellu.caneo.memash4d" android:versionCode="62" android:versionName="2.52 H4D">
In caneoAndroid/src/main/java/no/tellu/caneo/
, there are 8 subdirectories:
media/
memash4d/
ServerProtocol.java
: Static methods for the Caneo server protocol.
messaging/
music/
photo/
system/
CaneoAccount.java
: Manages connection to server, getting account information.CaneoSettings.java
: Defines the settings for for the configuration GUI. Also the settings themselves. Defines the URL of the server.CaneoSystem.java
: ? Handles connevtion status and status messages ?
video/
web/
English strings used by the client is
in caneoAndroid/src/main/res/values/strings.xml
.
Translation to other languages are in parallell subdirectories.
Client configuration
To configure the client, activate demonstration mode and click “Menu” in the top right corner.
- Status: Show app status (Module states. System status. Device.) Memas ver. is 2.52 H4D.
- Settings: Change settings (see below for details).
- Disconnect for account: Remove account settings, return to state before.
- Exit: Close app and exit.
Settings
- Server settings:
- Server address: https://adminweb.no/web/
- Connection interval: Automatic (= 1 min.)
- Home4Dem Home ID: (empty)
- Home4Dem API key: (empty)
- System settings:
- Auto-start, etc. (checkboxes)
- Return to initial view: 10 min.
- Pictures:
- Synchronisation interval: Automatic
- Web browser:
- Web page scale (%): 120
- Demo settings:
- Colour theme: white
- Demo features (checkboxes)
- Options (buttons):
- Back (saves changes)
- Restore defaults
- Loggers
- Log files
Communication protocol
- Server address: https://adminweb.no/web/
- Connection interval: Automatic (= 1 min.)
- Home4Dem Home ID: (empty)
- Home4Dem API key: (empty)
- Auto-start, etc. (checkboxes)
- Return to initial view: 10 min.
- Synchronisation interval: Automatic
- Web page scale (%): 120
- Colour theme: white
- Demo features (checkboxes)
- Back (saves changes)
- Restore defaults
- Loggers
- Log files
Communication between Memas (client) and Adminweb (server) is based upon
based on HTTP GET
request with retrieves a JSON body.
Authentication is with a token as HTTP header.
The client is configured with the address of the server, indicated
with <BASEURL>
in the following.
The default value is set in line 80 in CaneoSettings.java
(caneoAndroid):
cc.addItem(CON_URL, "https://adminweb.no/web/", 0, new UrlValidator());
In Java, it is called “baseUrl
”.
The default value is used when the client is installed forst time, and when you navigate to
.Connecting an account to the client:
The protocol is illustrated with example JSON.
A code displayed in the adminweb UI is entered on the client, which exchanges it for a token.
Request:
GET <BASEURL>/client/auth?token=<CODE>
The server returns JSON:
{ "token":"someSecretToken", "primaryUser":{ "secondaryUsers":[ {"firstName":"Hans", "lastName":"Hansen"} ] } }
The token is required as a header field for all subsequent HTTP requests from the client. Header field name “token”.
Plan
- Change Memas to query an endpoint at
adminweb.roztr.com
that just produces static JSON. - Produce dynamic JSON.
- Import legacy database to adminweb.
Log of source code changes
Line 5 in AndroidManifest.xml
(caneoAndroid) [2020-08-11]:
android:versionName="3.0.0-alfa1"
Line 80 in CaneoSettings.java
(caneoAndroid) [2020-08-11]:
cc.addItem(CON_URL, "http://adminweb.roztr.com/web/", 0, new UrlValidator());
Troubleshooting
Below is a record of problems encountered and how they were solved:
Error: Please select Android SDK
SO.com answer by Hasib Akter.
Final word
Last update: 2019-04-07 [gh].