Skip to main content
Resources · Guides

Play SCORM Inside Your Own App

How a mobile app can play SCORM packages with the Allure Connect hosted player: launch, resume and results. Plus what we are building for mobile apps.

Allure Connect team· Published · Updated · 5 min read

An iOS or Android app cannot run a SCORM package by itself. The package is a set of web pages that expects a player to answer its SCORM calls and store the results. This guide shows how to use the Allure Connect hosted player for that today, and what we are building for apps.

What Your App Needs

Your app needs a web view, and your server needs a Connect API key. The hosted player runs inside the web view and handles the SCORM runtime. Your app keeps its own sign-in, course list and navigation.

Upload the course to Connect as a SCORM 1.2 or SCORM 2004 ZIP. Test each course on the devices you support before release.

Step 1: Launch from Your Server

Keep the API key on your server, because anyone can read a key that ships inside an app. When a learner opens a course, the app asks your server, and your server asks Connect:

code
curl -X POST https://app.allureconnect.com/api/v1/packages/{packageId}/launch \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "learner-123",
    "runtime_protocol": "exclusive_v1"
  }'

The answer includes what the app needs:

code
{
  "package_id": "pkg_example_scorm_course",
  "session_id": "550e8400-e29b-41d4-a716-446655440000",
  "launch_url": "https://app.allureconnect.com/player/550e8400-e29b-41d4-a716-446655440000?token=...",
  "learner_id": "learner-123",
  "expires_in_seconds": 14400
}

runtime_protocol: "exclusive_v1" is optional. It gives the session one recording player at a time: if the same session is opened to record somewhere else, the new player takes over and the replaced player can no longer write to it. A player opened for review does not take over.

Step 2: Open the Launch URL in a Web View

Load the full launch_url, including its token, in your platform's web view. Do not load the course's HTML files directly; open the player page. Treat the URL as a credential: do not log it, share it or store it for later.

The hosted player needs a connection. Connect has no offline playback for apps today.

Step 3: Resume the Same Session

Store the session_id for that learner and that course. When the same learner opens the same course again, send it with the next launch:

code
curl -X POST https://app.allureconnect.com/api/v1/packages/{packageId}/launch \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "learner-123",
    "session_id": "550e8400-e29b-41d4-a716-446655440000",
    "runtime_protocol": "exclusive_v1"
  }'

For a course that is not completed or passed, Connect restores the saved progress and returns a fresh launch_url. Without session_id, the launch creates a new session. When the course is already completed or passed, its relaunch setting decides what happens, unless your launch asks for a new attempt. Never send one learner's session_id for another learner or another course.

Step 4: Get the Result

Your server can read the session at any time with its API key:

code
curl https://app.allureconnect.com/api/v1/sessions/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer <api_key>"

To be told instead of asking, register a webhook. Connect sends signed events such as session.completed. There is no progress event, so read the session when you need progress partway through a course.

Do not record a completion because the web view closed. Use the session or the webhook as the record.

The Session API Behind the Player

The player page saves through documented session operations, authorized by the launch token:

OperationRequestWhat it does
ReadGET /api/v1/sessions/{sessionId}Returns status, score, resume data, attempt and version
ClaimPOST /api/v1/sessions/{sessionId}Claims an exclusive_v1 session for one recording player. A review player does not replace it
SavePUT /api/v1/sessions/{sessionId}Saves progress. A stale version, a replaced player or a replaced attempt in the request gets 409
RenewPOST /api/v1/sessions/{sessionId}/refresh-tokenReturns a fresh token for the same session. Call it before the current one expires

The API reference has the exact fields. We recommend the hosted player for apps today. A player of your own has to get every one of these rules right, and a mistake changes a learner's record.

What We Are Building for Mobile Apps

We are building the following now. They are not yet released, and their names and formats may change:

  • Allure Pocket: a mobile player kit that packages the hosted player's tracking code for an app to include.
  • Course files for phones: a versioned file list with sizes and fingerprints.
  • Open in one call: launch and claim in a single request.
  • Launch-ahead: prepare a course before Start, without counting the learner as active.
  • Offline saving: progress kept on the phone and sent in order later, with rules for a course opened on another device.
  • Guide and conformance tests: tests an app can run against its own player.

The Allure Pocket page shows the status of each one.

Getting Started

Create a free sandbox, upload a package and open its launch URL in a test build of your app. The first session guide covers the launch request in detail.

Your next step

Put the infrastructure to work.

Explore with a free sandbox, or discuss the delivery paths and platform requirements you need.