次のようなカスタムアプリケーションクラスを作成しました。
class A extends android.app.Application{
public String abc = "xyz";
}
そして、私は単純なJavaクラスを持っています
class B {
private appContext;
// This constructor is called from activity.
B(Context ctx){
this.appContext = ctx;
}
private void foo(){
// want to access Class A's abc String vairable Here...HOW TO DO THAT?????
}
}
fooメソッドで変数Aのabc文字列にアクセスする方法。