cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gerbasi <rgerb...@gmail.com>
Subject Re: Google Glass Support
Date Tue, 24 Dec 2013 14:22:02 GMT
I really do like the idea of using the plugin XML, I think Axel has a good
start but as mentioned is there a way to handle xml resources via a plugin?
I need to copy a couple files (or write some xml) into the resources folder
then I also need to make an addition to strings.xml in the values
resources.

Lastly it would be nice to be able to add the intent to an existing
activity instead of having to create an activity just for glass. The
template for android already has the activity I wish to run I just need to
change the intent for it. Otherwise is there anyway to get the name of the
current activity for use in my own?

I guess it would be nice if the plugin could have more then just
plugin.xml, possible a node script that also ran that would allow me to
actually do modifications myself?

Finally if I do go through with the plugin setup what do you all think
about names for these plugins. Should it be something like
cordova-glass-core which then opens the potential to have
cordova-glass-voice, cordova-glass-camera, etc?

Dan - I already have a working hook, but it all feels dirty. It is an
after_platform_add hook that then modifies your android project. It just
doesn't feel clean doing it this way, a plugin would be much nicer.

-ross


On Tue, Dec 24, 2013 at 7:05 AM, Dan Moore <moore234@yahoo.com> wrote:

> Hi Ross.
>
> Wow, this will be really cool!
>
> You can manipulate the Android manifest and listen for intents with a
> plugin.  See this example plugin.xml that does so:
> https://github.com/8zrealestate/android-referrer-plugin/blob/master/plugin.xml
>
> Some of the limits of plugins right now (unless things have radically
> changed since I looked at them in Cordova 3.0):
> * you cannot remove nodes from an xml file
> * you cannot change values or attributes of xml file nodes
> * you can't modify any other kind of file.
>
> If you need to do any of the above kind of file manipulation, you should
> use a hook.  But I don't know a way to include a hook into a plugin.
>
> --
> Dan Moore
> https://leanpub.com/developingwithcordovacli/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message