0

I am using WebTrends analytics in my app. (Ref-http://help.webtrends.com/en/android/)

The WebTrends APIs are written in such a way that the initialization happens ONLY from resources file. They provide webtrends.xml with the sdk and all the parameters are set from the values from this xml file.

Now the problem is I have to set a couple of values dynamically based on our server feed.

Here I have only two choices:

(1) Set WebTrends initialization values in the code which looks impossible from WebTrends SDK. Neither the member variables are exposed outside the library nor there are any setters/methods to set the initialization params.

(2) Create resources from webtrends.xml dynamically or at least set the values for resources dynamically which also seems impossible.

Can anyone please suggest the way out of this deadlock?

Yogesh
  • 311
  • 1
  • 10

1 Answers1

0

You cannot do that. When you add a string resource an automatic entry is made for the resource in R.java file at compile time.

Example:

public static final class string
{
    public static final int app_name=0x7f040000;
} 

where app_name is the name of the string resource. So, it is not possible.

Sankar V
  • 4,794
  • 3
  • 38
  • 56
  • it won't be converted into R.java. When you add a resource an automatic entry is made for the resource example public static final class string { public static final int app_name=0x7f040000;} where app_name is the name of the string resource – Raghunandan May 10 '13 at 10:34