Tangerine-Community / Tangerine

Digitize your offline data collection. Create your Forms online with Tangerine Editor, conduct them offline with the Tangerine Android App. All results you collect can be exported as a CSV file, easy for processing in a spreadsheet. Tangerine has been used in over 1 million assessments and surveys in over 60 countries and in 100 languages.
http://www.tangerinecentral.org/
GNU General Public License v3.0
51 stars 29 forks source link

Install of second PWA in same browser causes issues with data uploads #3747

Open esurface opened 4 days ago

esurface commented 4 days ago

Installing two PWAs from the same Tangerine instance in the same browser causes data upload issues. The data from the second group will end up in the database on the server for the first group. This issue is in the documentation, but it is difficult for system administrators to enforce on users.

Ideas:

  1. Have a warning message on the PWA "Release offline app" on the server
  2. On the tablet, detect an already installed PWA (if possible) and either prevent the install or provide a warning to the user
  3. Figure out a way to allow two installs in the same browser. This might be achievable using the "packageName" attribute in the appConfig file (org.rti.tangerine.group1). We should also start automatically setting the packageName when a group is created.
  4. This may also be addressed by updating how the database in the browser storage is used.