I have an native Android Moodle based application wherein I have to display the courses which are in SCORM format in the application.
Can someone please help me how to go about this...
The courses are uploaded to my Moodle based website in SCORM format.
The get_course_contents
web service gives me a url pointing to the course files, as specified here
https://github.com/dongsheng/moodle/wiki/WebService:get_course_contents
How do I display these SCORM files in my native Android application?
Do I need to parse the imsmanifest.xml
file and get details of SCORM package and display the HTML5 contents? Or is there another/better way??
**
**
Update:
I have now tried to display the SCORM package contents in a WebView
.
My SCORM package is like:
I have copied this package in the Assets
folder of my POC project.
My WebView
settings are:
settings.setJavaScriptEnabled(true);
settings.setPluginsEnabled(true);
PluginState state = PluginState.ON;
settings.setPluginState(state);
settings.setAllowFileAccess(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setDatabaseEnabled(true);
String databasePath = this.getApplicationContext()
.getDir("database", Context.MODE_PRIVATE).getPath();
settings.setDatabasePath(databasePath);
webview.loadUrl("file:///android_asset/ttttt.html");
And my manifest is:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.html5test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.html5test.MainActivity"
android:hardwareAccelerated="true"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
But I'm not getting required results and cannot view my SWF....
Also, when I copied the SCORM package onto the sdcard of the device and tried to open the html file, it opened up in HTMLViewer app and showed a blank white screen...
Can someone please help me out with this....
Thanks in advance...