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?
使用StartActivityForResult
和OnActivityResult
http://developer.android.com/training/basics/intents/result.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.