FirefoxOS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FirefoxOS

laurent laffont
Hi,

I received my FirefoxOS phone two weeks ago. I would like to make amber applications work offline (online OK) but I struggle to make it load. Anyone tried it / have a working template ?

Laurent

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: FirefoxOS

Manfred Kröhnert
Hi Laurent,

what have you tried so far in order to achieve offline capabilities?
Which Amber version did you use and what problems did you encounter?

With the upcoming 0.13.0 release of Amber it should be easier to build
offline web applications since the whole program can be made available as a single JS file.

Here are also some additional links which might help (if you don't know them already)


Best,
Manfred


On Mon, Oct 6, 2014 at 7:30 PM, Laurent <[hidden email]> wrote:
Hi,

I received my FirefoxOS phone two weeks ago. I would like to make amber applications work offline (online OK) but I struggle to make it load. Anyone tried it / have a working template ?

Laurent

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: FirefoxOS

laurent laffont
Hi,

thanks for the reply.  I use amber 0.12.6. The problem I have is that amber.initialize() seems to never return. Here's the snippet:

require(['amber/devel'], function (amber) {
message.textContent = translate('loading_amber');
amber.initialize();
message.textContent = translate('amber_loaded');


"Loading amber" message is displayed, but not "Amber loaded". It's a little hard to debug remotely from the simulator or device what happens (I'm learning the platform).

I will try with 0.13.0

Regards,

Laurent

Le lun. 6 oct. 2014 à 19:38, Manfred Kröhnert <[hidden email]> a écrit :
Hi Laurent,

what have you tried so far in order to achieve offline capabilities?
Which Amber version did you use and what problems did you encounter?

With the upcoming 0.13.0 release of Amber it should be easier to build
offline web applications since the whole program can be made available as a single JS file.

Here are also some additional links which might help (if you don't know them already)


Best,
Manfred


On Mon, Oct 6, 2014 at 7:30 PM, Laurent <[hidden email]> wrote:
Hi,

I received my FirefoxOS phone two weeks ago. I would like to make amber applications work offline (online OK) but I struggle to make it load. Anyone tried it / have a working template ?

Laurent

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: FirefoxOS

Manfred Kröhnert
Hi Laurent,

did you have any time to look further into offline applications?
Did using Amber 0.13.0 help?

Best,
Manfred


On Mon, Oct 6, 2014 at 9:14 PM, Laurent <[hidden email]> wrote:
Hi,

thanks for the reply.  I use amber 0.12.6. The problem I have is that amber.initialize() seems to never return. Here's the snippet:

require(['amber/devel'], function (amber) {
message.textContent = translate('loading_amber');
amber.initialize();
message.textContent = translate('amber_loaded');


"Loading amber" message is displayed, but not "Amber loaded". It's a little hard to debug remotely from the simulator or device what happens (I'm learning the platform).

I will try with 0.13.0

Regards,

Laurent

Le lun. 6 oct. 2014 à 19:38, Manfred Kröhnert <[hidden email]> a écrit :

Hi Laurent,

what have you tried so far in order to achieve offline capabilities?
Which Amber version did you use and what problems did you encounter?

With the upcoming 0.13.0 release of Amber it should be easier to build
offline web applications since the whole program can be made available as a single JS file.

Here are also some additional links which might help (if you don't know them already)


Best,
Manfred


On Mon, Oct 6, 2014 at 7:30 PM, Laurent <[hidden email]> wrote:
Hi,

I received my FirefoxOS phone two weeks ago. I would like to make amber applications work offline (online OK) but I struggle to make it load. Anyone tried it / have a working template ?

Laurent

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: FirefoxOS

laurent laffont
Hi,

I haven't managed to get much time on this, but last time I tried I've seen that FFOS throws CSP errors. Indeed, on a packaged (offline) application, some features are banned for security reasons. See https://developer.mozilla.org/en-US/Apps/Build/installable_apps_for_Firefox_OS/CSP

 "The function constructor is banned
    You may not use the Function() constructor. Using it will throw a security error."

In amber/support/helpers.js:37, this stops amber initialization:

        var global = new Function('return this')(),

I did not go further as I'm learning FFOS stack but I will try again.

The good news is that it's easy to reproduce this errors using Firefox WebIDE and FFOS simulator (no need for a real device). Just create a FFOS template application, put amber inside by changing the index.html, run on FFOS, pause, then open the inspector/console and evaluate amber initialization code:

require(['app'], function (amber) {
          amber.initialize({
            //used for all new packages in IDE
            'transport.defaultAmdNamespace': "amber-ambertest"
          });
          require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); });
          amber.globals.Ambertest._start();
      });

errors are thrown.


Regards,

Laurent



Le lun. 20 oct. 2014 à 19:55, Manfred Kröhnert <[hidden email]> a écrit :
Hi Laurent,

did you have any time to look further into offline applications?
Did using Amber 0.13.0 help?

Best,
Manfred


On Mon, Oct 6, 2014 at 9:14 PM, Laurent <[hidden email]> wrote:
Hi,

thanks for the reply.  I use amber 0.12.6. The problem I have is that amber.initialize() seems to never return. Here's the snippet:

require(['amber/devel'], function (amber) {
message.textContent = translate('loading_amber');
amber.initialize();
message.textContent = translate('amber_loaded');


"Loading amber" message is displayed, but not "Amber loaded". It's a little hard to debug remotely from the simulator or device what happens (I'm learning the platform).

I will try with 0.13.0

Regards,

Laurent

Le lun. 6 oct. 2014 à 19:38, Manfred Kröhnert <[hidden email]> a écrit :

Hi Laurent,

what have you tried so far in order to achieve offline capabilities?
Which Amber version did you use and what problems did you encounter?

With the upcoming 0.13.0 release of Amber it should be easier to build
offline web applications since the whole program can be made available as a single JS file.

Here are also some additional links which might help (if you don't know them already)


Best,
Manfred


On Mon, Oct 6, 2014 at 7:30 PM, Laurent <[hidden email]> wrote:
Hi,

I received my FirefoxOS phone two weeks ago. I would like to make amber applications work offline (online OK) but I struggle to make it load. Anyone tried it / have a working template ?

Laurent

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.