Send Application to background/Paused in Android

Currently i have my application “fully ended” by pressing Back Button in android device.
Thus my application not exist in task manager anymore.

function Update(){ 

How do i make application is paused and still exist in the task manager when back button is pressed? It is the same effect when the home button is pressed.

Hi, so for making the Android back button send the app to the background you can use the following code in any Monobehaviour in the current scene:

    void Update()
        #if UNITY_ANDROID
        //added for Android back button reaction
        if (Input.GetKeyDown(KeyCode.Escape))
            AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
            activity.Call<bool>("moveTaskToBack", true);