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:38:33 GMT
Ok progress on all this, creating the resource files was actually really
easy, also modifying the manifest is working great. The only thing left is
trying to either modify an attribute of a config file or having access to
the value of android:name= on the existing activity. Anyone have any ideas
on how I could do either of those things?

Lastly is there anyway to pass in a variable that plugin XML can use? I
would like the user to be able to do something like cordova plugin add
[URL] [VOICE_COMMAND]  where voice command is the string they wish to say
to open the application. Any ideas? thanks!

Also chime in on the name of this plugin if you have any opinion :)



On Tue, Dec 24, 2013 at 8:22 AM, Ross Gerbasi <rgerbasi@gmail.com> wrote:

> 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