the method getApplicationContext() is undefined

前端 未结 4 1135
心在旅途
心在旅途 2020-12-03 10:53
public void onProviderDisabled(String provider) {
    Toast.makeText(getApplicationContext(), \"Gps Disabled\", Toast.LENGTH_SHORT);


}

So this is

4条回答
  •  星月不相逢
    2020-12-03 11:48

    I resolve this by extending Application class, my class is AppController:

    public class AppController extends Application{
        ...
    }
    

提交回复
热议问题