Quantcast
Channel: Moodle for mobile
Viewing all articles
Browse latest Browse all 8344

Re: Using a html file project to access offline content from the app

$
0
0

by Sourabh Maheshwari.  

Thanks Dani for the prompt response.

The pasting is required as the total content is around 1.5 gb and the internet is not that good everywhere here so sending a cd is the best way. Otherwise what you suggested would be best to do.

I have tried to cover the functioning in this screencast:


This is about intents: https://developer.chrome.com/multidevice/android/intents

Data has intent and content path is the JavaScript for making the page dynamic and open our video which are encrypted as .arth files in a specific video player app. Hereis the code:

function GetAssetLinksForAndroid()

{

$('a').each(function () {

                if ($(this).data('hasintent') == "1") {

                    var url1 = "intent://";

                    var absolutePath = new RegExp('[^?]+/').exec(location.href);

var assetPos = absolutePath.toString().toLowerCase().indexOf("asset");

if(assetPos != -1)

{

absolutePath = absolutePath.toString().substring(0, assetPos);

}

                    var contentPath = "asset/content/" + $(this).data('contentpath')

                    var url2 = "#Intent;action=android.intent.action.VIEW;package=com.xyx

Player;scheme=file;type=video/*;end";

                    var fullUrl = url1 + absolutePath + contentPath + url2; 

                    $(this).attr("href", fullUrl);

                }

            });

}


Thanks again

Rgds,

Sourabh


Openhtml app and android browser support intents.


Viewing all articles
Browse latest Browse all 8344

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>