On Jan 19, 5:19 pm, Nikolay Elenkov <nikolay.elen...@gmail.com> wrote:
> On Fri, Jan 20, 2012 at 1:14 AM, petter <petter.gus...@gmail.com> wrote:
> > How can I get a user-defined sysproperty in an Android app?
>
> > In a plain Java app I can do something like:
>
> >    <target name="run" depends="git.revision">
>
> Looks more like Ant than plain Java...

Correct. Ant building a plain java app.

> > And in main.java I do:
>
> >    String gitSha1 = System.getProperty("git.revision");
>
> > But how can I do this in an Android App? I can get predefined system
> > properties like "java.specification.vendor" etc. but I don't know how
> > to attach my userdefined sysproperty to the dex generation.
>
> Calling System.setProperty() on startup? (the property will only be
> visible to the app process).

I need to pass them from ant to my app somehow. ISeems like file
generation is the best option.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to