SMS APP porting


(M Ducorps) #1

Hi All,

I’m created this topic related to the progress of the porting of the SMS App, this will be also the place where i will request some help time to times when i’m stuck :blush:

For reference BUG is the

https://bugzilla.mozilla.org/show_bug.cgi?id=1302634

Kind regards

Matth


(M Ducorps) #2

Hi All,

So i’m now looking at this SMS app to get an idea on how it’s working and i went to couple of issues

First when i startup the app thourgh Firefox i’m getting a security error on load of:

/Index.html

NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
desktop-mock/navigator_moz_mobilemessage.js Line 45

Action taken:
For now workaround is to avoid the load of the corresponding js script below from “index.html”

AND

EventDispatcher is not defined

Action:
WIP, my understanding is that EventDispatcher is not declared
is seems to be a module by itself relaying the event between app? window ?
18 Occurrences of event dispatcher found in the full app directory

12:37:04.718 ReferenceError: EventDispatcher is not defined
window.NavigationFactory() navigation.js:901
navigation.js:905
navigation.js:6
1 navigation.js:901:1

I Hope I’m clear enough, if any one have an Idea where to look at for the next step it will be much appreciated, on my side i will continue hacking and testing to see if i find some interesting stuff.

Thanks

Matth


(M Ducorps) #3

Thanks to @sizvix this all was due to path issues…

Continuing

Matth


(Luca) #4

Thank you for updating us, @m.ducorps!


(Lapineige) #5

+1 :slight_smile:
(and thanks for the meta-bug)

I’m sure you will be able to make it working again :wink:


(M Ducorps) #6

Hi All,

I’m back with my questions :slight_smile:

I finally manage to have mulet working ! From here i don’t really get how i can access my app i want to test since it’s not available in the home screen.

Any doc about it or any one could give any hints about it ?

Thanks

Matth


(simon g) #7

Have you moved the SMS app in the app directory ?


(M Ducorps) #8

to be fair din’t tried i have the feeling there is stuff in the disable_app folder that we don’t have in the app folder but probably wrong :blush:

Trying it now.

Matth


(M Ducorps) #9

@sizvix

Just tried it and it’s not better i can’t see it in the home screen and don’t see any error regarding a potential loading error fo my sms app…

here is what i have done
1)
Copied SMS app from disabled_app to app
run a make
launched mulet
No SMS app is available in the home screen

Copied Clock app from disabled_app to app
run a make
launched mulet

No SMS app nor clock app are available in the home screen…

Am i doing something wrong ?

@TitanNano how did you test the Clock app ?

Thanks

Matth


(Jovan Gerodetti) #10

the clock app is a webapp not chrome!
does the build process mention the SMS app?


(M Ducorps) #11

Not when i put my modified one

I have modified my app from a model manifest.webapp to a manifest.webmanifest.

I followed this model:


and this
https://www.w3.org/TR/appmanifest/#example-manifest

Gaia is not able to run this kind of app ?

I con only see the app in the home screen if i take the original one which running with manifest.webapp

Matth


(Jovan Gerodetti) #12

mainfest.webapp is used for chrome apps in B2G, so you need to keep it that way.
The web manifest is a new standard for web applications, which can only be used over http(s).


(M Ducorps) #13

Okey, and if i understand we are about to move to this model but it’s not ready yet ?

Is this 2 bugs we are talking about ?

https://bugzilla.mozilla.org/show_bug.cgi?id=889230

https://bugzilla.mozilla.org/show_bug.cgi?id=1205323

We’ll look back at my app now :slight_smile:

Thanks

Matth


(Jovan Gerodetti) #14

no, chrome apps will continue to use the mozilla internal manifest. Only web apps use the new web manifest. If you take a look at the clock app you will see that it uses a different manifest, but dialer for example uses the manifest.webapp


(M Ducorps) #15

i don’t get it how do you differentiate chrome app from web app ?
Why using two model in parallel ?


(Jovan Gerodetti) #16

chrome apps are served over chrome:// and are shipped as part of the system UI of B2G. They have access to gecko internal APIs like telephony and wifi.

Web apps are web standard compliant applications. Gaia will also include some web apps like clock and maybe others in the future. Web apps are served over https:// and hosted at https://mozilla-b2g.github.io/gaia


(M Ducorps) #17

So this not a web standard ?

Matth


(Jovan Gerodetti) #18

yes, this is not web standard.


(M Ducorps) #19

one more question is chrome://, Gecko (Mozilla) specific ?


(M Ducorps) #20

Hi All,

Thanks to @sizvix i have made some great progress in understanding Gaia, from her I feel that i have an issue accessing local storage from Gaia here is the kind of error i’m getting:

My main concern is all the issues around the DataStoreAPI which i have the feeling it prevent me for writing on DeviceStorage.

I didn’t really get how this API is implemented .

Any hints would be much appreciated.

Matth