2013-05-16 3 views

답변

1

당신은 정적 변수로 Application 구현의 객체에 대한 참조를 저장하고 정적 인 방법을 사용하여 얻을 수 있습니다 :

private static Application sInstance; 

@Override 
public void onCreate() 
{ 
    sInstance = this; 
    ACRA.init(this); 
    super.onCreate(); 
} 
public static Application getInstance() 
{ 
    return sInstance; 
} 
+0

들으은 정적 옵션을 기억하지 않았다! –