I am trying to Show Toast on Server Status
These are my Types of JSONdata
from Server
1) {
\"status\": \"200\",
\"response\": {
Try it doing this way
runOnUiThread(new Runnable() {
@Override
public void run() {
//Your Toast Here
}
});
You can easily achieve this with Handler
inside your doInBackground
method:
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(), "Your text here", Toast.LENGTH_SHORT).show();
//your toast here
}
});