I am trying to display a toast message after the user gets to the main intent.
I try to accomplish that by doing this by the code below but with no success:
On the second activity(MapsActivity) I did:
public void userLocationIsNull(){ Intent intent = new Intent(MapsActivity.this, MainActivity.class); startActivityForResult(intent,1010); }
And on the first activity(MainActivity) I did:
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 1010) { Toast.makeText(this, "System could find your location,please try again", Toast.LENGTH_SHORT).show(); }}
The intent is working,but the Toast is'nt showing,glad to hear your thoughts,thanks.