how can i get a list of already installed application

  • Автор темы Автор темы mta
  • Дата начала Дата начала
  • Теги Теги
    list apps

mta

Client
Регистрация
12.01.2020
Сообщения
144
Реакции
11
Баллы
18
In my project, I need a list of apps to avoid installing it twice. How can I get the list of all application?

:bc: :bc: :bc: :bc: :bc: :bc:
 
In my project, I need a list of apps to avoid installing it twice. How can I get the list of all application?
C#:
Развернуть Свернуть Копировать
var droid = instance.DroidInstance;
//check
var isInstalled = droid.App.IsInstalled("com.android.chrome");
if (!isInstalled){
    //install
    droid.App.InstallApk(project.Path + "chrome.apk");
}
C#:
Развернуть Свернуть Копировать
// other useful methods
var droid = instance.DroidInstance;
string[] allPackages = droid.App.GetListPackages();
string[] systemPackages = droid.App.GetListSystemPackages();
string[] installedPackages = droid.App.GetListUserPackages();
string frontmostPackage = droid.App.Top;
 
  • Оценить
Реакции: mta

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)