You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Robber Phex <ro...@gmail.com> on 2014/03/03 00:31:59 UTC

How to implement the navigator.notification in Firefox OS?

Hi,all.

I found CB-6154, and I want to know how to fix it gracefully, how to
implement navigator.notification gracefully in FIrefox OS?

CB-6154:https://issues.apache.org/jira/browse/CB-6145

Any suggestion is welcome!
Thanks.

-- 
Regards,
RobberPhex

About me: http://about.me/RobberPhex

Re: How to implement the navigator.notification in Firefox OS?

Posted by Carlos Santana <cs...@gmail.com>.
Robert
  The document already reflects that user needs to add notification.css
here:
https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks

The plugin already copies the css file using plugin.xml/asset
<asset src="www/firefoxos/notification.css" target="css/notification.css" />

We always accept pull requests for enhancements, feel free to send one our
way
Add code here to inject css into head in this javascript file specific to
firefoxos:
https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js

Also please include tests with your pull requests
Not sure why this was not implemented this way in the first place, so its
good to test to make sure there is no problems with firefoxos

To others about injecting js libs (underscore, topcoat) I think this is
user space, cordova plugins should not be solving this problem.

About providing a way in plugman/plugin.xml to specify to insert a css
stylesheet into head, I think this is OK for firefox and windows8 but I
would not recommend to other platforms (i.e. android, ios) cordova should
be messing with Presentation/UI layer.

For firefoxos and windows8 is OK since their "native" cordova layer is web
first ! :-)

If we do implement the feature, I will strongly put a guideline for plugin
developers to make sure do not conflict with user css name spaces, to not
use generic css rules, and to use only rules associated with the plugin
feature and have custom css classes to apply styling



On Tue, Mar 4, 2014 at 3:07 PM, Michal Mocny <mm...@chromium.org> wrote:

> Jesse,
>
> I do agree, that would be nice, but I think its going to be difficult to do
> this right.  I would not want each plugin to bundle its own underscore, for
> example.  At the very least, we should set a standard for using
> one-plugin-per-library, but better yet would be to use an existing package
> manager somehow.
>
> Not sure how to solve the issue, I'm really curious about others' ideas.
>
> -Michal
>
>
> On Tue, Mar 4, 2014 at 2:53 PM, purplecabbage <purplecabbage@gmail.com
> >wrote:
>
> > These are features I am looking to add to plugman. Currently there isn't
> a
> > way to add CSS or generic JS, short of runtime heroics.
> >
> > It would be nice to be able to make a Cordova plugin that, for example,
> > used topcoat, underscore or angular.
> > Currently all plugin js gets wrapped in our define/require closure which
> > may conflict with existing libs.
> >
> > I will create issues once I am on a desktop.
> >
> > Sent from my iPhone
> >
> > > On Mar 4, 2014, at 9:25 AM, Brian LeRoux <b...@brian.io> wrote:
> > >
> > > oooh dirty
> > >
> > > I like it
> > >
> > >
> > >> On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mm...@chromium.org>
> > wrote:
> > >>
> > >> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
> > >> problem.
> > >>
> > >> Why not just write JS that runs on startup (after domcontentready but
> > >> delaying onpluginready) that injects the CSS?
> > >>
> > >>
> > >>> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org>
> > wrote:
> > >>>
> > >>> <asset> ?
> > >>
> >
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
> > >>>
> > >>>
> > >>>> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
> > >>>>
> > >>>> Seems to me that you want the plugin installation to copy the css
> > file.
> > >>>> its
> > >>>> hacky, but you could use <js-file> [1] as a workaround and file a
> bug
> > to
> > >>>> add other file types for copying.
> > >>>>
> > >>>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
> > >>>>
> > >>>>
> > >>>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
> > >>>> wrote:
> > >>>>
> > >>>>> I suggest some method to solve it.
> > >>>>>
> > >>>>> First, we can make a rule that cordova-plugin-dialogs must work
> with
> > >>>>> notification.css. and, plugin will create a null css in android for
> > >>>> avoid
> > >>>>> warming. we also update document.
> > >>>>>
> > >>>>> Second, in HTML, cordova-plugin-dialogs can work without link to
> > >>>>> notification.css. and, the android platform is no problem, but in
> > >>>> Firefox
> > >>>>> OS, the js will add link to notification.css dynamically.
> > >>>>>
> > >>>>> All in all, I think the plugin must provide a single method to use
> > it.
> > >>>> same
> > >>>>> code worked in Firefox OS, but warming in Android is not good
> enough.
> > >>>>>
> > >>>>>
> > >>>>>> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <robberphex@gmail.com
> >
> > >>>>> wrote:
> > >>>>>
> > >>>>>> I think, If the developer must add notification.css, we should
> > >> update
> > >>>> the
> > >>>>>> document as soon as possible.
> > >>>>>>
> > >>>>>> such as
> > >>
> >
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> > >>>>>>
> > >>>>>> In last, I don't think it is good idea that let app show some
> > >> warming
> > >>>> in
> > >>>>>> android. I suggest the plugin solve it.
> > >>>>>>
> > >>>>>>
> > >>>>>> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
> > >> csantana23@gmail.com
> > >>>>>> wrote:
> > >>>>>>
> > >>>>>>> The firefox documentation for the plugin [1] states that the user
> > >>>> needs
> > >>>>> to
> > >>>>>>> add the css entry in index.html
> > >>>>>>>
> > >>>>>>> <link rel="stylesheet" type="text/css"
> href="css/notification.css"
> > >> />
> > >>>>>>>
> > >>>>>>> I don't completely understand the problem with android.
> > >>>>>>> Are you referring to the fact that you wan to use same index.html
> > >> for
> > >>>>> both
> > >>>>>>> android and firefox and that the notification.css will be missing
> > >> for
> > >>>>>>> android platform?
> > >>>>>>> If that is the case use the merges to customize each platform.
> > >>>>>>>
> > >>>>>>> in your case you can put an empty file in
> > >>>> merges/css/notifications.css
> > >>>>>>>
> > >>>>>>> The cordova docs [2] explains a similar use case.
> > >>>>>>>
> > >>>>>>> If you are looking to enhance the plugin to inject the css
> > >>>> dynamically
> > >>>>> you
> > >>>>>>> will need to do that from the plugin's javascript for firefox
> > >> located
> > >>>>> here
> > >>>>>>> [3]
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> [1]:
> > >>
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> > >>>>>>> [2]:
> > >>
> >
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> > >>>>>>> [3]:
> > >>
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <
> robberphex@gmail.com>
> > >>>>> wrote:
> > >>>>>>>
> > >>>>>>>> There is anyone?
> > >>>>>>>>
> > >>>>>>>> I found that the plug "cordova-plugin-dialogs" is already
> > >> implement
> > >>>>> the
> > >>>>>>>> navigator.notification, but it need refer the CSS file
> > >>>>>>>> "css/notification.css" in Firefox OS.
> > >>>>>>>>
> > >>>>>>>> This is a dilemma:
> > >>>>>>>>
> > >>>>>>>> If we consider Firefox OS, we must add link tag with
> > >>>>>>> css/notification.css,
> > >>>>>>>> but in android, the log display "AndroidProtocolHandler(2620):
> > >>>> Unable
> > >>>>> to
> > >>>>>>>> open asset URL: file:///android_asset/www/css/notification.css"
> > >>>>>>>>
> > >>>>>>>> Or, if we not refer "css/notification.css", The
> > >>>> navigator.notification
> > >>>>>>> will
> > >>>>>>>> not work at Firefox OS. such as CB-6154:
> > >>>>>>>> https://issues.apache.org/jira/browse/CB-6145
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> Do someone have a solution?
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
> > >> robberphex@gmail.com>
> > >>>>>>> wrote:
> > >>>>>>>>
> > >>>>>>>>> Hi,all.
> > >>>>>>>>>
> > >>>>>>>>> I found CB-6154, and I want to know how to fix it gracefully,
> > >>>> how to
> > >>>>>>>>> implement navigator.notification gracefully in FIrefox OS?
> > >>>>>>>>>
> > >>>>>>>>> CB-6154:https://issues.apache.org/jira/browse/CB-6145
> > >>>>>>>>>
> > >>>>>>>>> Any suggestion is welcome!
> > >>>>>>>>> Thanks.
> > >>>>>>>>>
> > >>>>>>>>> --
> > >>>>>>>>> Regards,
> > >>>>>>>>> RobberPhex
> > >>>>>>>>>
> > >>>>>>>>> About me: http://about.me/RobberPhex
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> --
> > >>>>>>>> Regards,
> > >>>>>>>> RobberPhex
> > >>>>>>>>
> > >>>>>>>> About me: http://about.me/RobberPhex
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> --
> > >>>>>>> Carlos Santana
> > >>>>>>> <cs...@gmail.com>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> Regards,
> > >>>>>> RobberPhex
> > >>>>>>
> > >>>>>> About me: http://about.me/RobberPhex
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> --
> > >>>>> Regards,
> > >>>>> RobberPhex
> > >>>>>
> > >>>>> About me: http://about.me/RobberPhex
> > >>
> >
>



-- 
Carlos Santana
<cs...@gmail.com>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Piotr Zalewa <pz...@mozilla.com>.
Hi

Making the plugin load CSS using JS is a good idea.

I'm working on a solution which will use modal window for notification.
This will remove the need to add css to html pages which app requires.
It takes a while as there is a small difficulty with singular window - 
onUnload doesn't exactly work as in Firefox Desktop.

Piotr

On 03/04/2014 11:22 PM, Brian LeRoux wrote:
> anis and I have some thoughts on this topic / will save it for some
> discussion today and update the list after
>
>
> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org> wrote:
>
>> Jesse,
>>
>> I do agree, that would be nice, but I think its going to be difficult to do
>> this right.  I would not want each plugin to bundle its own underscore, for
>> example.  At the very least, we should set a standard for using
>> one-plugin-per-library, but better yet would be to use an existing package
>> manager somehow.
>>
>> Not sure how to solve the issue, I'm really curious about others' ideas.
>>
>> -Michal
>>
>>
>> On Tue, Mar 4, 2014 at 2:53 PM, purplecabbage <purplecabbage@gmail.com
>>> wrote:
>>
>>> These are features I am looking to add to plugman. Currently there isn't
>> a
>>> way to add CSS or generic JS, short of runtime heroics.
>>>
>>> It would be nice to be able to make a Cordova plugin that, for example,
>>> used topcoat, underscore or angular.
>>> Currently all plugin js gets wrapped in our define/require closure which
>>> may conflict with existing libs.
>>>
>>> I will create issues once I am on a desktop.
>>>
>>> Sent from my iPhone
>>>
>>>> On Mar 4, 2014, at 9:25 AM, Brian LeRoux <b...@brian.io> wrote:
>>>>
>>>> oooh dirty
>>>>
>>>> I like it
>>>>
>>>>
>>>>> On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mm...@chromium.org>
>>> wrote:
>>>>>
>>>>> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
>>>>> problem.
>>>>>
>>>>> Why not just write JS that runs on startup (after domcontentready but
>>>>> delaying onpluginready) that injects the CSS?
>>>>>
>>>>>
>>>>>> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org>
>>> wrote:
>>>>>>
>>>>>> <asset> ?
>>>>>
>>>
>> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
>>>>>>
>>>>>>
>>>>>>> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
>>>>>>>
>>>>>>> Seems to me that you want the plugin installation to copy the css
>>> file.
>>>>>>> its
>>>>>>> hacky, but you could use <js-file> [1] as a workaround and file a
>> bug
>>> to
>>>>>>> add other file types for copying.
>>>>>>>
>>>>>>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I suggest some method to solve it.
>>>>>>>>
>>>>>>>> First, we can make a rule that cordova-plugin-dialogs must work
>> with
>>>>>>>> notification.css. and, plugin will create a null css in android for
>>>>>>> avoid
>>>>>>>> warming. we also update document.
>>>>>>>>
>>>>>>>> Second, in HTML, cordova-plugin-dialogs can work without link to
>>>>>>>> notification.css. and, the android platform is no problem, but in
>>>>>>> Firefox
>>>>>>>> OS, the js will add link to notification.css dynamically.
>>>>>>>>
>>>>>>>> All in all, I think the plugin must provide a single method to use
>>> it.
>>>>>>> same
>>>>>>>> code worked in Firefox OS, but warming in Android is not good
>> enough.
>>>>>>>>
>>>>>>>>
>>>>>>>>> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <robberphex@gmail.com
>>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> I think, If the developer must add notification.css, we should
>>>>> update
>>>>>>> the
>>>>>>>>> document as soon as possible.
>>>>>>>>>
>>>>>>>>> such as
>>>>>
>>>
>> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
>>>>>>>>>
>>>>>>>>> In last, I don't think it is good idea that let app show some
>>>>> warming
>>>>>>> in
>>>>>>>>> android. I suggest the plugin solve it.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
>>>>> csantana23@gmail.com
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> The firefox documentation for the plugin [1] states that the user
>>>>>>> needs
>>>>>>>> to
>>>>>>>>>> add the css entry in index.html
>>>>>>>>>>
>>>>>>>>>> <link rel="stylesheet" type="text/css"
>> href="css/notification.css"
>>>>> />
>>>>>>>>>>
>>>>>>>>>> I don't completely understand the problem with android.
>>>>>>>>>> Are you referring to the fact that you wan to use same index.html
>>>>> for
>>>>>>>> both
>>>>>>>>>> android and firefox and that the notification.css will be missing
>>>>> for
>>>>>>>>>> android platform?
>>>>>>>>>> If that is the case use the merges to customize each platform.
>>>>>>>>>>
>>>>>>>>>> in your case you can put an empty file in
>>>>>>> merges/css/notifications.css
>>>>>>>>>>
>>>>>>>>>> The cordova docs [2] explains a similar use case.
>>>>>>>>>>
>>>>>>>>>> If you are looking to enhance the plugin to inject the css
>>>>>>> dynamically
>>>>>>>> you
>>>>>>>>>> will need to do that from the plugin's javascript for firefox
>>>>> located
>>>>>>>> here
>>>>>>>>>> [3]
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [1]:
>>>>>
>>>
>> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
>>>>>>>>>> [2]:
>>>>>
>>>
>> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
>>>>>>>>>> [3]:
>>>>>
>>>
>> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <
>> robberphex@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> There is anyone?
>>>>>>>>>>>
>>>>>>>>>>> I found that the plug "cordova-plugin-dialogs" is already
>>>>> implement
>>>>>>>> the
>>>>>>>>>>> navigator.notification, but it need refer the CSS file
>>>>>>>>>>> "css/notification.css" in Firefox OS.
>>>>>>>>>>>
>>>>>>>>>>> This is a dilemma:
>>>>>>>>>>>
>>>>>>>>>>> If we consider Firefox OS, we must add link tag with
>>>>>>>>>> css/notification.css,
>>>>>>>>>>> but in android, the log display "AndroidProtocolHandler(2620):
>>>>>>> Unable
>>>>>>>> to
>>>>>>>>>>> open asset URL: file:///android_asset/www/css/notification.css"
>>>>>>>>>>>
>>>>>>>>>>> Or, if we not refer "css/notification.css", The
>>>>>>> navigator.notification
>>>>>>>>>> will
>>>>>>>>>>> not work at Firefox OS. such as CB-6154:
>>>>>>>>>>> https://issues.apache.org/jira/browse/CB-6145
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Do someone have a solution?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
>>>>> robberphex@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi,all.
>>>>>>>>>>>>
>>>>>>>>>>>> I found CB-6154, and I want to know how to fix it gracefully,
>>>>>>> how to
>>>>>>>>>>>> implement navigator.notification gracefully in FIrefox OS?
>>>>>>>>>>>>
>>>>>>>>>>>> CB-6154:https://issues.apache.org/jira/browse/CB-6145
>>>>>>>>>>>>
>>>>>>>>>>>> Any suggestion is welcome!
>>>>>>>>>>>> Thanks.
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> RobberPhex
>>>>>>>>>>>>
>>>>>>>>>>>> About me: http://about.me/RobberPhex
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Regards,
>>>>>>>>>>> RobberPhex
>>>>>>>>>>>
>>>>>>>>>>> About me: http://about.me/RobberPhex
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Carlos Santana
>>>>>>>>>> <cs...@gmail.com>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>> RobberPhex
>>>>>>>>>
>>>>>>>>> About me: http://about.me/RobberPhex
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>> RobberPhex
>>>>>>>>
>>>>>>>> About me: http://about.me/RobberPhex
>>>>>
>>>
>>
>


-- 
Piotr Zalewa
Mozilla

Re: How to implement the navigator.notification in Firefox OS?

Posted by Brian LeRoux <b...@brian.io>.
anis and I have some thoughts on this topic / will save it for some
discussion today and update the list after


On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org> wrote:

> Jesse,
>
> I do agree, that would be nice, but I think its going to be difficult to do
> this right.  I would not want each plugin to bundle its own underscore, for
> example.  At the very least, we should set a standard for using
> one-plugin-per-library, but better yet would be to use an existing package
> manager somehow.
>
> Not sure how to solve the issue, I'm really curious about others' ideas.
>
> -Michal
>
>
> On Tue, Mar 4, 2014 at 2:53 PM, purplecabbage <purplecabbage@gmail.com
> >wrote:
>
> > These are features I am looking to add to plugman. Currently there isn't
> a
> > way to add CSS or generic JS, short of runtime heroics.
> >
> > It would be nice to be able to make a Cordova plugin that, for example,
> > used topcoat, underscore or angular.
> > Currently all plugin js gets wrapped in our define/require closure which
> > may conflict with existing libs.
> >
> > I will create issues once I am on a desktop.
> >
> > Sent from my iPhone
> >
> > > On Mar 4, 2014, at 9:25 AM, Brian LeRoux <b...@brian.io> wrote:
> > >
> > > oooh dirty
> > >
> > > I like it
> > >
> > >
> > >> On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mm...@chromium.org>
> > wrote:
> > >>
> > >> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
> > >> problem.
> > >>
> > >> Why not just write JS that runs on startup (after domcontentready but
> > >> delaying onpluginready) that injects the CSS?
> > >>
> > >>
> > >>> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org>
> > wrote:
> > >>>
> > >>> <asset> ?
> > >>
> >
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
> > >>>
> > >>>
> > >>>> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
> > >>>>
> > >>>> Seems to me that you want the plugin installation to copy the css
> > file.
> > >>>> its
> > >>>> hacky, but you could use <js-file> [1] as a workaround and file a
> bug
> > to
> > >>>> add other file types for copying.
> > >>>>
> > >>>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
> > >>>>
> > >>>>
> > >>>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
> > >>>> wrote:
> > >>>>
> > >>>>> I suggest some method to solve it.
> > >>>>>
> > >>>>> First, we can make a rule that cordova-plugin-dialogs must work
> with
> > >>>>> notification.css. and, plugin will create a null css in android for
> > >>>> avoid
> > >>>>> warming. we also update document.
> > >>>>>
> > >>>>> Second, in HTML, cordova-plugin-dialogs can work without link to
> > >>>>> notification.css. and, the android platform is no problem, but in
> > >>>> Firefox
> > >>>>> OS, the js will add link to notification.css dynamically.
> > >>>>>
> > >>>>> All in all, I think the plugin must provide a single method to use
> > it.
> > >>>> same
> > >>>>> code worked in Firefox OS, but warming in Android is not good
> enough.
> > >>>>>
> > >>>>>
> > >>>>>> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <robberphex@gmail.com
> >
> > >>>>> wrote:
> > >>>>>
> > >>>>>> I think, If the developer must add notification.css, we should
> > >> update
> > >>>> the
> > >>>>>> document as soon as possible.
> > >>>>>>
> > >>>>>> such as
> > >>
> >
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> > >>>>>>
> > >>>>>> In last, I don't think it is good idea that let app show some
> > >> warming
> > >>>> in
> > >>>>>> android. I suggest the plugin solve it.
> > >>>>>>
> > >>>>>>
> > >>>>>> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
> > >> csantana23@gmail.com
> > >>>>>> wrote:
> > >>>>>>
> > >>>>>>> The firefox documentation for the plugin [1] states that the user
> > >>>> needs
> > >>>>> to
> > >>>>>>> add the css entry in index.html
> > >>>>>>>
> > >>>>>>> <link rel="stylesheet" type="text/css"
> href="css/notification.css"
> > >> />
> > >>>>>>>
> > >>>>>>> I don't completely understand the problem with android.
> > >>>>>>> Are you referring to the fact that you wan to use same index.html
> > >> for
> > >>>>> both
> > >>>>>>> android and firefox and that the notification.css will be missing
> > >> for
> > >>>>>>> android platform?
> > >>>>>>> If that is the case use the merges to customize each platform.
> > >>>>>>>
> > >>>>>>> in your case you can put an empty file in
> > >>>> merges/css/notifications.css
> > >>>>>>>
> > >>>>>>> The cordova docs [2] explains a similar use case.
> > >>>>>>>
> > >>>>>>> If you are looking to enhance the plugin to inject the css
> > >>>> dynamically
> > >>>>> you
> > >>>>>>> will need to do that from the plugin's javascript for firefox
> > >> located
> > >>>>> here
> > >>>>>>> [3]
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> [1]:
> > >>
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> > >>>>>>> [2]:
> > >>
> >
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> > >>>>>>> [3]:
> > >>
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <
> robberphex@gmail.com>
> > >>>>> wrote:
> > >>>>>>>
> > >>>>>>>> There is anyone?
> > >>>>>>>>
> > >>>>>>>> I found that the plug "cordova-plugin-dialogs" is already
> > >> implement
> > >>>>> the
> > >>>>>>>> navigator.notification, but it need refer the CSS file
> > >>>>>>>> "css/notification.css" in Firefox OS.
> > >>>>>>>>
> > >>>>>>>> This is a dilemma:
> > >>>>>>>>
> > >>>>>>>> If we consider Firefox OS, we must add link tag with
> > >>>>>>> css/notification.css,
> > >>>>>>>> but in android, the log display "AndroidProtocolHandler(2620):
> > >>>> Unable
> > >>>>> to
> > >>>>>>>> open asset URL: file:///android_asset/www/css/notification.css"
> > >>>>>>>>
> > >>>>>>>> Or, if we not refer "css/notification.css", The
> > >>>> navigator.notification
> > >>>>>>> will
> > >>>>>>>> not work at Firefox OS. such as CB-6154:
> > >>>>>>>> https://issues.apache.org/jira/browse/CB-6145
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> Do someone have a solution?
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
> > >> robberphex@gmail.com>
> > >>>>>>> wrote:
> > >>>>>>>>
> > >>>>>>>>> Hi,all.
> > >>>>>>>>>
> > >>>>>>>>> I found CB-6154, and I want to know how to fix it gracefully,
> > >>>> how to
> > >>>>>>>>> implement navigator.notification gracefully in FIrefox OS?
> > >>>>>>>>>
> > >>>>>>>>> CB-6154:https://issues.apache.org/jira/browse/CB-6145
> > >>>>>>>>>
> > >>>>>>>>> Any suggestion is welcome!
> > >>>>>>>>> Thanks.
> > >>>>>>>>>
> > >>>>>>>>> --
> > >>>>>>>>> Regards,
> > >>>>>>>>> RobberPhex
> > >>>>>>>>>
> > >>>>>>>>> About me: http://about.me/RobberPhex
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> --
> > >>>>>>>> Regards,
> > >>>>>>>> RobberPhex
> > >>>>>>>>
> > >>>>>>>> About me: http://about.me/RobberPhex
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> --
> > >>>>>>> Carlos Santana
> > >>>>>>> <cs...@gmail.com>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> Regards,
> > >>>>>> RobberPhex
> > >>>>>>
> > >>>>>> About me: http://about.me/RobberPhex
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> --
> > >>>>> Regards,
> > >>>>> RobberPhex
> > >>>>>
> > >>>>> About me: http://about.me/RobberPhex
> > >>
> >
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Michal Mocny <mm...@chromium.org>.
Jesse,

I do agree, that would be nice, but I think its going to be difficult to do
this right.  I would not want each plugin to bundle its own underscore, for
example.  At the very least, we should set a standard for using
one-plugin-per-library, but better yet would be to use an existing package
manager somehow.

Not sure how to solve the issue, I'm really curious about others' ideas.

-Michal


On Tue, Mar 4, 2014 at 2:53 PM, purplecabbage <pu...@gmail.com>wrote:

> These are features I am looking to add to plugman. Currently there isn't a
> way to add CSS or generic JS, short of runtime heroics.
>
> It would be nice to be able to make a Cordova plugin that, for example,
> used topcoat, underscore or angular.
> Currently all plugin js gets wrapped in our define/require closure which
> may conflict with existing libs.
>
> I will create issues once I am on a desktop.
>
> Sent from my iPhone
>
> > On Mar 4, 2014, at 9:25 AM, Brian LeRoux <b...@brian.io> wrote:
> >
> > oooh dirty
> >
> > I like it
> >
> >
> >> On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mm...@chromium.org>
> wrote:
> >>
> >> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
> >> problem.
> >>
> >> Why not just write JS that runs on startup (after domcontentready but
> >> delaying onpluginready) that injects the CSS?
> >>
> >>
> >>> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org>
> wrote:
> >>>
> >>> <asset> ?
> >>
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
> >>>
> >>>
> >>>> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
> >>>>
> >>>> Seems to me that you want the plugin installation to copy the css
> file.
> >>>> its
> >>>> hacky, but you could use <js-file> [1] as a workaround and file a bug
> to
> >>>> add other file types for copying.
> >>>>
> >>>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
> >>>>
> >>>>
> >>>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
> >>>> wrote:
> >>>>
> >>>>> I suggest some method to solve it.
> >>>>>
> >>>>> First, we can make a rule that cordova-plugin-dialogs must work with
> >>>>> notification.css. and, plugin will create a null css in android for
> >>>> avoid
> >>>>> warming. we also update document.
> >>>>>
> >>>>> Second, in HTML, cordova-plugin-dialogs can work without link to
> >>>>> notification.css. and, the android platform is no problem, but in
> >>>> Firefox
> >>>>> OS, the js will add link to notification.css dynamically.
> >>>>>
> >>>>> All in all, I think the plugin must provide a single method to use
> it.
> >>>> same
> >>>>> code worked in Firefox OS, but warming in Android is not good enough.
> >>>>>
> >>>>>
> >>>>>> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com>
> >>>>> wrote:
> >>>>>
> >>>>>> I think, If the developer must add notification.css, we should
> >> update
> >>>> the
> >>>>>> document as soon as possible.
> >>>>>>
> >>>>>> such as
> >>
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> >>>>>>
> >>>>>> In last, I don't think it is good idea that let app show some
> >> warming
> >>>> in
> >>>>>> android. I suggest the plugin solve it.
> >>>>>>
> >>>>>>
> >>>>>> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
> >> csantana23@gmail.com
> >>>>>> wrote:
> >>>>>>
> >>>>>>> The firefox documentation for the plugin [1] states that the user
> >>>> needs
> >>>>> to
> >>>>>>> add the css entry in index.html
> >>>>>>>
> >>>>>>> <link rel="stylesheet" type="text/css" href="css/notification.css"
> >> />
> >>>>>>>
> >>>>>>> I don't completely understand the problem with android.
> >>>>>>> Are you referring to the fact that you wan to use same index.html
> >> for
> >>>>> both
> >>>>>>> android and firefox and that the notification.css will be missing
> >> for
> >>>>>>> android platform?
> >>>>>>> If that is the case use the merges to customize each platform.
> >>>>>>>
> >>>>>>> in your case you can put an empty file in
> >>>> merges/css/notifications.css
> >>>>>>>
> >>>>>>> The cordova docs [2] explains a similar use case.
> >>>>>>>
> >>>>>>> If you are looking to enhance the plugin to inject the css
> >>>> dynamically
> >>>>> you
> >>>>>>> will need to do that from the plugin's javascript for firefox
> >> located
> >>>>> here
> >>>>>>> [3]
> >>>>>>>
> >>>>>>>
> >>>>>>> [1]:
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> >>>>>>> [2]:
> >>
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> >>>>>>> [3]:
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
> >>>>> wrote:
> >>>>>>>
> >>>>>>>> There is anyone?
> >>>>>>>>
> >>>>>>>> I found that the plug "cordova-plugin-dialogs" is already
> >> implement
> >>>>> the
> >>>>>>>> navigator.notification, but it need refer the CSS file
> >>>>>>>> "css/notification.css" in Firefox OS.
> >>>>>>>>
> >>>>>>>> This is a dilemma:
> >>>>>>>>
> >>>>>>>> If we consider Firefox OS, we must add link tag with
> >>>>>>> css/notification.css,
> >>>>>>>> but in android, the log display "AndroidProtocolHandler(2620):
> >>>> Unable
> >>>>> to
> >>>>>>>> open asset URL: file:///android_asset/www/css/notification.css"
> >>>>>>>>
> >>>>>>>> Or, if we not refer "css/notification.css", The
> >>>> navigator.notification
> >>>>>>> will
> >>>>>>>> not work at Firefox OS. such as CB-6154:
> >>>>>>>> https://issues.apache.org/jira/browse/CB-6145
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Do someone have a solution?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
> >> robberphex@gmail.com>
> >>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Hi,all.
> >>>>>>>>>
> >>>>>>>>> I found CB-6154, and I want to know how to fix it gracefully,
> >>>> how to
> >>>>>>>>> implement navigator.notification gracefully in FIrefox OS?
> >>>>>>>>>
> >>>>>>>>> CB-6154:https://issues.apache.org/jira/browse/CB-6145
> >>>>>>>>>
> >>>>>>>>> Any suggestion is welcome!
> >>>>>>>>> Thanks.
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>>> Regards,
> >>>>>>>>> RobberPhex
> >>>>>>>>>
> >>>>>>>>> About me: http://about.me/RobberPhex
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Regards,
> >>>>>>>> RobberPhex
> >>>>>>>>
> >>>>>>>> About me: http://about.me/RobberPhex
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Carlos Santana
> >>>>>>> <cs...@gmail.com>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Regards,
> >>>>>> RobberPhex
> >>>>>>
> >>>>>> About me: http://about.me/RobberPhex
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Regards,
> >>>>> RobberPhex
> >>>>>
> >>>>> About me: http://about.me/RobberPhex
> >>
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by purplecabbage <pu...@gmail.com>.
These are features I am looking to add to plugman. Currently there isn't a way to add CSS or generic JS, short of runtime heroics. 

It would be nice to be able to make a Cordova plugin that, for example, used topcoat, underscore or angular. 
Currently all plugin js gets wrapped in our define/require closure which may conflict with existing libs. 

I will create issues once I am on a desktop. 

Sent from my iPhone

> On Mar 4, 2014, at 9:25 AM, Brian LeRoux <b...@brian.io> wrote:
> 
> oooh dirty
> 
> I like it
> 
> 
>> On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mm...@chromium.org> wrote:
>> 
>> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
>> problem.
>> 
>> Why not just write JS that runs on startup (after domcontentready but
>> delaying onpluginready) that injects the CSS?
>> 
>> 
>>> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org> wrote:
>>> 
>>> <asset> ?
>> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
>>> 
>>> 
>>>> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
>>>> 
>>>> Seems to me that you want the plugin installation to copy the css file.
>>>> its
>>>> hacky, but you could use <js-file> [1] as a workaround and file a bug to
>>>> add other file types for copying.
>>>> 
>>>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
>>>> 
>>>> 
>>>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
>>>> wrote:
>>>> 
>>>>> I suggest some method to solve it.
>>>>> 
>>>>> First, we can make a rule that cordova-plugin-dialogs must work with
>>>>> notification.css. and, plugin will create a null css in android for
>>>> avoid
>>>>> warming. we also update document.
>>>>> 
>>>>> Second, in HTML, cordova-plugin-dialogs can work without link to
>>>>> notification.css. and, the android platform is no problem, but in
>>>> Firefox
>>>>> OS, the js will add link to notification.css dynamically.
>>>>> 
>>>>> All in all, I think the plugin must provide a single method to use it.
>>>> same
>>>>> code worked in Firefox OS, but warming in Android is not good enough.
>>>>> 
>>>>> 
>>>>>> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> I think, If the developer must add notification.css, we should
>> update
>>>> the
>>>>>> document as soon as possible.
>>>>>> 
>>>>>> such as
>> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
>>>>>> 
>>>>>> In last, I don't think it is good idea that let app show some
>> warming
>>>> in
>>>>>> android. I suggest the plugin solve it.
>>>>>> 
>>>>>> 
>>>>>> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
>> csantana23@gmail.com
>>>>>> wrote:
>>>>>> 
>>>>>>> The firefox documentation for the plugin [1] states that the user
>>>> needs
>>>>> to
>>>>>>> add the css entry in index.html
>>>>>>> 
>>>>>>> <link rel="stylesheet" type="text/css" href="css/notification.css"
>> />
>>>>>>> 
>>>>>>> I don't completely understand the problem with android.
>>>>>>> Are you referring to the fact that you wan to use same index.html
>> for
>>>>> both
>>>>>>> android and firefox and that the notification.css will be missing
>> for
>>>>>>> android platform?
>>>>>>> If that is the case use the merges to customize each platform.
>>>>>>> 
>>>>>>> in your case you can put an empty file in
>>>> merges/css/notifications.css
>>>>>>> 
>>>>>>> The cordova docs [2] explains a similar use case.
>>>>>>> 
>>>>>>> If you are looking to enhance the plugin to inject the css
>>>> dynamically
>>>>> you
>>>>>>> will need to do that from the plugin's javascript for firefox
>> located
>>>>> here
>>>>>>> [3]
>>>>>>> 
>>>>>>> 
>>>>>>> [1]:
>> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
>>>>>>> [2]:
>> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
>>>>>>> [3]:
>> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
>>>>> wrote:
>>>>>>> 
>>>>>>>> There is anyone?
>>>>>>>> 
>>>>>>>> I found that the plug "cordova-plugin-dialogs" is already
>> implement
>>>>> the
>>>>>>>> navigator.notification, but it need refer the CSS file
>>>>>>>> "css/notification.css" in Firefox OS.
>>>>>>>> 
>>>>>>>> This is a dilemma:
>>>>>>>> 
>>>>>>>> If we consider Firefox OS, we must add link tag with
>>>>>>> css/notification.css,
>>>>>>>> but in android, the log display "AndroidProtocolHandler(2620):
>>>> Unable
>>>>> to
>>>>>>>> open asset URL: file:///android_asset/www/css/notification.css"
>>>>>>>> 
>>>>>>>> Or, if we not refer "css/notification.css", The
>>>> navigator.notification
>>>>>>> will
>>>>>>>> not work at Firefox OS. such as CB-6154:
>>>>>>>> https://issues.apache.org/jira/browse/CB-6145
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Do someone have a solution?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
>> robberphex@gmail.com>
>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Hi,all.
>>>>>>>>> 
>>>>>>>>> I found CB-6154, and I want to know how to fix it gracefully,
>>>> how to
>>>>>>>>> implement navigator.notification gracefully in FIrefox OS?
>>>>>>>>> 
>>>>>>>>> CB-6154:https://issues.apache.org/jira/browse/CB-6145
>>>>>>>>> 
>>>>>>>>> Any suggestion is welcome!
>>>>>>>>> Thanks.
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>> RobberPhex
>>>>>>>>> 
>>>>>>>>> About me: http://about.me/RobberPhex
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>> RobberPhex
>>>>>>>> 
>>>>>>>> About me: http://about.me/RobberPhex
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Carlos Santana
>>>>>>> <cs...@gmail.com>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Regards,
>>>>>> RobberPhex
>>>>>> 
>>>>>> About me: http://about.me/RobberPhex
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Regards,
>>>>> RobberPhex
>>>>> 
>>>>> About me: http://about.me/RobberPhex
>> 

Re: How to implement the navigator.notification in Firefox OS?

Posted by Brian LeRoux <b...@brian.io>.
oooh dirty

I like it


On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mm...@chromium.org> wrote:

> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
> problem.
>
> Why not just write JS that runs on startup (after domcontentready but
> delaying onpluginready) that injects the CSS?
>
>
> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org> wrote:
>
> > <asset> ?
> >
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
> >
> >
> > On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
> >
> >> Seems to me that you want the plugin installation to copy the css file.
> >> its
> >> hacky, but you could use <js-file> [1] as a workaround and file a bug to
> >> add other file types for copying.
> >>
> >> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
> >>
> >>
> >> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
> >> wrote:
> >>
> >> > I suggest some method to solve it.
> >> >
> >> > First, we can make a rule that cordova-plugin-dialogs must work with
> >> > notification.css. and, plugin will create a null css in android for
> >> avoid
> >> > warming. we also update document.
> >> >
> >> > Second, in HTML, cordova-plugin-dialogs can work without link to
> >> > notification.css. and, the android platform is no problem, but in
> >> Firefox
> >> > OS, the js will add link to notification.css dynamically.
> >> >
> >> > All in all, I think the plugin must provide a single method to use it.
> >> same
> >> > code worked in Firefox OS, but warming in Android is not good enough.
> >> >
> >> >
> >> > On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com>
> >> wrote:
> >> >
> >> > > I think, If the developer must add notification.css, we should
> update
> >> the
> >> > > document as soon as possible.
> >> > >
> >> > > such as
> >> > >
> >> >
> >>
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> >> > >
> >> > > In last, I don't think it is good idea that let app show some
> warming
> >> in
> >> > > android. I suggest the plugin solve it.
> >> > >
> >> > >
> >> > > On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
> csantana23@gmail.com
> >> > >wrote:
> >> > >
> >> > >> The firefox documentation for the plugin [1] states that the user
> >> needs
> >> > to
> >> > >> add the css entry in index.html
> >> > >>
> >> > >> <link rel="stylesheet" type="text/css" href="css/notification.css"
> />
> >> > >>
> >> > >> I don't completely understand the problem with android.
> >> > >> Are you referring to the fact that you wan to use same index.html
> for
> >> > both
> >> > >> android and firefox and that the notification.css will be missing
> for
> >> > >> android platform?
> >> > >> If that is the case use the merges to customize each platform.
> >> > >>
> >> > >> in your case you can put an empty file in
> >> merges/css/notifications.css
> >> > >>
> >> > >> The cordova docs [2] explains a similar use case.
> >> > >>
> >> > >> If you are looking to enhance the plugin to inject the css
> >> dynamically
> >> > you
> >> > >> will need to do that from the plugin's javascript for firefox
> located
> >> > here
> >> > >> [3]
> >> > >>
> >> > >>
> >> > >> [1]:
> >> > >>
> >> > >>
> >> >
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> >> > >> [2]:
> >> > >>
> >> > >>
> >> >
> >>
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> >> > >> [3]:
> >> > >>
> >> > >>
> >> >
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> >> > >>
> >> > >>
> >> > >>
> >> > >> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
> >> > wrote:
> >> > >>
> >> > >> > There is anyone?
> >> > >> >
> >> > >> > I found that the plug "cordova-plugin-dialogs" is already
> implement
> >> >  the
> >> > >> > navigator.notification, but it need refer the CSS file
> >> > >> > "css/notification.css" in Firefox OS.
> >> > >> >
> >> > >> > This is a dilemma:
> >> > >> >
> >> > >> > If we consider Firefox OS, we must add link tag with
> >> > >> css/notification.css,
> >> > >> > but in android, the log display "AndroidProtocolHandler(2620):
> >> Unable
> >> > to
> >> > >> > open asset URL: file:///android_asset/www/css/notification.css"
> >> > >> >
> >> > >> > Or, if we not refer "css/notification.css", The
> >> navigator.notification
> >> > >> will
> >> > >> > not work at Firefox OS. such as CB-6154:
> >> > >> > https://issues.apache.org/jira/browse/CB-6145
> >> > >> >
> >> > >> >
> >> > >> > Do someone have a solution?
> >> > >> >
> >> > >> >
> >> > >> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
> robberphex@gmail.com>
> >> > >> wrote:
> >> > >> >
> >> > >> > > Hi,all.
> >> > >> > >
> >> > >> > > I found CB-6154, and I want to know how to fix it gracefully,
> >> how to
> >> > >> > > implement navigator.notification gracefully in FIrefox OS?
> >> > >> > >
> >> > >> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
> >> > >> > >
> >> > >> > > Any suggestion is welcome!
> >> > >> > > Thanks.
> >> > >> > >
> >> > >> > > --
> >> > >> > > Regards,
> >> > >> > > RobberPhex
> >> > >> > >
> >> > >> > > About me: http://about.me/RobberPhex
> >> > >> > >
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > --
> >> > >> > Regards,
> >> > >> > RobberPhex
> >> > >> >
> >> > >> > About me: http://about.me/RobberPhex
> >> > >> >
> >> > >>
> >> > >>
> >> > >>
> >> > >> --
> >> > >> Carlos Santana
> >> > >> <cs...@gmail.com>
> >> > >>
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > Regards,
> >> > > RobberPhex
> >> > >
> >> > > About me: http://about.me/RobberPhex
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > RobberPhex
> >> >
> >> > About me: http://about.me/RobberPhex
> >> >
> >>
> >
> >
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Michal Mocny <mm...@chromium.org>.
Ah wait, that won't inject it into the page.. Sorry, misunderstood the
problem.

Why not just write JS that runs on startup (after domcontentready but
delaying onpluginready) that injects the CSS?


On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mm...@chromium.org> wrote:

> <asset> ?
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
>
>
> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
>
>> Seems to me that you want the plugin installation to copy the css file.
>> its
>> hacky, but you could use <js-file> [1] as a workaround and file a bug to
>> add other file types for copying.
>>
>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
>>
>>
>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
>> wrote:
>>
>> > I suggest some method to solve it.
>> >
>> > First, we can make a rule that cordova-plugin-dialogs must work with
>> > notification.css. and, plugin will create a null css in android for
>> avoid
>> > warming. we also update document.
>> >
>> > Second, in HTML, cordova-plugin-dialogs can work without link to
>> > notification.css. and, the android platform is no problem, but in
>> Firefox
>> > OS, the js will add link to notification.css dynamically.
>> >
>> > All in all, I think the plugin must provide a single method to use it.
>> same
>> > code worked in Firefox OS, but warming in Android is not good enough.
>> >
>> >
>> > On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com>
>> wrote:
>> >
>> > > I think, If the developer must add notification.css, we should update
>> the
>> > > document as soon as possible.
>> > >
>> > > such as
>> > >
>> >
>> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
>> > >
>> > > In last, I don't think it is good idea that let app show some warming
>> in
>> > > android. I suggest the plugin solve it.
>> > >
>> > >
>> > > On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <csantana23@gmail.com
>> > >wrote:
>> > >
>> > >> The firefox documentation for the plugin [1] states that the user
>> needs
>> > to
>> > >> add the css entry in index.html
>> > >>
>> > >> <link rel="stylesheet" type="text/css" href="css/notification.css" />
>> > >>
>> > >> I don't completely understand the problem with android.
>> > >> Are you referring to the fact that you wan to use same index.html for
>> > both
>> > >> android and firefox and that the notification.css will be missing for
>> > >> android platform?
>> > >> If that is the case use the merges to customize each platform.
>> > >>
>> > >> in your case you can put an empty file in
>> merges/css/notifications.css
>> > >>
>> > >> The cordova docs [2] explains a similar use case.
>> > >>
>> > >> If you are looking to enhance the plugin to inject the css
>> dynamically
>> > you
>> > >> will need to do that from the plugin's javascript for firefox located
>> > here
>> > >> [3]
>> > >>
>> > >>
>> > >> [1]:
>> > >>
>> > >>
>> >
>> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
>> > >> [2]:
>> > >>
>> > >>
>> >
>> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
>> > >> [3]:
>> > >>
>> > >>
>> >
>> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
>> > >>
>> > >>
>> > >>
>> > >> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
>> > wrote:
>> > >>
>> > >> > There is anyone?
>> > >> >
>> > >> > I found that the plug "cordova-plugin-dialogs" is already implement
>> >  the
>> > >> > navigator.notification, but it need refer the CSS file
>> > >> > "css/notification.css" in Firefox OS.
>> > >> >
>> > >> > This is a dilemma:
>> > >> >
>> > >> > If we consider Firefox OS, we must add link tag with
>> > >> css/notification.css,
>> > >> > but in android, the log display "AndroidProtocolHandler(2620):
>> Unable
>> > to
>> > >> > open asset URL: file:///android_asset/www/css/notification.css"
>> > >> >
>> > >> > Or, if we not refer "css/notification.css", The
>> navigator.notification
>> > >> will
>> > >> > not work at Firefox OS. such as CB-6154:
>> > >> > https://issues.apache.org/jira/browse/CB-6145
>> > >> >
>> > >> >
>> > >> > Do someone have a solution?
>> > >> >
>> > >> >
>> > >> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com>
>> > >> wrote:
>> > >> >
>> > >> > > Hi,all.
>> > >> > >
>> > >> > > I found CB-6154, and I want to know how to fix it gracefully,
>> how to
>> > >> > > implement navigator.notification gracefully in FIrefox OS?
>> > >> > >
>> > >> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
>> > >> > >
>> > >> > > Any suggestion is welcome!
>> > >> > > Thanks.
>> > >> > >
>> > >> > > --
>> > >> > > Regards,
>> > >> > > RobberPhex
>> > >> > >
>> > >> > > About me: http://about.me/RobberPhex
>> > >> > >
>> > >> >
>> > >> >
>> > >> >
>> > >> > --
>> > >> > Regards,
>> > >> > RobberPhex
>> > >> >
>> > >> > About me: http://about.me/RobberPhex
>> > >> >
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Carlos Santana
>> > >> <cs...@gmail.com>
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Regards,
>> > > RobberPhex
>> > >
>> > > About me: http://about.me/RobberPhex
>> > >
>> >
>> >
>> >
>> > --
>> > Regards,
>> > RobberPhex
>> >
>> > About me: http://about.me/RobberPhex
>> >
>>
>
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Brian LeRoux <b...@brian.io>.
booya


On Tue, Mar 4, 2014 at 9:07 AM, Michal Mocny <mm...@chromium.org> wrote:

> <asset> ?
>
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
>
>
> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:
>
> > Seems to me that you want the plugin installation to copy the css file.
> its
> > hacky, but you could use <js-file> [1] as a workaround and file a bug to
> > add other file types for copying.
> >
> > http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
> >
> >
> > On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com>
> wrote:
> >
> > > I suggest some method to solve it.
> > >
> > > First, we can make a rule that cordova-plugin-dialogs must work with
> > > notification.css. and, plugin will create a null css in android for
> avoid
> > > warming. we also update document.
> > >
> > > Second, in HTML, cordova-plugin-dialogs can work without link to
> > > notification.css. and, the android platform is no problem, but in
> Firefox
> > > OS, the js will add link to notification.css dynamically.
> > >
> > > All in all, I think the plugin must provide a single method to use it.
> > same
> > > code worked in Firefox OS, but warming in Android is not good enough.
> > >
> > >
> > > On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com>
> > wrote:
> > >
> > > > I think, If the developer must add notification.css, we should update
> > the
> > > > document as soon as possible.
> > > >
> > > > such as
> > > >
> > >
> >
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> > > >
> > > > In last, I don't think it is good idea that let app show some warming
> > in
> > > > android. I suggest the plugin solve it.
> > > >
> > > >
> > > > On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <csantana23@gmail.com
> > > >wrote:
> > > >
> > > >> The firefox documentation for the plugin [1] states that the user
> > needs
> > > to
> > > >> add the css entry in index.html
> > > >>
> > > >> <link rel="stylesheet" type="text/css" href="css/notification.css"
> />
> > > >>
> > > >> I don't completely understand the problem with android.
> > > >> Are you referring to the fact that you wan to use same index.html
> for
> > > both
> > > >> android and firefox and that the notification.css will be missing
> for
> > > >> android platform?
> > > >> If that is the case use the merges to customize each platform.
> > > >>
> > > >> in your case you can put an empty file in
> merges/css/notifications.css
> > > >>
> > > >> The cordova docs [2] explains a similar use case.
> > > >>
> > > >> If you are looking to enhance the plugin to inject the css
> dynamically
> > > you
> > > >> will need to do that from the plugin's javascript for firefox
> located
> > > here
> > > >> [3]
> > > >>
> > > >>
> > > >> [1]:
> > > >>
> > > >>
> > >
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> > > >> [2]:
> > > >>
> > > >>
> > >
> >
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> > > >> [3]:
> > > >>
> > > >>
> > >
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> > > >>
> > > >>
> > > >>
> > > >> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
> > > wrote:
> > > >>
> > > >> > There is anyone?
> > > >> >
> > > >> > I found that the plug "cordova-plugin-dialogs" is already
> implement
> > >  the
> > > >> > navigator.notification, but it need refer the CSS file
> > > >> > "css/notification.css" in Firefox OS.
> > > >> >
> > > >> > This is a dilemma:
> > > >> >
> > > >> > If we consider Firefox OS, we must add link tag with
> > > >> css/notification.css,
> > > >> > but in android, the log display "AndroidProtocolHandler(2620):
> > Unable
> > > to
> > > >> > open asset URL: file:///android_asset/www/css/notification.css"
> > > >> >
> > > >> > Or, if we not refer "css/notification.css", The
> > navigator.notification
> > > >> will
> > > >> > not work at Firefox OS. such as CB-6154:
> > > >> > https://issues.apache.org/jira/browse/CB-6145
> > > >> >
> > > >> >
> > > >> > Do someone have a solution?
> > > >> >
> > > >> >
> > > >> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <robberphex@gmail.com
> >
> > > >> wrote:
> > > >> >
> > > >> > > Hi,all.
> > > >> > >
> > > >> > > I found CB-6154, and I want to know how to fix it gracefully,
> how
> > to
> > > >> > > implement navigator.notification gracefully in FIrefox OS?
> > > >> > >
> > > >> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
> > > >> > >
> > > >> > > Any suggestion is welcome!
> > > >> > > Thanks.
> > > >> > >
> > > >> > > --
> > > >> > > Regards,
> > > >> > > RobberPhex
> > > >> > >
> > > >> > > About me: http://about.me/RobberPhex
> > > >> > >
> > > >> >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > Regards,
> > > >> > RobberPhex
> > > >> >
> > > >> > About me: http://about.me/RobberPhex
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Carlos Santana
> > > >> <cs...@gmail.com>
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > RobberPhex
> > > >
> > > > About me: http://about.me/RobberPhex
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > RobberPhex
> > >
> > > About me: http://about.me/RobberPhex
> > >
> >
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Michal Mocny <mm...@chromium.org>.
<asset> ?
http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element


On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b...@brian.io> wrote:

> Seems to me that you want the plugin installation to copy the css file. its
> hacky, but you could use <js-file> [1] as a workaround and file a bug to
> add other file types for copying.
>
> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
>
>
> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com> wrote:
>
> > I suggest some method to solve it.
> >
> > First, we can make a rule that cordova-plugin-dialogs must work with
> > notification.css. and, plugin will create a null css in android for avoid
> > warming. we also update document.
> >
> > Second, in HTML, cordova-plugin-dialogs can work without link to
> > notification.css. and, the android platform is no problem, but in Firefox
> > OS, the js will add link to notification.css dynamically.
> >
> > All in all, I think the plugin must provide a single method to use it.
> same
> > code worked in Firefox OS, but warming in Android is not good enough.
> >
> >
> > On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com>
> wrote:
> >
> > > I think, If the developer must add notification.css, we should update
> the
> > > document as soon as possible.
> > >
> > > such as
> > >
> >
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> > >
> > > In last, I don't think it is good idea that let app show some warming
> in
> > > android. I suggest the plugin solve it.
> > >
> > >
> > > On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <csantana23@gmail.com
> > >wrote:
> > >
> > >> The firefox documentation for the plugin [1] states that the user
> needs
> > to
> > >> add the css entry in index.html
> > >>
> > >> <link rel="stylesheet" type="text/css" href="css/notification.css" />
> > >>
> > >> I don't completely understand the problem with android.
> > >> Are you referring to the fact that you wan to use same index.html for
> > both
> > >> android and firefox and that the notification.css will be missing for
> > >> android platform?
> > >> If that is the case use the merges to customize each platform.
> > >>
> > >> in your case you can put an empty file in merges/css/notifications.css
> > >>
> > >> The cordova docs [2] explains a similar use case.
> > >>
> > >> If you are looking to enhance the plugin to inject the css dynamically
> > you
> > >> will need to do that from the plugin's javascript for firefox located
> > here
> > >> [3]
> > >>
> > >>
> > >> [1]:
> > >>
> > >>
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> > >> [2]:
> > >>
> > >>
> >
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> > >> [3]:
> > >>
> > >>
> >
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> > >>
> > >>
> > >>
> > >> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
> > wrote:
> > >>
> > >> > There is anyone?
> > >> >
> > >> > I found that the plug "cordova-plugin-dialogs" is already implement
> >  the
> > >> > navigator.notification, but it need refer the CSS file
> > >> > "css/notification.css" in Firefox OS.
> > >> >
> > >> > This is a dilemma:
> > >> >
> > >> > If we consider Firefox OS, we must add link tag with
> > >> css/notification.css,
> > >> > but in android, the log display "AndroidProtocolHandler(2620):
> Unable
> > to
> > >> > open asset URL: file:///android_asset/www/css/notification.css"
> > >> >
> > >> > Or, if we not refer "css/notification.css", The
> navigator.notification
> > >> will
> > >> > not work at Firefox OS. such as CB-6154:
> > >> > https://issues.apache.org/jira/browse/CB-6145
> > >> >
> > >> >
> > >> > Do someone have a solution?
> > >> >
> > >> >
> > >> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com>
> > >> wrote:
> > >> >
> > >> > > Hi,all.
> > >> > >
> > >> > > I found CB-6154, and I want to know how to fix it gracefully, how
> to
> > >> > > implement navigator.notification gracefully in FIrefox OS?
> > >> > >
> > >> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
> > >> > >
> > >> > > Any suggestion is welcome!
> > >> > > Thanks.
> > >> > >
> > >> > > --
> > >> > > Regards,
> > >> > > RobberPhex
> > >> > >
> > >> > > About me: http://about.me/RobberPhex
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Regards,
> > >> > RobberPhex
> > >> >
> > >> > About me: http://about.me/RobberPhex
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Carlos Santana
> > >> <cs...@gmail.com>
> > >>
> > >
> > >
> > >
> > > --
> > > Regards,
> > > RobberPhex
> > >
> > > About me: http://about.me/RobberPhex
> > >
> >
> >
> >
> > --
> > Regards,
> > RobberPhex
> >
> > About me: http://about.me/RobberPhex
> >
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Brian LeRoux <b...@brian.io>.
Seems to me that you want the plugin installation to copy the css file. its
hacky, but you could use <js-file> [1] as a workaround and file a bug to
add other file types for copying.

http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md


On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <ro...@gmail.com> wrote:

> I suggest some method to solve it.
>
> First, we can make a rule that cordova-plugin-dialogs must work with
> notification.css. and, plugin will create a null css in android for avoid
> warming. we also update document.
>
> Second, in HTML, cordova-plugin-dialogs can work without link to
> notification.css. and, the android platform is no problem, but in Firefox
> OS, the js will add link to notification.css dynamically.
>
> All in all, I think the plugin must provide a single method to use it. same
> code worked in Firefox OS, but warming in Android is not good enough.
>
>
> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com> wrote:
>
> > I think, If the developer must add notification.css, we should update the
> > document as soon as possible.
> >
> > such as
> >
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> >
> > In last, I don't think it is good idea that let app show some warming in
> > android. I suggest the plugin solve it.
> >
> >
> > On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <csantana23@gmail.com
> >wrote:
> >
> >> The firefox documentation for the plugin [1] states that the user needs
> to
> >> add the css entry in index.html
> >>
> >> <link rel="stylesheet" type="text/css" href="css/notification.css" />
> >>
> >> I don't completely understand the problem with android.
> >> Are you referring to the fact that you wan to use same index.html for
> both
> >> android and firefox and that the notification.css will be missing for
> >> android platform?
> >> If that is the case use the merges to customize each platform.
> >>
> >> in your case you can put an empty file in merges/css/notifications.css
> >>
> >> The cordova docs [2] explains a similar use case.
> >>
> >> If you are looking to enhance the plugin to inject the css dynamically
> you
> >> will need to do that from the plugin's javascript for firefox located
> here
> >> [3]
> >>
> >>
> >> [1]:
> >>
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> >> [2]:
> >>
> >>
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> >> [3]:
> >>
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> >>
> >>
> >>
> >> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com>
> wrote:
> >>
> >> > There is anyone?
> >> >
> >> > I found that the plug "cordova-plugin-dialogs" is already implement
>  the
> >> > navigator.notification, but it need refer the CSS file
> >> > "css/notification.css" in Firefox OS.
> >> >
> >> > This is a dilemma:
> >> >
> >> > If we consider Firefox OS, we must add link tag with
> >> css/notification.css,
> >> > but in android, the log display "AndroidProtocolHandler(2620): Unable
> to
> >> > open asset URL: file:///android_asset/www/css/notification.css"
> >> >
> >> > Or, if we not refer "css/notification.css", The navigator.notification
> >> will
> >> > not work at Firefox OS. such as CB-6154:
> >> > https://issues.apache.org/jira/browse/CB-6145
> >> >
> >> >
> >> > Do someone have a solution?
> >> >
> >> >
> >> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com>
> >> wrote:
> >> >
> >> > > Hi,all.
> >> > >
> >> > > I found CB-6154, and I want to know how to fix it gracefully, how to
> >> > > implement navigator.notification gracefully in FIrefox OS?
> >> > >
> >> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
> >> > >
> >> > > Any suggestion is welcome!
> >> > > Thanks.
> >> > >
> >> > > --
> >> > > Regards,
> >> > > RobberPhex
> >> > >
> >> > > About me: http://about.me/RobberPhex
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > RobberPhex
> >> >
> >> > About me: http://about.me/RobberPhex
> >> >
> >>
> >>
> >>
> >> --
> >> Carlos Santana
> >> <cs...@gmail.com>
> >>
> >
> >
> >
> > --
> > Regards,
> > RobberPhex
> >
> > About me: http://about.me/RobberPhex
> >
>
>
>
> --
> Regards,
> RobberPhex
>
> About me: http://about.me/RobberPhex
>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Robber Phex <ro...@gmail.com>.
I suggest some method to solve it.

First, we can make a rule that cordova-plugin-dialogs must work with
notification.css. and, plugin will create a null css in android for avoid
warming. we also update document.

Second, in HTML, cordova-plugin-dialogs can work without link to
notification.css. and, the android platform is no problem, but in Firefox
OS, the js will add link to notification.css dynamically.

All in all, I think the plugin must provide a single method to use it. same
code worked in Firefox OS, but warming in Android is not good enough.


On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <ro...@gmail.com> wrote:

> I think, If the developer must add notification.css, we should update the
> document as soon as possible.
>
> such as
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
>
> In last, I don't think it is good idea that let app show some warming in
> android. I suggest the plugin solve it.
>
>
> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <cs...@gmail.com>wrote:
>
>> The firefox documentation for the plugin [1] states that the user needs to
>> add the css entry in index.html
>>
>> <link rel="stylesheet" type="text/css" href="css/notification.css" />
>>
>> I don't completely understand the problem with android.
>> Are you referring to the fact that you wan to use same index.html for both
>> android and firefox and that the notification.css will be missing for
>> android platform?
>> If that is the case use the merges to customize each platform.
>>
>> in your case you can put an empty file in merges/css/notifications.css
>>
>> The cordova docs [2] explains a similar use case.
>>
>> If you are looking to enhance the plugin to inject the css dynamically you
>> will need to do that from the plugin's javascript for firefox located here
>> [3]
>>
>>
>> [1]:
>>
>> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
>> [2]:
>>
>> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
>> [3]:
>>
>> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
>>
>>
>>
>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com> wrote:
>>
>> > There is anyone?
>> >
>> > I found that the plug "cordova-plugin-dialogs" is already implement  the
>> > navigator.notification, but it need refer the CSS file
>> > "css/notification.css" in Firefox OS.
>> >
>> > This is a dilemma:
>> >
>> > If we consider Firefox OS, we must add link tag with
>> css/notification.css,
>> > but in android, the log display "AndroidProtocolHandler(2620): Unable to
>> > open asset URL: file:///android_asset/www/css/notification.css"
>> >
>> > Or, if we not refer "css/notification.css", The navigator.notification
>> will
>> > not work at Firefox OS. such as CB-6154:
>> > https://issues.apache.org/jira/browse/CB-6145
>> >
>> >
>> > Do someone have a solution?
>> >
>> >
>> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com>
>> wrote:
>> >
>> > > Hi,all.
>> > >
>> > > I found CB-6154, and I want to know how to fix it gracefully, how to
>> > > implement navigator.notification gracefully in FIrefox OS?
>> > >
>> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
>> > >
>> > > Any suggestion is welcome!
>> > > Thanks.
>> > >
>> > > --
>> > > Regards,
>> > > RobberPhex
>> > >
>> > > About me: http://about.me/RobberPhex
>> > >
>> >
>> >
>> >
>> > --
>> > Regards,
>> > RobberPhex
>> >
>> > About me: http://about.me/RobberPhex
>> >
>>
>>
>>
>> --
>> Carlos Santana
>> <cs...@gmail.com>
>>
>
>
>
> --
> Regards,
> RobberPhex
>
> About me: http://about.me/RobberPhex
>



-- 
Regards,
RobberPhex

About me: http://about.me/RobberPhex

Re: How to implement the navigator.notification in Firefox OS?

Posted by Robber Phex <ro...@gmail.com>.
I think, If the developer must add notification.css, we should update the
document as soon as possible.

such as
http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification

In last, I don't think it is good idea that let app show some warming in
android. I suggest the plugin solve it.


On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <cs...@gmail.com> wrote:

> The firefox documentation for the plugin [1] states that the user needs to
> add the css entry in index.html
>
> <link rel="stylesheet" type="text/css" href="css/notification.css" />
>
> I don't completely understand the problem with android.
> Are you referring to the fact that you wan to use same index.html for both
> android and firefox and that the notification.css will be missing for
> android platform?
> If that is the case use the merges to customize each platform.
>
> in your case you can put an empty file in merges/css/notifications.css
>
> The cordova docs [2] explains a similar use case.
>
> If you are looking to enhance the plugin to inject the css dynamically you
> will need to do that from the plugin's javascript for firefox located here
> [3]
>
>
> [1]:
>
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> [2]:
>
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> [3]:
>
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
>
>
>
> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com> wrote:
>
> > There is anyone?
> >
> > I found that the plug "cordova-plugin-dialogs" is already implement  the
> > navigator.notification, but it need refer the CSS file
> > "css/notification.css" in Firefox OS.
> >
> > This is a dilemma:
> >
> > If we consider Firefox OS, we must add link tag with
> css/notification.css,
> > but in android, the log display "AndroidProtocolHandler(2620): Unable to
> > open asset URL: file:///android_asset/www/css/notification.css"
> >
> > Or, if we not refer "css/notification.css", The navigator.notification
> will
> > not work at Firefox OS. such as CB-6154:
> > https://issues.apache.org/jira/browse/CB-6145
> >
> >
> > Do someone have a solution?
> >
> >
> > On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com>
> wrote:
> >
> > > Hi,all.
> > >
> > > I found CB-6154, and I want to know how to fix it gracefully, how to
> > > implement navigator.notification gracefully in FIrefox OS?
> > >
> > > CB-6154:https://issues.apache.org/jira/browse/CB-6145
> > >
> > > Any suggestion is welcome!
> > > Thanks.
> > >
> > > --
> > > Regards,
> > > RobberPhex
> > >
> > > About me: http://about.me/RobberPhex
> > >
> >
> >
> >
> > --
> > Regards,
> > RobberPhex
> >
> > About me: http://about.me/RobberPhex
> >
>
>
>
> --
> Carlos Santana
> <cs...@gmail.com>
>



-- 
Regards,
RobberPhex

About me: http://about.me/RobberPhex

Re: How to implement the navigator.notification in Firefox OS?

Posted by Carlos Santana <cs...@gmail.com>.
The firefox documentation for the plugin [1] states that the user needs to
add the css entry in index.html

<link rel="stylesheet" type="text/css" href="css/notification.css" />

I don't completely understand the problem with android.
Are you referring to the fact that you wan to use same index.html for both
android and firefox and that the notification.css will be missing for
android platform?
If that is the case use the merges to customize each platform.

in your case you can put an empty file in merges/css/notifications.css

The cordova docs [2] explains a similar use case.

If you are looking to enhance the plugin to inject the css dynamically you
will need to do that from the plugin's javascript for firefox located here
[3]


[1]:
https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
[2]:
http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
[3]:
https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js



On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <ro...@gmail.com> wrote:

> There is anyone?
>
> I found that the plug "cordova-plugin-dialogs" is already implement  the
> navigator.notification, but it need refer the CSS file
> "css/notification.css" in Firefox OS.
>
> This is a dilemma:
>
> If we consider Firefox OS, we must add link tag with css/notification.css,
> but in android, the log display "AndroidProtocolHandler(2620): Unable to
> open asset URL: file:///android_asset/www/css/notification.css"
>
> Or, if we not refer "css/notification.css", The navigator.notification will
> not work at Firefox OS. such as CB-6154:
> https://issues.apache.org/jira/browse/CB-6145
>
>
> Do someone have a solution?
>
>
> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com> wrote:
>
> > Hi,all.
> >
> > I found CB-6154, and I want to know how to fix it gracefully, how to
> > implement navigator.notification gracefully in FIrefox OS?
> >
> > CB-6154:https://issues.apache.org/jira/browse/CB-6145
> >
> > Any suggestion is welcome!
> > Thanks.
> >
> > --
> > Regards,
> > RobberPhex
> >
> > About me: http://about.me/RobberPhex
> >
>
>
>
> --
> Regards,
> RobberPhex
>
> About me: http://about.me/RobberPhex
>



-- 
Carlos Santana
<cs...@gmail.com>

Re: How to implement the navigator.notification in Firefox OS?

Posted by Robber Phex <ro...@gmail.com>.
There is anyone?

I found that the plug "cordova-plugin-dialogs" is already implement  the
navigator.notification, but it need refer the CSS file
"css/notification.css" in Firefox OS.

This is a dilemma:

If we consider Firefox OS, we must add link tag with css/notification.css,
but in android, the log display "AndroidProtocolHandler(2620): Unable to
open asset URL: file:///android_asset/www/css/notification.css"

Or, if we not refer "css/notification.css", The navigator.notification will
not work at Firefox OS. such as CB-6154:
https://issues.apache.org/jira/browse/CB-6145


Do someone have a solution?


On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <ro...@gmail.com> wrote:

> Hi,all.
>
> I found CB-6154, and I want to know how to fix it gracefully, how to
> implement navigator.notification gracefully in FIrefox OS?
>
> CB-6154:https://issues.apache.org/jira/browse/CB-6145
>
> Any suggestion is welcome!
> Thanks.
>
> --
> Regards,
> RobberPhex
>
> About me: http://about.me/RobberPhex
>



-- 
Regards,
RobberPhex

About me: http://about.me/RobberPhex