i am writing a code where i get a string value in a class that extends BaseAdapter. I want this value to be used in another class that extends an Overlay. If my class extends an Activity i can use intent,putstring() and getString, but is to be used for these above specified classes..Can anyone tell me how can i do this. Thanks in advance.
Share
You can either make your variable global or make a singleton FileHelper class that contains values you want to pass between classes.
MyClass:
and if you want to use it in
OtherClass:
If your the FileHelper use this:
You can use the FileHelper with this: