Implement scorm-api-wrapper for scorm packages in Android native App

66 views
Skip to first unread message

laxmikant joshi

unread,
Jan 10, 2024, 12:03:04 PMJan 10
to eLearning Technology and Development
Hi,

I am new in android. I have to implement offline scorm functionality for my android app. I have scorm files of version 1.2 and 2004 all editions.  i.e Each of these files contains index.html file and I have added the SCORM_API_wrapper.js inside this html file and add all the function inside script tag but when run it on browser it will gives me the below error.
Error: Course could not connect with the LMS.

I have read content from Offline Player Extension and Rustici Engine documentation.

Can someone provide me tutorials or demo project. It will be helpful for me and I will be thankful from him/her.

Thanks & Regards
Laxmi Kant

Philip Hutchison

unread,
Jan 10, 2024, 12:44:15 PMJan 10
to elearning-technolo...@googlegroups.com
Hi Laxmi

SCORM requires an LMS to provide an API, which the course detects, connects to, then uses for getting/setting data. The SCORM API wrapper is a utility that simplifies working with the API. It does not provide the API.

Since your project is offline, there is no LMS, which means there is no API for the course to connect to. You'll need to provide the SCORM API yourself. A service like Rustici's Offline Player Extension would work, but it's not free, you'd need to sign up and pay for it. I am unaware of any free solutions that are capable of providing a SCORM API in an offline environment. You could make your own by modifying something like Claude Ostyn's test wrapper. See https://lmschef.com/3-ways-to-test-scorm-package/#3 and https://github.com/frumbert/scorm_debug. I've built something similar for my own use, so I know it's possible. You'll also need to figure out how you want to store data and develop your own custom localstorage/DB backend.

Good luck
Philip

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elearning-technology-and-development/2564400b-d0a1-4013-b768-76d41e3fb27en%40googlegroups.com.

laxmikant joshi

unread,
Jan 11, 2024, 3:58:07 AMJan 11
to eLearning Technology and Development
Hi Philip

Thank you for replying me.

So sorry I forgot to write about the LMS. 

I want to say on this point "Since your project is offline, there is no LMS, which means there is no API for the course to connect to. You'll need to provide the SCORM API yourself."
My Android app is connected to the LMS and the scorm package is the part of the course i.e running on LMS. I want to play scorm offline in device when there is no internet. Please help me how to connect scorm package with the LMS and how to provide SCROM API from myself. 

There are some point that I need your help
  • If my android device is offline what process I have to follow for playing scorm offline?
  • I have provided the scorm API object in attached file. Please check and please let me know the correct way of providing correct scorm API
  • How to sync the data with the server when internet arrives in the device?
I am feeling thankful and waiting for your response. 

Thanks & Regards
Laxmi Kant


index.html

Philip Hutchison

unread,
Jan 11, 2024, 3:32:09 PMJan 11
to elearning-technolo...@googlegroups.com
To send data from an offline course to the LMS, you'd need to code a custom service using the LMS's API or by writing directly to their DB if you have access. Unfortunately this is a very complex scenario, and exactly why Rustici built their Offline Player service, which I believe utilizes their SCORM Cloud backend. This is also one of the issues xAPI was designed to solve, as it accepts data from any authenticated endpoint.

Sorry I don't have a solution for you! Good luck





Terry

unread,
Jan 15, 2024, 3:36:57 AMJan 15
to elearning-technolo...@googlegroups.com
Perhaps  you need to implement an api wrapper in your android client to store/retrieve the  cmi data. I'm not familiar with android , it's something like the following flow: 
 courseware call scorm.submit   -> wapper scorm.submit -> android function submit (save data to sqlite or ...)



--
Regards,
Terry

laxmikant joshi

unread,
Jan 17, 2024, 6:18:21 AMJan 17
to eLearning Technology and Development
Hi Terry,

Thank you for replying me.

Can you help me with JavaScript code? How to connect scorm packages with the LMS? which type of data I have to send in scorm.submit function?

Thanks & Regards
Laxmi Kant

Reply all
Reply to author
Forward
0 new messages