You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2012/09/25 21:38:51 UTC

[Android] Distributing Drawable Resources - What is acceptable?

Hey

So, while doing the UI for the Camera, I just realized that we're
going to have to distribute images with Cordova.  I can see this being
an issue with any plugin that does UI.  Does anyone have any idea how
to solve this issue?

Joe

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Simon MacDonald <si...@gmail.com>.
There are three ways that I can think of in order to accomplish this
and not all of them are ideal.

1) If Cordova is a library project then other projects that include it
will be able to get access to their resources as well.
2) You can manually copy the resources into your new Cordova based project.
3) You can include the images in the Cordova jar file. We'd then need
to load the resources using Class.getResource() which would provide us
with a URL. Then we can use Bitmap.decodeStream() on the url to load
the image. I have not test it yet but it should work in theory.

Simon Mac Donald
http://hi.im/simonmacdonald

P.S. The two best words in a developers toolbox "in theory".


On Tue, Sep 25, 2012 at 7:32 PM, Joe Bowser <bo...@gmail.com> wrote:
> These aren't images that would be used in HTML.  We're talking about
> images that are used in the Java UI portions of the code, such as this
> new camera that we're working on.  The problem is that we have to
> pre-populate each project with these images, which means more nasty
> create script issues, which I personally loathe.  However, Android
> doesn't allow you to just have images in the JAR.  I don't know why
> that is, but that would be a nice feature to have on Android.
>
> It'd be nice if there was a less brittle way of doing it, but I can't
> think of any at the moment..
>
> Joe
>
> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
> <re...@gmail.com> wrote:
>> Could we possibly use base64 encoding for images, and inline them? It would
>> take up 30% more space but it means you can inline them in the html rather
>> than having to package seperate resources?
>>
>> -Mike
>>
>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>>
>>> An icon is one thing, but we're going to have to start shipping UI
>>> elements, which makes things more brittle.  I'm wondering if anyone
>>> has any way of making this less brittle or if we're going to just have
>>> to drop the resources in the /res directory, use our typical mapping
>>> and hope for the best.
>>>
>>> Investigating zoom.  It look like we're going to need some mocks done
>>> up on this end, so I'll have to figure that out.
>>>
>>> Joe
>>>
>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>>> > Don't understand the issue Joe? We already ship a default icon drawable
>>> > resource - what's the issue with more?
>>> >
>>> > On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:
>>> >
>>> >>If someday we were to package the camera plugin as we plan to with 3rd
>>> >>party plugins, we could easily add assets. Several plugins already do
>>> >>this.
>>> >>
>>> >>
>>> >>
>>> >>On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>>> >>
>>> >>> Hey
>>> >>>
>>> >>> So, while doing the UI for the Camera, I just realized that we're
>>> >>> going to have to distribute images with Cordova.  I can see this being
>>> >>> an issue with any plugin that does UI.  Does anyone have any idea how
>>> >>> to solve this issue?
>>> >>>
>>> >>> Joe
>>> >>>
>>> >
>>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Brian LeRoux <b...@brian.io>.
Eh Mike, while possible probably not a great idea and this is
definitely something we need to solve in plugin land properly anyhow.

On Wed, Sep 26, 2012 at 10:14 AM, Mike Reinstein
<re...@gmail.com> wrote:
>> These aren't images that would be used in HTML. We're talking
>> about images that are used in the Java UI portions of the code
>
> Can we inline those assets similar to how base64 encoded data uris work in
> html? I would imagine ios, android, blackberry, etc would allow for
> declaring large byte arrays right in the code. Could those byte blobs then
> be rendered into images in the various UIs?
>
>
>
> On Wed, Sep 26, 2012 at 3:58 AM, Brian LeRoux <b...@brian.io> wrote:
>
>> Not an ideal situation but we do need to address static assets in our
>> plugin packages too.
>>
>> I don't think we ever thought camera was going to be easy...if
>> anything this brings up a great test bed for plugin packaging anyhow.
>>
>> On Wed, Sep 26, 2012 at 1:43 AM, Jesse MacFadyen
>> <pu...@gmail.com> wrote:
>> > This is the same issue as the capture dialogs isn't it?
>> > iOS and WP7 already package resources for making audio recordings.
>> >
>> >
>> > Sent from my iPad
>> >
>> > On 2012-09-25, at 4:32 PM, Joe Bowser <bo...@gmail.com> wrote:
>> >
>> >> These aren't images that would be used in HTML.  We're talking about
>> >> images that are used in the Java UI portions of the code, such as this
>> >> new camera that we're working on.  The problem is that we have to
>> >> pre-populate each project with these images, which means more nasty
>> >> create script issues, which I personally loathe.  However, Android
>> >> doesn't allow you to just have images in the JAR.  I don't know why
>> >> that is, but that would be a nice feature to have on Android.
>> >>
>> >> It'd be nice if there was a less brittle way of doing it, but I can't
>> >> think of any at the moment..
>> >>
>> >> Joe
>> >>
>> >> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
>> >> <re...@gmail.com> wrote:
>> >>> Could we possibly use base64 encoding for images, and inline them? It
>> would
>> >>> take up 30% more space but it means you can inline them in the html
>> rather
>> >>> than having to package seperate resources?
>> >>>
>> >>> -Mike
>> >>>
>> >>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>> >>>
>> >>>> An icon is one thing, but we're going to have to start shipping UI
>> >>>> elements, which makes things more brittle.  I'm wondering if anyone
>> >>>> has any way of making this less brittle or if we're going to just have
>> >>>> to drop the resources in the /res directory, use our typical mapping
>> >>>> and hope for the best.
>> >>>>
>> >>>> Investigating zoom.  It look like we're going to need some mocks done
>> >>>> up on this end, so I'll have to figure that out.
>> >>>>
>> >>>> Joe
>> >>>>
>> >>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>> >>>>> Don't understand the issue Joe? We already ship a default icon
>> drawable
>> >>>>> resource - what's the issue with more?
>> >>>>>
>> >>>>> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com>
>> wrote:
>> >>>>>
>> >>>>>> If someday we were to package the camera plugin as we plan to with
>> 3rd
>> >>>>>> party plugins, we could easily add assets. Several plugins already
>> do
>> >>>>>> this.
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com>
>> wrote:
>> >>>>>>
>> >>>>>>> Hey
>> >>>>>>>
>> >>>>>>> So, while doing the UI for the Camera, I just realized that we're
>> >>>>>>> going to have to distribute images with Cordova.  I can see this
>> being
>> >>>>>>> an issue with any plugin that does UI.  Does anyone have any idea
>> how
>> >>>>>>> to solve this issue?
>> >>>>>>>
>> >>>>>>> Joe
>> >>>>
>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Brian LeRoux <b...@brian.io>.
right, but then an upgrade happens... which can be hairy. ideally we
have a plugins, including core plugins, in a standard package format
and tools for installation and removal of these assets.

I know that sounds complex but really this is just copy->pasting a
bunch of files into the right places and updating any manifests that
need the pathing info b/c the vendor tools are too stupid to read a
fkn directory themselves.


On Wed, Sep 26, 2012 at 10:27 AM, Jesse MacFadyen
<pu...@gmail.com> wrote:
> Yes, that is possible, but the only benefit would be concatenating
> images.... At the price of vast complexity... IMHO
>
> Personally I think the images should be part of the end project. The
> framework supplies a default, simple generic version and app
> developers can replace a few images to get their own look.
>
> Cheers,
>   Jesse
>
> Sent from my iPhone6
>
> On 2012-09-26, at 1:15 AM, Mike Reinstein <re...@gmail.com> wrote:
>
>>> These aren't images that would be used in HTML. We're talking
>>> about images that are used in the Java UI portions of the code
>>
>> Can we inline those assets similar to how base64 encoded data uris work in
>> html? I would imagine ios, android, blackberry, etc would allow for
>> declaring large byte arrays right in the code. Could those byte blobs then
>> be rendered into images in the various UIs?
>>
>>
>>
>> On Wed, Sep 26, 2012 at 3:58 AM, Brian LeRoux <b...@brian.io> wrote:
>>
>>> Not an ideal situation but we do need to address static assets in our
>>> plugin packages too.
>>>
>>> I don't think we ever thought camera was going to be easy...if
>>> anything this brings up a great test bed for plugin packaging anyhow.
>>>
>>> On Wed, Sep 26, 2012 at 1:43 AM, Jesse MacFadyen
>>> <pu...@gmail.com> wrote:
>>>> This is the same issue as the capture dialogs isn't it?
>>>> iOS and WP7 already package resources for making audio recordings.
>>>>
>>>>
>>>> Sent from my iPad
>>>>
>>>> On 2012-09-25, at 4:32 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>>
>>>>> These aren't images that would be used in HTML.  We're talking about
>>>>> images that are used in the Java UI portions of the code, such as this
>>>>> new camera that we're working on.  The problem is that we have to
>>>>> pre-populate each project with these images, which means more nasty
>>>>> create script issues, which I personally loathe.  However, Android
>>>>> doesn't allow you to just have images in the JAR.  I don't know why
>>>>> that is, but that would be a nice feature to have on Android.
>>>>>
>>>>> It'd be nice if there was a less brittle way of doing it, but I can't
>>>>> think of any at the moment..
>>>>>
>>>>> Joe
>>>>>
>>>>> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
>>>>> <re...@gmail.com> wrote:
>>>>>> Could we possibly use base64 encoding for images, and inline them? It
>>> would
>>>>>> take up 30% more space but it means you can inline them in the html
>>> rather
>>>>>> than having to package seperate resources?
>>>>>>
>>>>>> -Mike
>>>>>>
>>>>>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>>>>
>>>>>>> An icon is one thing, but we're going to have to start shipping UI
>>>>>>> elements, which makes things more brittle.  I'm wondering if anyone
>>>>>>> has any way of making this less brittle or if we're going to just have
>>>>>>> to drop the resources in the /res directory, use our typical mapping
>>>>>>> and hope for the best.
>>>>>>>
>>>>>>> Investigating zoom.  It look like we're going to need some mocks done
>>>>>>> up on this end, so I'll have to figure that out.
>>>>>>>
>>>>>>> Joe
>>>>>>>
>>>>>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>>>>> Don't understand the issue Joe? We already ship a default icon
>>> drawable
>>>>>>>> resource - what's the issue with more?
>>>>>>>>
>>>>>>>> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com>
>>> wrote:
>>>>>>>>
>>>>>>>>> If someday we were to package the camera plugin as we plan to with
>>> 3rd
>>>>>>>>> party plugins, we could easily add assets. Several plugins already
>>> do
>>>>>>>>> this.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com>
>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hey
>>>>>>>>>>
>>>>>>>>>> So, while doing the UI for the Camera, I just realized that we're
>>>>>>>>>> going to have to distribute images with Cordova.  I can see this
>>> being
>>>>>>>>>> an issue with any plugin that does UI.  Does anyone have any idea
>>> how
>>>>>>>>>> to solve this issue?
>>>>>>>>>>
>>>>>>>>>> Joe
>>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Jesse MacFadyen <pu...@gmail.com>.
Yes, that is possible, but the only benefit would be concatenating
images.... At the price of vast complexity... IMHO

Personally I think the images should be part of the end project. The
framework supplies a default, simple generic version and app
developers can replace a few images to get their own look.

Cheers,
  Jesse

Sent from my iPhone6

On 2012-09-26, at 1:15 AM, Mike Reinstein <re...@gmail.com> wrote:

>> These aren't images that would be used in HTML. We're talking
>> about images that are used in the Java UI portions of the code
>
> Can we inline those assets similar to how base64 encoded data uris work in
> html? I would imagine ios, android, blackberry, etc would allow for
> declaring large byte arrays right in the code. Could those byte blobs then
> be rendered into images in the various UIs?
>
>
>
> On Wed, Sep 26, 2012 at 3:58 AM, Brian LeRoux <b...@brian.io> wrote:
>
>> Not an ideal situation but we do need to address static assets in our
>> plugin packages too.
>>
>> I don't think we ever thought camera was going to be easy...if
>> anything this brings up a great test bed for plugin packaging anyhow.
>>
>> On Wed, Sep 26, 2012 at 1:43 AM, Jesse MacFadyen
>> <pu...@gmail.com> wrote:
>>> This is the same issue as the capture dialogs isn't it?
>>> iOS and WP7 already package resources for making audio recordings.
>>>
>>>
>>> Sent from my iPad
>>>
>>> On 2012-09-25, at 4:32 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>
>>>> These aren't images that would be used in HTML.  We're talking about
>>>> images that are used in the Java UI portions of the code, such as this
>>>> new camera that we're working on.  The problem is that we have to
>>>> pre-populate each project with these images, which means more nasty
>>>> create script issues, which I personally loathe.  However, Android
>>>> doesn't allow you to just have images in the JAR.  I don't know why
>>>> that is, but that would be a nice feature to have on Android.
>>>>
>>>> It'd be nice if there was a less brittle way of doing it, but I can't
>>>> think of any at the moment..
>>>>
>>>> Joe
>>>>
>>>> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
>>>> <re...@gmail.com> wrote:
>>>>> Could we possibly use base64 encoding for images, and inline them? It
>> would
>>>>> take up 30% more space but it means you can inline them in the html
>> rather
>>>>> than having to package seperate resources?
>>>>>
>>>>> -Mike
>>>>>
>>>>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>>>
>>>>>> An icon is one thing, but we're going to have to start shipping UI
>>>>>> elements, which makes things more brittle.  I'm wondering if anyone
>>>>>> has any way of making this less brittle or if we're going to just have
>>>>>> to drop the resources in the /res directory, use our typical mapping
>>>>>> and hope for the best.
>>>>>>
>>>>>> Investigating zoom.  It look like we're going to need some mocks done
>>>>>> up on this end, so I'll have to figure that out.
>>>>>>
>>>>>> Joe
>>>>>>
>>>>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>>>> Don't understand the issue Joe? We already ship a default icon
>> drawable
>>>>>>> resource - what's the issue with more?
>>>>>>>
>>>>>>> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com>
>> wrote:
>>>>>>>
>>>>>>>> If someday we were to package the camera plugin as we plan to with
>> 3rd
>>>>>>>> party plugins, we could easily add assets. Several plugins already
>> do
>>>>>>>> this.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com>
>> wrote:
>>>>>>>>
>>>>>>>>> Hey
>>>>>>>>>
>>>>>>>>> So, while doing the UI for the Camera, I just realized that we're
>>>>>>>>> going to have to distribute images with Cordova.  I can see this
>> being
>>>>>>>>> an issue with any plugin that does UI.  Does anyone have any idea
>> how
>>>>>>>>> to solve this issue?
>>>>>>>>>
>>>>>>>>> Joe
>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Mike Reinstein <re...@gmail.com>.
> These aren't images that would be used in HTML. We're talking
> about images that are used in the Java UI portions of the code

Can we inline those assets similar to how base64 encoded data uris work in
html? I would imagine ios, android, blackberry, etc would allow for
declaring large byte arrays right in the code. Could those byte blobs then
be rendered into images in the various UIs?



On Wed, Sep 26, 2012 at 3:58 AM, Brian LeRoux <b...@brian.io> wrote:

> Not an ideal situation but we do need to address static assets in our
> plugin packages too.
>
> I don't think we ever thought camera was going to be easy...if
> anything this brings up a great test bed for plugin packaging anyhow.
>
> On Wed, Sep 26, 2012 at 1:43 AM, Jesse MacFadyen
> <pu...@gmail.com> wrote:
> > This is the same issue as the capture dialogs isn't it?
> > iOS and WP7 already package resources for making audio recordings.
> >
> >
> > Sent from my iPad
> >
> > On 2012-09-25, at 4:32 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> >> These aren't images that would be used in HTML.  We're talking about
> >> images that are used in the Java UI portions of the code, such as this
> >> new camera that we're working on.  The problem is that we have to
> >> pre-populate each project with these images, which means more nasty
> >> create script issues, which I personally loathe.  However, Android
> >> doesn't allow you to just have images in the JAR.  I don't know why
> >> that is, but that would be a nice feature to have on Android.
> >>
> >> It'd be nice if there was a less brittle way of doing it, but I can't
> >> think of any at the moment..
> >>
> >> Joe
> >>
> >> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
> >> <re...@gmail.com> wrote:
> >>> Could we possibly use base64 encoding for images, and inline them? It
> would
> >>> take up 30% more space but it means you can inline them in the html
> rather
> >>> than having to package seperate resources?
> >>>
> >>> -Mike
> >>>
> >>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
> >>>
> >>>> An icon is one thing, but we're going to have to start shipping UI
> >>>> elements, which makes things more brittle.  I'm wondering if anyone
> >>>> has any way of making this less brittle or if we're going to just have
> >>>> to drop the resources in the /res directory, use our typical mapping
> >>>> and hope for the best.
> >>>>
> >>>> Investigating zoom.  It look like we're going to need some mocks done
> >>>> up on this end, so I'll have to figure that out.
> >>>>
> >>>> Joe
> >>>>
> >>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
> >>>>> Don't understand the issue Joe? We already ship a default icon
> drawable
> >>>>> resource - what's the issue with more?
> >>>>>
> >>>>> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com>
> wrote:
> >>>>>
> >>>>>> If someday we were to package the camera plugin as we plan to with
> 3rd
> >>>>>> party plugins, we could easily add assets. Several plugins already
> do
> >>>>>> this.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> >>>>>>
> >>>>>>> Hey
> >>>>>>>
> >>>>>>> So, while doing the UI for the Camera, I just realized that we're
> >>>>>>> going to have to distribute images with Cordova.  I can see this
> being
> >>>>>>> an issue with any plugin that does UI.  Does anyone have any idea
> how
> >>>>>>> to solve this issue?
> >>>>>>>
> >>>>>>> Joe
> >>>>
>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Brian LeRoux <b...@brian.io>.
Not an ideal situation but we do need to address static assets in our
plugin packages too.

I don't think we ever thought camera was going to be easy...if
anything this brings up a great test bed for plugin packaging anyhow.

On Wed, Sep 26, 2012 at 1:43 AM, Jesse MacFadyen
<pu...@gmail.com> wrote:
> This is the same issue as the capture dialogs isn't it?
> iOS and WP7 already package resources for making audio recordings.
>
>
> Sent from my iPad
>
> On 2012-09-25, at 4:32 PM, Joe Bowser <bo...@gmail.com> wrote:
>
>> These aren't images that would be used in HTML.  We're talking about
>> images that are used in the Java UI portions of the code, such as this
>> new camera that we're working on.  The problem is that we have to
>> pre-populate each project with these images, which means more nasty
>> create script issues, which I personally loathe.  However, Android
>> doesn't allow you to just have images in the JAR.  I don't know why
>> that is, but that would be a nice feature to have on Android.
>>
>> It'd be nice if there was a less brittle way of doing it, but I can't
>> think of any at the moment..
>>
>> Joe
>>
>> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
>> <re...@gmail.com> wrote:
>>> Could we possibly use base64 encoding for images, and inline them? It would
>>> take up 30% more space but it means you can inline them in the html rather
>>> than having to package seperate resources?
>>>
>>> -Mike
>>>
>>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>
>>>> An icon is one thing, but we're going to have to start shipping UI
>>>> elements, which makes things more brittle.  I'm wondering if anyone
>>>> has any way of making this less brittle or if we're going to just have
>>>> to drop the resources in the /res directory, use our typical mapping
>>>> and hope for the best.
>>>>
>>>> Investigating zoom.  It look like we're going to need some mocks done
>>>> up on this end, so I'll have to figure that out.
>>>>
>>>> Joe
>>>>
>>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>> Don't understand the issue Joe? We already ship a default icon drawable
>>>>> resource - what's the issue with more?
>>>>>
>>>>> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:
>>>>>
>>>>>> If someday we were to package the camera plugin as we plan to with 3rd
>>>>>> party plugins, we could easily add assets. Several plugins already do
>>>>>> this.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>>>>
>>>>>>> Hey
>>>>>>>
>>>>>>> So, while doing the UI for the Camera, I just realized that we're
>>>>>>> going to have to distribute images with Cordova.  I can see this being
>>>>>>> an issue with any plugin that does UI.  Does anyone have any idea how
>>>>>>> to solve this issue?
>>>>>>>
>>>>>>> Joe
>>>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Jesse MacFadyen <pu...@gmail.com>.
This is the same issue as the capture dialogs isn't it?
iOS and WP7 already package resources for making audio recordings.


Sent from my iPad

On 2012-09-25, at 4:32 PM, Joe Bowser <bo...@gmail.com> wrote:

> These aren't images that would be used in HTML.  We're talking about
> images that are used in the Java UI portions of the code, such as this
> new camera that we're working on.  The problem is that we have to
> pre-populate each project with these images, which means more nasty
> create script issues, which I personally loathe.  However, Android
> doesn't allow you to just have images in the JAR.  I don't know why
> that is, but that would be a nice feature to have on Android.
>
> It'd be nice if there was a less brittle way of doing it, but I can't
> think of any at the moment..
>
> Joe
>
> On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
> <re...@gmail.com> wrote:
>> Could we possibly use base64 encoding for images, and inline them? It would
>> take up 30% more space but it means you can inline them in the html rather
>> than having to package seperate resources?
>>
>> -Mike
>>
>> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>>
>>> An icon is one thing, but we're going to have to start shipping UI
>>> elements, which makes things more brittle.  I'm wondering if anyone
>>> has any way of making this less brittle or if we're going to just have
>>> to drop the resources in the /res directory, use our typical mapping
>>> and hope for the best.
>>>
>>> Investigating zoom.  It look like we're going to need some mocks done
>>> up on this end, so I'll have to figure that out.
>>>
>>> Joe
>>>
>>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>>>> Don't understand the issue Joe? We already ship a default icon drawable
>>>> resource - what's the issue with more?
>>>>
>>>> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:
>>>>
>>>>> If someday we were to package the camera plugin as we plan to with 3rd
>>>>> party plugins, we could easily add assets. Several plugins already do
>>>>> this.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>>>>>
>>>>>> Hey
>>>>>>
>>>>>> So, while doing the UI for the Camera, I just realized that we're
>>>>>> going to have to distribute images with Cordova.  I can see this being
>>>>>> an issue with any plugin that does UI.  Does anyone have any idea how
>>>>>> to solve this issue?
>>>>>>
>>>>>> Joe
>>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Joe Bowser <bo...@gmail.com>.
These aren't images that would be used in HTML.  We're talking about
images that are used in the Java UI portions of the code, such as this
new camera that we're working on.  The problem is that we have to
pre-populate each project with these images, which means more nasty
create script issues, which I personally loathe.  However, Android
doesn't allow you to just have images in the JAR.  I don't know why
that is, but that would be a nice feature to have on Android.

It'd be nice if there was a less brittle way of doing it, but I can't
think of any at the moment..

Joe

On Tue, Sep 25, 2012 at 4:26 PM, Mike Reinstein
<re...@gmail.com> wrote:
> Could we possibly use base64 encoding for images, and inline them? It would
> take up 30% more space but it means you can inline them in the html rather
> than having to package seperate resources?
>
> -Mike
>
> On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:
>
>> An icon is one thing, but we're going to have to start shipping UI
>> elements, which makes things more brittle.  I'm wondering if anyone
>> has any way of making this less brittle or if we're going to just have
>> to drop the resources in the /res directory, use our typical mapping
>> and hope for the best.
>>
>> Investigating zoom.  It look like we're going to need some mocks done
>> up on this end, so I'll have to figure that out.
>>
>> Joe
>>
>> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
>> > Don't understand the issue Joe? We already ship a default icon drawable
>> > resource - what's the issue with more?
>> >
>> > On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:
>> >
>> >>If someday we were to package the camera plugin as we plan to with 3rd
>> >>party plugins, we could easily add assets. Several plugins already do
>> >>this.
>> >>
>> >>
>> >>
>> >>On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>> >>
>> >>> Hey
>> >>>
>> >>> So, while doing the UI for the Camera, I just realized that we're
>> >>> going to have to distribute images with Cordova.  I can see this being
>> >>> an issue with any plugin that does UI.  Does anyone have any idea how
>> >>> to solve this issue?
>> >>>
>> >>> Joe
>> >>>
>> >
>>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Mike Reinstein <re...@gmail.com>.
Could we possibly use base64 encoding for images, and inline them? It would
take up 30% more space but it means you can inline them in the html rather
than having to package seperate resources?

-Mike

On Tue, Sep 25, 2012 at 7:19 PM, Joe Bowser <bo...@gmail.com> wrote:

> An icon is one thing, but we're going to have to start shipping UI
> elements, which makes things more brittle.  I'm wondering if anyone
> has any way of making this less brittle or if we're going to just have
> to drop the resources in the /res directory, use our typical mapping
> and hope for the best.
>
> Investigating zoom.  It look like we're going to need some mocks done
> up on this end, so I'll have to figure that out.
>
> Joe
>
> On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
> > Don't understand the issue Joe? We already ship a default icon drawable
> > resource - what's the issue with more?
> >
> > On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:
> >
> >>If someday we were to package the camera plugin as we plan to with 3rd
> >>party plugins, we could easily add assets. Several plugins already do
> >>this.
> >>
> >>
> >>
> >>On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
> >>
> >>> Hey
> >>>
> >>> So, while doing the UI for the Camera, I just realized that we're
> >>> going to have to distribute images with Cordova.  I can see this being
> >>> an issue with any plugin that does UI.  Does anyone have any idea how
> >>> to solve this issue?
> >>>
> >>> Joe
> >>>
> >
>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Joe Bowser <bo...@gmail.com>.
An icon is one thing, but we're going to have to start shipping UI
elements, which makes things more brittle.  I'm wondering if anyone
has any way of making this less brittle or if we're going to just have
to drop the resources in the /res directory, use our typical mapping
and hope for the best.

Investigating zoom.  It look like we're going to need some mocks done
up on this end, so I'll have to figure that out.

Joe

On Tue, Sep 25, 2012 at 4:15 PM, Filip Maj <fi...@adobe.com> wrote:
> Don't understand the issue Joe? We already ship a default icon drawable
> resource - what's the issue with more?
>
> On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:
>
>>If someday we were to package the camera plugin as we plan to with 3rd
>>party plugins, we could easily add assets. Several plugins already do
>>this.
>>
>>
>>
>>On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>>
>>> Hey
>>>
>>> So, while doing the UI for the Camera, I just realized that we're
>>> going to have to distribute images with Cordova.  I can see this being
>>> an issue with any plugin that does UI.  Does anyone have any idea how
>>> to solve this issue?
>>>
>>> Joe
>>>
>

Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Filip Maj <fi...@adobe.com>.
Don't understand the issue Joe? We already ship a default icon drawable
resource - what's the issue with more?

On 9/25/12 1:03 PM, "Mike Reinstein" <re...@gmail.com> wrote:

>If someday we were to package the camera plugin as we plan to with 3rd
>party plugins, we could easily add assets. Several plugins already do
>this.
>
>
>
>On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>
>> Hey
>>
>> So, while doing the UI for the Camera, I just realized that we're
>> going to have to distribute images with Cordova.  I can see this being
>> an issue with any plugin that does UI.  Does anyone have any idea how
>> to solve this issue?
>>
>> Joe
>>


Re: [Android] Distributing Drawable Resources - What is acceptable?

Posted by Mike Reinstein <re...@gmail.com>.
If someday we were to package the camera plugin as we plan to with 3rd
party plugins, we could easily add assets. Several plugins already do this.



On Tue, Sep 25, 2012 at 3:38 PM, Joe Bowser <bo...@gmail.com> wrote:

> Hey
>
> So, while doing the UI for the Camera, I just realized that we're
> going to have to distribute images with Cordova.  I can see this being
> an issue with any plugin that does UI.  Does anyone have any idea how
> to solve this issue?
>
> Joe
>