Witam,
Piszę małą aplikację na androida i stworzyłem dodatkową klasę i w niej chcę umieścić metodę tworzącą toasty.
Jednak po napisaniu jej:
private void makeToast(String s){
Toast t = Toast.makeText(this, s, Toast.LENGTH_LONG);
t.show();
pojawia mi się komunikat:
Error:(60, 24) error: no suitable method found for makeText(SumService,String,int)
method Toast.makeText(Context,int,int) is not applicable
(actual argument SumService cannot be converted to Context by method invocation conversion)
method Toast.makeText(Context,CharSequence,int) is not applicable
(actual argument SumService cannot be converted to Context by method invocation conversion)