我有一门课用来在我的活动中获取 GPS 数据。在构造函数中,我将活动的上下文传递给它:
gpsFetcher = new GPSFetcher(this);
在 gpsFetcher 类中我有:
this.context = c.getApplicationContext();
要不就
this.context = c;
然后我用:
Toast.makeText(context, "sometext", Toast.LENGTH_LONG);
但它永远不会出现......我错过了什么吗?可能吗?
谢谢!