Forum Discussion

suvidhshetty's avatar
suvidhshetty
Contributor
10 years ago

Need a way to remove the app from recent applist,

 

Hi,

 

 

I have scenario where I need to remove the tested App from recent App list in Android.

 

Issue is I am not able to click on recent App button using TC.

 

Is there any way where we can acomplish this using TC script.

 

Thanks

Suvidh

 

 

 

2 Replies

  • Hi Suvidh,

     

    I think you need to create a script that will remove your application by using special methods, like adb remove or shell execute.

    Please let me know if this suggestion works for you.

    • anhvu's avatar
      anhvu
      Frequent Contributor

      Hi,

       

      You can use the function as below.

       

      //Example for package: com.tmobile.pr.com

       

       

      function uninstall_App_with_ADB(device,package)
      {
      var status = true;
      var msg = "";
      if(Mobile["Device"](device)["Exists"])
      {
      Mobile["Device"](device)["ShellExecute"]("adb shell pm uninstall "+package)

      }
      else
      {
      status = false;
      msg = Log["Error"]("uninstallAppwithADB: "+"Failed!"+" The device is not existed!")

      }

      }

       

      Download and install the Android System Info and use it to check your app package.