Mastering Offline Functionality

The content in this blog is over six months old, and the comments are closed. For the most recent product updates and discussions, you're encouraged to explore newer posts from Instructure's Product Managers.

JuditTarnoy
Instructure
Instructure
3
2873

Canvas.png

Mastering Offline Functionality: Overcoming Connectivity Challenges in Mobile Apps 


Hi Canvas Mobile Community,

Let me share with you what we just recently was working on and what we have considered. In today's world, maintaining constant connectivity isn't assured always. For mo bile applications offering offline functionality brings advantages, it also introduces complexities that developers must address. We are happy to share what we have considered and what we have achieved with Canvas offline mode support. 

Challenges:

  • Data storage and management: Balancing offline accessibility with mobile device storage constraints requires careful consideration. Determining essential offline data and implementing efficient storage methods without compromising performance is essential.
  • Network availability: Tracking the network and informing the user about the change, detecting when the device goes offline or comes back online without overwhelming extra background calls.  
  • User experience: Providing a smooth and intuitive user experience in offline scenarios presents difficulties. 
  • Synchronization: Ensuring seamless integration between online and offline data updates can be challenging. 
  • Battery consumption: Offline features may increase data processing demands, leading to higher battery consumption. It requires code optimization and selectively activating offline features are crucial for responsible power management.

Solution we have chosen:

  • Local data storage: Utilizing lightweight databases enables efficient storage of critical data directly on the device.
  • Network info message: Application indicates if the device goals offline or comes back with optimized service.
  • Smart caching: Implemented background synchronization to update offline data, when the device is online without user intervention. With Auto Content Sync settings frequency is customizable. App also provides the option to sync only in the Wifi network. This helps keep the offline data up-to-date without requiring user intervention. Strategically caching frequently accessed data minimizes reliance on online retrieval, enhancing performance and user experience.
  • Usability-first design: Developing the application with offline functionality as a primary consideration simplifies data management and ensures consistency.
  • Limiting functionalities: Offering restricted functionalities in offline mode, such as accessing cached module content, helps maintain usability even without an internet connection.

How does it work in a nutshell? 

  • Offline feature is currently behind a feature flag. If an institution (admin) turns it on, then students will have the option to download certain parts of courses and access them through the Canvas Student app. No additional Canvas Student app refresh is needed. Further details see in the release notes.

Principles

  • The same data is downloaded as for online mode, the main difference is that it can now be accessed without internet connection.
  • Only the Canvas app will have access to the data. All downloaded data is stored within the app's secure externally unreachable storage space as in online mode. Both iOS and Android platforms itselves provide safety features to avoid invalid accesses, only the dedicated application can access the stored data. During offline synchronization the application uses the same secure, encrypted storage as is in use now. There is no additional type of storage, the apps don’t write this data into a file or to an external database. 
  • After logout the downloaded data will be not accessible.  With the use of switch/change user operation the downloaded data remains accessible via Canvas app for the same user. By changing between users, all the users will be only able to see their own downloaded data.

 

👉 F.A.Q.

What type of synchronization are available?

  • Automatic sync: App offers automated synchronization available for users in the settings option where frequency and only sync while Wi-Fi options are available. This setting is the default.
  • Manual sync: This option is always available if the user wants to update the downloaded content. The user is able to do manual sync ad-hoc even if the Auto-Sync has been set in the Settings, but if the Manual Sync has been set, then the Auto-Sync won’t happen periodically. 

How can students see this feature?

  • No manual refresh or app restart is needed to apply the offline mode. It is accessible from the dashboard if the feature is enabled on the institute level. When the device has gone offline, the app will automatically change to offline mode. Also, the change from offline to online mode is automatic as well, just may need a few (2-4) seconds.

What happens after the data is no longer needed?

  • After logout the Canvas Student app deletes the user-dependent data from the device. 
  • Switching /  Changing users but not logging out: no deletion.
  • When the course is deselected from offline mode, it will no longer be stored on the device.

What happens if the course content has been updated? 

  • If the course changed and there is old content, it will be updated on the next synchronization. 
  • The content is downloaded when manual or automatic sync is happening. Files are only downloaded again if they changed.

How much data is downloaded?

  • This is depending on the course content. When selecting the course an indicator shows the  estimated size of the content. For a simple course with the canvas content it can be only a few MBbs, if large files and lots of pictures are involved it can go up. This really depends on course content creators. The larger the course, the longer it may take to sync.
  • With the Manage offline content capability users can customize it and only download those parts of the course that learners want to see offline.

How course access is handled?

  • Course access is validated every time when a user is online and application is started. If the course is no longer accessible (e.g.: because it is concluded, the term is closed and set not to be accessible, user is not active anymore to access it, etc.) by the user, it will be evaluated on the next online access. 
  • If the course access change happens while the user is offline, the user will have access to the particular course until the app goes back online. As the application goes back to online the app recognises the course access change, the course content will be not accessible anymore, Course will be not displayed within the course list, even if the same device goes back offline again. Once the next application sync starts all expired / not eligible the content will be deleted permanently, storage space will be freed up.

What happens to offline content when a student's tokens are removed from Canvas?

  • The next time the user is online, they will be logged out and all the synced content will be deleted. 

What is the duration of access to offline content for a student? How long would they have access to the offline content?

  • Content is accessible until the student/user has the right to access the course via the web. If the course is not listed in the course list, content is not accessible, even if the device switches to offline mode. 
  • Offline content will be deleted if the user logs out. 

Will users be able to sync concluded courses? Only active or if concluded will also sync?

  • Yes, if the course is set to be available after the closure, conclusion as well, which is dependent on the course settings. If it is available to the user, it will be able to be synced as well.

Can you clarify if the quiz list/details includes quiz questions?

  • The list and the quiz details are synced, the questions are not.

Are all files available or only files that are in modules?  

  • Files made available under the Files tab and files embedded in other course content.  

How does the application handle multiple users on the same device? 

  • The offline access feature allows multiple users to download content on the same device, facilitating access to educational materials on shared devices. 

How does the app handle the content with prerequisites or release after a certain date? 

  • Date & time prerequisites will be handled offline as well, but more complex prerequisites (e.g. finish module, submit assignment etc.) are not evaluated currently on the device.  

Do we have plans in the future to support external tools offline?

  • Not at the moment. LTI tools are usually developed by 3rd party vendors, and currently not supporting offline access.

Do we have to worry about copyright issues or digital rights?  

  • The same data is downloaded as for online mode, and stored in the same place, so from a legal standpoint there is no difference, thus there is no basis for any concerns. No, the data is only available from the Student apps, no other application has access to it. The Canvas license agreements apply.

What are the supported features today?

Supported features in the latest release:

  • Announcements (Reply is disabled)
  • Assignment (Assignment list, Assignment details, no active Submission)
  • Discussions (Reply is disabled) 
  • Files
  • Grades (list, details, no active Submit / Resubmit assignment)
  • Modules
  • Pages
  • People
  • Syllabus
  • Quizzes (quiz list, quiz details, no active Take Quiz)
  • BigBlueButton

Not supported yet:

  • Outcomes
  • Collaborations
  • Courses under Canvas for Elementary sub-account
  • Youtube or other external links embedded to the course content will be not accessible offline
  • Studio video playback with captions support 

Let me know if you still have questions, I'm happy to help.

Cheers, 

Judit 

The content in this blog is over six months old, and the comments are closed. For the most recent product updates and discussions, you're encouraged to explore newer posts from Instructure's Product Managers.

3 Comments
RobDitto
Community Champion

Hello @JuditTarnoy, we're really excited about the possibility to offer mobile offline functionality to students at our institution. I have questions related to that possibility:

  1. Do you think that mobile offline support for Discussions/Announcements Redesign will arrive by the July 20, 2024, enforcement date for that option?

  2. Regarding your guidance on which Files will be available via mobile offline support ("Files made available under the Files tab and files embedded in other course content"):
    1. Would the files made available be only those which are not restricted?
    2. Will "Only available with link?" folders within Files be excluded from offline content?
    3. Will embedded images inside "Only available with link?" folders be included in offline content?
    4. A different feature of Canvas, Export Course Content for students, does include embedded images from Classic Quizzes content when the images are stored in the Uploaded Media folder under Files; we've been advised by Canvas Support that there are no plans to change that. Would mobile offline support be subject to the same issue?
Charles_Barbour
Community Participant

Will the app honor availability dates?

For example: If an instructor makes a file available only until the day of the exam, will the mobile app no longer let the student view it on the day of the exam?

MosiahZavala
Community Member

Hi!

I would like to know if it's possible to upload HTML files with images and videos and use them offline through the Canvas Student app. I recently uploaded some HTML files to the files repository, but when we synchronize the offline content, we can't view the images and videos. Is there some adjustment we need to make to reproduce them?