How to use Enketo off-line on Android phones?

119 views
Skip to first unread message

QLands Software

unread,
Dec 7, 2020, 10:48:24 AM12/7/20
to enketo-users
Hello,

I have an Enketo 2.X running and I am able to use a WebForm from my Android browser but if I am offline and try to go to the link the browser indicates No Internet. I tried to download the form locally but when I open it offline I cannot type anything or select anything, its like read only.

I saw the blog https://enketo.org/faq/#offline-use  about an icon in the top left of the page, but such icon does not appear.

Is there any documentation on how to achieve offline mode?

Thanks.

Martijn van de Rijdt

unread,
Dec 7, 2020, 11:07:38 AM12/7/20
to enketo...@googlegroups.com
Hi QLands,

Enketo offers different views of the same webform some online-only and some offline-capable. It's up to the data/form server that integrates with Enketo to decide which of these they expose to users (and how to make this clear to users). So e.g. KoBoToolbox.org and Ona.io have used these since the beginning, but e.g ODK Central has not yet done this (though to be added soon maybe?). ODK Aggregate can be configured to use either online-only or offline-capable views.

If you're using ODK Aggregate use /api/v1 instead of /api/v2 in the Enketo settings in Aggregate.

I hope this helps,

Cheers,
Martijn

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/enketo-users/32a2c25d-c4b5-4091-9628-feec15566716n%40googlegroups.com.


--
Pushing data since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

QLands Software

unread,
Dec 10, 2020, 10:45:10 AM12/10/20
to enketo-users
Hi Martin,

Thank you for your reply. 

I am integrating Enketo with a FormShare server (https://github.com/qlands/FormShare). I already developed the basic integration but not the off-line. Do you have any documentation on how to integrate Enketo for off-line usage? I can see offlineWebform controller in the technical docs and a message in the code "Offline functionality has not been enabled for this application" but I really don't know the routes for the offline access or how to make a form off-line capable.

Many thanks for any help.

Martijn van de Rijdt

unread,
Dec 10, 2020, 12:01:06 PM12/10/20
to enketo...@googlegroups.com
Absolutely! Here are all the different webform views you could expose: https://apidocs.enketo.org/v2

For offline-capable multi-submission views use: https://apidocs.enketo.org/v2#/post-survey-offline

Good luck!

QLands Software

unread,
Dec 11, 2020, 4:35:11 PM12/11/20
to enketo-users
Excellent. We updated our integration and now the off-line mode works fine.

Many thanks.

Saad Omer

unread,
Mar 22, 2021, 6:29:19 PM3/22/21
to enketo-users
Hi Martin,

I have an ODK server running and integrated to Enketo standalone installation. The forms work fine from web browsers (enketo pulls form from ODK, and submissions reach to ODK aggregate successfully), however I do not see the OFFLINE WORKING icon on the top left in the browser. Is there any special settings I have to do in ODK Aggregate (or the form coding) to enable offline storage? I am using latest aggregate version (v2.0.5) and using /api/v1 in ODK aggregate enketo configration as well. Can you suggest what step is missing?

Many thanks,
Saad

Martijn van de Rijdt

unread,
Mar 23, 2021, 11:29:17 AM3/23/21
to enketo...@googlegroups.com
Hi Saad,

Are you running a recent version of Enketo Express? If not, the issue is described here: https://blog.enketo.org/Enketo-Express-mar-2020-update/.

To rule out any issues with the browser you can test this form: https://enke.to/x/widgets

Saad Omer

unread,
Mar 23, 2021, 2:21:51 PM3/23/21
to enketo-users
Hi Martin,

Yes, I am running the latest enketo express version (version: 2.6.3-1-g947dbce), installed fresh yesterday.

All the browsers which I used to check my own installation, are working fine with your given URL; meaning that I can see the OFFLINE STORE orange icon at top-left. But still unable to see it on my installation. Can you have a look at http://13.244.220.67:8005/x/xVkyUZDm please? Thanks!

The few differences I can highlight, are that I am not using SSL as well as domain name (for now, only. Will assign later). Is either of these things related to the error?

Thanks,
Saad 

Saad Omer

unread,
Mar 23, 2021, 2:34:43 PM3/23/21
to enketo-users
I just checked details. I see 2 errors in developer console:

>enketo-webform-bundle.min.js:104 Service workers not supported on this http URL (insecure)
>locales/build/so/translation-combined.json:1 Failed to load resource: the server responded with a status of 404 (Not Found)

I guess the first one is causing the issue for being non-SSL, is it?

Martijn van de Rijdt

unread,
Mar 23, 2021, 3:27:15 PM3/23/21
to enketo-users
Hi Saad,

Yes, the issue is with SSL. Offline capability is using Service Workers: https://developers.google.com/web/fundamentals/primers/service-workers#you_need_https

You can however, test your site's offline-capability on http://localhost as well.

The 404 is from a missing Somali translation and I think this can be ignored. Somali would be very welcome though! => https://www.transifex.com/enketo/enketo-express/

Saad Omer

unread,
Apr 26, 2021, 6:23:08 AM4/26/21
to enketo-users
Hi Martijn,

So I installed the SSL certificate for the enketo installation. My enketo domain on the main page shows https connection. However, the form page on port 8005 is still on http:// connection, and does not work if I enter https:// (meaning, still no offine working capability). Can you give an idea about where to make this config to make it work?

Thanks,
Saad

Martijn van de Rijdt

unread,
Apr 26, 2021, 11:57:59 AM4/26/21
to enketo...@googlegroups.com
Hi Saad,

This is a generic web server (NGINX or Apache) technique that is not related to Enketo in particular. However, please find an example here (using NGINX): https://blog.enketo.org/install-enketo-production-ubuntu/.

Good luck,
Martijn

Reply all
Reply to author
Forward
0 new messages