I make this program move to another activity in order to get some data, and then return the data using intent to my main activity. The code that I have at the moment opens a new action, it receives and sends data, but it seems to "restart" my main activity when the "End" () function is called.
Question: How to stop my second process by restarting my main activity?
Primary activity:
Intent intent = new Intent(AndroidVideoPlayer.this, FileChooser.class); intent.putExtra("dir", 1); startActivityForResult(intent, requestCode); @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { Log.d("CheckStartActivity","onActivityResult and resultCode = "+resultCode);
Secondary activity:
Intent intent = new Intent(FileChooser.this,AndroidVideoPlayer.class); intent.putExtra("stringPath",intentPath1); setResult(1,intent); finish();
source share