In app Browser

In app Browser

by Alex Cooper -
Number of replies: 7

Hi, 

Is in app browser embedded in mm2?

If yes, how can i enable it to  let the users just enjoy accessing the activities and content links through mm2 and not mobile default OS browser?

If not,  is it possible to embed in app browser into mm2? 



Average of ratings: -
In reply to Alex Cooper

Re: In app Browser

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hello Ghader,

the Moodle Mobile app has InAppBrowser enabled and it's used in some places like opening external links inside a SCORM. Unfortunately, there's no setting right now to allow opening external links in InAppBrowser instead of a regular browser.

Why do you want to do this? The users won't leave the app, but you need to take into account that InAppBrowser is more limited than a regular browser and some things might not work as expected (like popups).

Kind regards,

Dani

 

In reply to Dani Palou

Re: In app Browser

by Alex Cooper -

hi Dear Daniel,

You got the point what i did mean and offered a good suggestion. Thanks a million for your suggestion. 

However, i tried to download the scorm files via mm2 to use it offline, but there was error each time i tried.

I'm able to download the scorm files when mm2 is emulated in browser (chromium) or with official mm2 app in android devices and works nice, but not successful in custom mm2 app created by following the the instructions mentioned in 

https://docs.google.com/presentation/d/1HX5h7zwtay4amaY3qyLuCLfI7kQCiD9IoWuDH-lSa_0/edit#slide=id.gb58f8c5e5_0_70

First i followed the steps for setting up my pc.

then modified the config files , icons and platforms. uploaded the www folder to my new created repository. built the app by phonegap, all things are ok but the app faces error when i want to download scorm files.

npm install


mm2 in android device (scorm was not downloaded


scorm files were downloaded in browser emulator

In reply to Alex Cooper

Re: In app Browser

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Ghader,

please make sure you have installed all the cordova plugins in your project if you're generating the app from your computer, without Phonegap Build. My guess is that you lack the cordova-plugin-zip plugin.

You can see the list of plugins you have installed with the following command:

ionic plugin list

You can see the list of required plugins in the package.json file:

https://github.com/moodlehq/moodlemobile2/blob/master/package.json#L32

Running ionic state restore should automatically install them.

Please let me know if this fixes the problem for you.

Kind regards,

Dani

In reply to Dani Palou

Re: In app Browser

by Alex Cooper -

Hi dear Daniel,


I checked the plugin you mentioned, but it was installed. However, i ran ionic state restore to the plugins, but it didn't  solve the problem.

I faced with some problems  in my laptop, therefore i reinstalled a win7  for it.

Now i can't even run npm install in the mm2 directory as it encounters with some errors. It seems I had some needed programs in my previous windows installed that now the new windows doesn't. would you let me know if you have any idea about this!

npm install

Moreover, I'm really sick of and confused with practicing for weeks to justify a simple mm2 app. I know may be i go wrong ways to do it, so I'll be glad to help me in it. The steps I take to justify are based on the instructions in 

  1. https://docs.google.com/presentation/d/1HX5h7zwtay4amaY3qyLuCLfI7kQCiD9IoWuDH-lSa_0/edit#slide=id.gb58f8c5e5_0_70  Phonegap

and 

     2. https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2


First i try to set up my environment. Therefore, i follow instruction number 2 up to ionic serve --browser chromium. When there was no error that the app worked in browser and downloaded scorm perfectly. Then, to build the app I coped the www folder in another directory and followed instruction 1 to build the app through online phonegap app builder. The icons were changed but the app was not successfully built.

Now the question is this, am i in the right way or i take the steps wrong?

Are the instructions separated for different app building ways or both of them works together.


Best regards, Azarmi




In reply to Alex Cooper

Re: In app Browser

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Azarmi,

we always develop using Unix based systems (Mac OS X, Ubuntu) so the instructions might not be accurate for Windows environment. Looking at the errors in your console, it seems you need to have python installed and run the commands as administrator.

About the Phonegap Build error, can you please tell us which platform does it affect and the error it shows?

Kind regards,

Dani

In reply to Dani Palou

Re: In app Browser

by Alex Cooper -

Hi dear Palou,

Is it possible to hide or disable the icon in course page (navbar) that allows users to open the course in browser?

 

If it's possible I'll be glad to know how to do it. I want all things happen in the MM2 app since your efforts have made it possible.

regards,

In reply to Alex Cooper

Re: In app Browser

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Alex,

right now it isn't possible to hide them. That button is important since the app is still limited and a lot of features aren't supported, while in web they are.

We'll take a look and we might add a CSS class to each button so you can hide them using a remote theme.

Cheers,

Dani