如何在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);
        }

以上主要代碼。

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章