How to save video and send when there's internet connection


#1

I have an app that users can record a video and it is sent to a server. I want to make it offline first, sort of like whatsapp, so that even when there is no internet connection the video is saved somewhere and the user believes it has been sent to the server. But on internet connection, the app proceeds to send the data to the server. This is for a healthcare app and would greatly improve the user experience. I am wondering if there is a way to achieve this in an expo undetached app.


#2

Hey @charlesoma,

I don’t think there is a way to elegantly handle this at the moment because I believe the ideal experience you are alluding to would require background task support. You might be able to leverage the FileSystem API to store it locally and then fetch it and upload it when the device has a network connection again. Without background support however, you would have to handle persisting the logic remotely so it knows what to upload and where to upload it when a connection is found.

Cheers,

Adam


#3

Thank you for your response @adamjnav. Based on your suggestion, can you give me a direction on how to get it done? If I can do it the way you suggested until expo has background task support I’ll be glad


#4

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.