Hi,
The IDL for platform.showNotification() [1] claims the third parameter
is the URI of an image to be loaded and displayed with the notification.
It works fine with a remote image pulled down over HTTP, but I'd like
it to display an image from the bundle. Is that possible?
Any help would be greatly appreciated. Thanks!
Brian
1:
http://mxr.mozilla.org/mozillasvn/source/projects/webrunner/components/public/nsIPlatformGlue.idl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: What is this? http://pgp.ardvaark.net
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEAREDAAYFAkrgYvgACgkQ3YdPnMKx1ePbcwCgmYG3AFOrxH+YPIRwnQxk6xYu
xI8An2IHWpibbba0FB8ybsVydClZA5zs
=VslX
-----END PGP SIGNATURE-----
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP
C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA
AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J
REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq
ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0
vr4MkhoXe0rZigAAAABJRU5ErkJggg==";
Jason Miller 519.872.0797 // developIT // Jason Miller Design Developer of amoebaOS, Shutterborg, Delitweet & more |
Jason Miller |
519.872.0797 // developIT // Jason Miller Design Developer of amoebaOS, Shutterborg, Delitweet & more |
Jason Miller |
519.872.0797 // developIT // Jason Miller Design Developer of amoebaOS, Shutterborg, Delitweet & more |
You can also say resource://webapp/image.png where image.png is a file located in the webapp home directory (the place as webapp.ini).
On Thu, Oct 22, 2009 at 3:01 PM, Jason Miller <ja...@developit.ca> wrote:
No problem, I had a similar idea earlier when trying to use multiple local JavaScript files, but I don't think Prism makes it easy to gain access to the bundle's cached location and the files therein.
Jason Miller Developer of amoebaOS, Shutterborg, Delitweet & more
On Thu Oct 22 2009 10:00:06 GMT-0400 (EST), Brian Vargas wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Jason,
Wow, is that ugly. But it works, and I can't argue with success!
Thanks for the help!
Brian
Jason Miller wrote:
> It would be much easier to convert your image into a base64-encoded
> string and place that in your webapp.js file.
>
> var notifyIconResource = "data:image/png;base64,
>
> iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP
>
> C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA
>
> AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J
>
> REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq
>
> ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0
>
> vr4MkhoXe0rZigAAAABJRU5ErkJggg==";
>
>
> platform.showNotification(message, title, notifyIconResource);
>
> - Jason
>
> Jason Miller
> 519.872.0797 // developIT <http://developit.ca/> // Jason Miller Design
> <http://jasonmillerdesign.com/>
> /Developer of amoebaOS <https://amoebaos.com/>, Shutterborg
> <http://shutterb.org/>, Delitweet <http://delitweet.com/> & more/
>
>
> On Thu Oct 22 2009 09:49:44 GMT-0400 (EST), Brian Vargas
> <br...@ardvaark.net> wrote:
>
>
> Hi,
>
> The IDL for platform.showNotification() [1] claims the third parameter
> is the URI of an image to be loaded and displayed with the notification.
> It works fine with a remote image pulled down over HTTP, but I'd like
> it to display an image from the bundle. Is that possible?
>
> Any help would be greatly appreciated. Thanks!
>
> Brian
>
> 1:
> http://mxr.mozilla.org/mozillasvn/source/projects/webrunner/components/public/nsIPlatformGlue.idl
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: What is this? http://pgp.ardvaark.net
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/