Thanks Mark! Library project is actually a much easier way to handle multiple versions of one app :)
Thanks again! -Moto! On May 31, 4:21 pm, Mark Murphy <[email protected]> wrote: > Moto wrote: > > I would like to remove the dependency to point to "packagename".R > > since I'm trying to merge free and paid apps into one. The mayor > > problem is the namespace. > > > I'm able to get Context.getPackageName() but how can I convert that > > string to be accessible... i.e. Context.getPackageName().R? > > If you are using Eclipse, you may wish to consider setting up a library > project, since that was designed for the paid/free app scenario: > > http://developer.android.com/guide/developing/eclipse-adt.html#librar... > > If that does not fit your needs, call getResources() to get a Resources > object, then call getIdentifier() to get the ID based upon the package > name, etc. Note that this uses reflection and so therefore is slow, so > please cache your results. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Development Wiki:http://wiki.andmob.org -- 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

