How to kill app mobile in katalon

Hi all,
I am trying to change languages with:

RunConfiguration. setMobileDriverPreferencesProperty (“language”, language)
RunConfiguration. setMobileDriverPreferencesProperty (“locale”, “FR”)
Mobile.startExistingApplication(G.G_appPackage)

I found that the language in some pages has not been changed. To change the language for all pages, I had to forcestop the app manually, then run the above command.

I have used Mobile.closeApplication() but the problem still happens. Is there any way to kill the app after each test run?
Thanks a lot!

I have the same question. I want to create test case to verify that tabs in the app browser stay the same after killing the app. Does anyone know how to kill the mobile app in Katalon?

I have resolved it. You can use the code below:

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as G
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*
import utility.Utility as Utility
import io.appium.java_client.android.nativekey.AndroidKey
import io.appium.java_client.android.nativekey.KeyEvent
import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory
import io.appium.java_client.android.AndroidDriver
import io.appium.java_client.AppiumDriver
import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory as MobileDriverFactory
import io.appium.java_client.MobileElement

Mobile.startExistingApplication(G.G_appPackage)
Mobile.delay(5)
AndroidDriver<MobileElement> driver = MobileDriverFactory.getDriver()
driver.pressKey(new KeyEvent(AndroidKey.APP_SWITCH))
Mobile.delay(5)
Utility.TapElement(findTestObject('Object Repository/Android/Public/Close All Application'), "Close All Application", 0)

“Close All Application’”, This is button on mobile (not app)

how do I import that utility ?, i always get error on import utility, the error says : org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, while i run your script

Utility is my class. You can use Mobile.TapElement