我有一个自我实现的应用程序类。
我正在尝试从我的应用程序 GCMIntentService 中获取对它的引用。
由于某种原因,它返回 null:
public class GCMIntentService extends GCMBaseIntentService {
private AppVariables app;
private GCMMessageReceiver gcmMessageReceiver;
public GCMIntentService()
{
super(GCMManager.SENDER_ID);
this.app = (AppVariables) getApplication();
this.gcmMessageReceiver = new GCMMessageReceiver(app);
}
}