如何在S60 3rd的手机上显示所有已安装程序的Uid

原文:http://www.newlc.com/How-to-Display-the-Uid-of.html
翻译byLeehttp://www.symbianx.cn/viewthread.php?tid=11

如何在S60 3rd的手机上显示所有已安装程序的Uid

一个应用程序它可以显示设备上所有已安装程序的Uid。

该程序从S60 2.x 移植到 S60 3.x

S60 2.x的源代码可以在Forum Nokia 找到,下面的代码是S60 3.0的。

概要:

以下代码将显示手机上安装的应用程序的Uid,它使用了下面的类。

        RApaLsSession iLsSession;
        MAppUidObserver& iObserver;
        RArray<TAppInfo> iApps;



       class TAppInfo
        {
                 public:
          TInt32 iAppUid;
          TApaAppCaption iAppCaption;               
        };

         void CAppUidViewerEngine::AppsToUiL()
        {
        TApaAppInfo apaAppInfo;
        TAppInfo appInfo;
        iApps.Reset();

        // Get info on all apps, then iterate through each app
        User::LeaveIfError(iLsSession.GetAllApps());
        while(iLsSession.GetNextApp(apaAppInfo) == KErrNone)
                {
                appInfo.iAppCaption = apaAppInfo.iCaption;
                appInfo.iAppUid = apaAppInfo.iUid.iUid;
                User::LeaveIfError(iApps.Append(appInfo));
                }
               
        //  iObserver.AppsFoundL(iApps);
        }

以上主要代码。

 

猜你喜欢

转载自blog.csdn.net/windcao/article/details/1563163