Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to programatically exit your program and not have it as a background process?

$
0
0

https://forums.xamarin.com/discussion/18156/how-to-close-my-app?


Very confused by the Dependency Service example at the present time.

Isn't there a simple code recipe example to KillProcess to kill the application for Android Project in Xamarin? Such as a simple form with a KillProcess button that actually kills the process would be very helpful to those of us just learning Xamarin for Android.

Using Microsoft Visual Basic (for Windows) it is extremely easy to exit a program. For Example:

 Me.Close()
 End

It seems very unnatural and very unintuitive to leave a program running when you want to cleanly exit it. As long time Windows Developers, we are not used to leaving programs running in the background unless we use a minimize button.

The reason that we want to cleanly exit the program is to allow someone to use the resources used by the program such as a camera when they are finished with our custom application.

We used the TabHostWalkthrough sample and added a camera preview on it as well as a lot of other features... We have tried the "Finish();" call but that only minimizes the program and doesn't UNLOAD it from the running tasks in the Android Device.

:\


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>