I wanna know can we close the application(Adobe reader for Pdf,DocumentsToGo for PPt) which are used to open implicit intent after activity result, for example:
File file = ClassName.this.getFileStreamPath(fileName);
file.setReadable(true, false);
Uri path = Uri.fromFile(file);
contId = contentId[position];
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
try {
startTime = System.currentTimeMillis();
startActivityForResult(intent, 6002);
} catch (ActivityNotFoundException e) {
Toast.makeText(Introduction.this,
"No Application Available to View PDF",
Toast.LENGTH_SHORT).show();}
is used to view pdf when i press back button i get the onactivityResult but after that if i'll minimize my application , the adobe reader continues to open in background I can see adobe with that opened file in task manager . Sorry if my question is not clear. Answers will be appreciated.
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 6002) {
endTime = System.currentTimeMillis();
duration = endTime - startTime;
durationString = "" + duration;
save();
finish();
}
}