Reputation: 817
I have an android app I am developing on Visual Studio Xamarin.Android In my app I create a .pdf file and launch any .pdf apps using an intent. Code Below...
Android.Net.Uri uri = Android.Net.Uri.FromFile(file);
Intent intent = new Intent(Intent.ActionView);
intent.SetDataAndType(uri, application);
intent.SetFlags(ActivityFlags.TaskOnHome | ActivityFlags.NewTask );
StartActivity(intent);
My question is: When I click the back button on the application I opened using the intent, it goes to the android home screen. How do I make it go back to the application it was launched from?
Upvotes: 0
Views: 675
Reputation: 8877
Use StartActivityForResult
and OnActivityResult
http://developer.android.com/training/basics/intents/result.html
Upvotes: 1