hi this is my helper class where i check internal connection and xml paersing and use this class to another activity the problem is when server connected is working fine b
Create myToast method in your application class, Like
public void myToast(String msg) {
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
}
and add the following code to your class,
private MyApplication application;
public AgAppHelperMethods(Context context) {
application = (MyApplication)context.getApplication();
}
Finally, call myToast method, where you want, like
applicaion.myToast("msg you want to show");
Note: replace MyApplication with your application class
I have not tested, but this may work for u.