Greivin Lopez wrote:
> jotobjects I'm going to try what you suggest. It seems more like what
> I'm looking for. And also let you know what was the result. Thanks.
>
> With conditional compilation I refer of something more like an
> attribute that let you tell the compiler to either use one method or
> another.
>
> I would like to use something like:
>
> @Conditional(SDK: 4)
> public void SmsMethod() {
> // Uses android.telephony.gsm.SmsManager
> }
>
> @Conditional(SDK: 3)
> public void SmsMethod() {
> // Uses android.telephony.SmsManager
> }
>
> So I could easyly accomplish all of my goals with a very elegant and
> clear solution and without any compilation errors. Of course there
> isn't any attribute like that. But I would like to have one. Maybe in
> the future we could have something like that in Android.
So, write yourself a script to handle your proposed @Conditional tag,
perhaps using XDoclet:
http://xdoclet.sourceforge.net/xdoclet/index.html
Or, use JavaPP:
http://www.slashdev.ca/javapp/
Based on the trackback, it looks like Fred Grott might already be using
JavaPP for Android development.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android App Developer Books: http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---