wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
257 stars 57 forks source link

Offline support for Embeds blocks #3908

Open hypest opened 3 years ago

hypest commented 3 years ago

This is an umbrella ticket for the various tasks we want to capture for a better offline support around the embeds blocks.

jd-alexander commented 3 years ago

Thanks for creating this issue @hypest While working on https://github.com/wordpress-mobile/gutenberg-mobile/pull/3921 I ran into related offline support cases. Should the functionality here be prioritized and implemented soon? Currently, I don't see any mechanisms within the editor for monitoring connectivity changes, so I am thinking that connectivity observers would have to be implemented in WP Android and WP iOS, and updates get passed over the bridge.

fluiddot commented 3 years ago

For iOS I saw that we use the method ReachabilityUtils.isInternetReachable() in different places to determine if the device is offline. Probably we could expose a function in the bridge to check if internet is reachable on both platforms.

jd-alexander commented 3 years ago

Thanks for checking @fluiddot similarly on Android, NetworkUtils.isNetworkAvailable(WordPress.getContext()) is utilized across the codebase to check if the device is offline or not.