Exemple #1
0
        public ContentDetailPage(string PackageName)
        {
            InitializeComponent();

            this.PackageName = PackageName;

            AppInfo = DependencyService.Get <IProcessInfo>();

            PackageItem pkgitem = AppInfo.GetPackageInfo(PackageName);

            string sCacheInfo = AppInfo.GetPackageCache(PackageName);

            lblPackageName.Text    = string.Format("패키지명: {0}", pkgitem.PackageName);
            lblInstallTime.Text    = string.Format("설치일: {0}", pkgitem.InstallTime);
            lblUpdateTime.Text     = string.Format("업데이트일: {0}", pkgitem.UpdateTime);
            lblApkFilePath.Text    = string.Format("APK 경로: {0}", pkgitem.ApkFilePath);
            lblFilesize.Text       = string.Format("APK 파일 사이즈: {0}", pkgitem.Filesize);
            lblPermissionInfo.Text = string.Format("권한: {0}", pkgitem.PermissionInfo);
            lblCacheInfo.Text      = string.Format("임시파일 삭제: {0}", sCacheInfo);

            ImageSource icon = AppInfo.GetPackageIcon(pkgitem.PackageName);

            if (icon == null)
            {
                icon = "Android.png";
            }
            PackageIcon.Source = icon;

            PackageLabel.Text   = AppInfo.GetPackageLabel(pkgitem.PackageName);
            PackageVersion.Text = pkgitem.VersionName;


            NavigationPage.SetHasNavigationBar(this, false);
        }
Exemple #2
0
        private void LoadData()
        {
            AppInfoList.Clear();
            List <string> lstPackage = AppInfo.GetAllPackageNames();

            for (int i = 0; i < lstPackage.Count; i++)
            {
                ImageSource icon = AppInfo.GetPackageIcon(lstPackage[i].ToString());
                if (icon == null)
                {
                    icon = "Android.png";
                }

                string sPackageLabel = AppInfo.GetPackageLabel(lstPackage[i].ToString());
                string PackageName   = lstPackage[i].ToString();
                AppInfoList.Add(new PackageListItem(icon, sPackageLabel, PackageName));
            }
        }