×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Extracting data like Call List, SMS List, Installed Applications List

    Hi, I'have to write a Symbian C++ code to extract data like Incoming/Outcoming Call List, SMS List, Installed Applications List...could anybody help me?!?!

    Thank you...

    Christian

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Hi,

    You may find some examples and information by searching the Wiki. For example, this article shows how to retrieve all the applications installed on the phone.

    I hope I understood what you meant.
    Last edited by bogdan.galiceanu; 2008-12-18 at 16:22.

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    It is very useful!..Thank you...and Merry Christmas!

    Christian

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    I'm trying to use the code you posted me, but after the building of the project i have these errors:

    Undefined symbol: 'RApaLsSession::RApaLsSession(void) (??0RApaLsSession@@QAE@XZ)'
    Undefined symbol: 'int RFs::Connect(int) (?Connect@RFs@@QAEHH@Z)'
    Undefined symbol: 'int RApaLsSession::Connect(void) (?Connect@RApaLsSession@@QAEHXZ)'
    Undefined symbol: 'int RFile::Replace(class RFs &, class TDesC16 const &, unsigned int) (?Replace@RFile@@QAEHAAVRFs@@ABVTDesC16@@I@Z)'
    Undefined symbol: 'TApaAppInfo::TApaAppInfo(void) (??0TApaAppInfo@@QAE@XZ)'
    Undefined symbol: 'int RApaLsSession::GetAllApps(void) const (?GetAllApps@RApaLsSession@@QBEHXZ)'
    Undefined symbol: 'int RFile::Write(class TDesC8 const &) (?Write@RFile@@QAEHABVTDesC8@@@Z)'
    Undefined symbol: 'int RApaLsSession::GetNextApp(class TApaAppInfo &) const (?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@@Z)'
    Undefined symbol: 'void RFile::Close(void) (?Close@RFile@@QAEXXZ)'
    Undefined symbol: 'void RApaLsSession::Close(void) (?Close@RApaLsSession@@QAEXXZ)'

    could you explain me how to use the code you posted me, please?

    I'm starting now to study SYMBIAN OS and programming on it, so i'm not very good now!

    I need to extract some data for other reasons...

    Thank you!

    Christian

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Extracting data like Call List, SMS List, Installed Applications List

    above all are linker error, so you are missing libs in your mmp / project

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Just a small hint: as you can see, those "undefined symbol"-s are methods of classes. You should simply check the documentation of them in the SDK Help, and you will get the necessary libraries (they are listed at the top of the SDK help page for each class, so the method itself is not important at this point).

  7. #7
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    I know they are linker errors, I included the necessary libraries but probably i missed something.

    Here is my code:

    // INCLUDE FILES
    #include <f32file.h> // link against efsrv.lib
    #include <apgcli.h> // link against apgrfx.lib, apparc.lib

    // This is a GCCE toolchain workaround needed when compiling with GCCE
    // and using main() entry point
    #ifdef __GCCE__
    #include <staticlibinit_gcce.h>
    #endif

    _LIT(KFileName, "c:\\applications.txt");
    const TInt KMaxSize = 512;

    LOCAL_C void WriteAppInfoToFileL();

    int main(void)
    {
    WriteAppInfoToFileL();
    return 0;
    }

    LOCAL_C void WriteAppInfoToFileL()
    {
    RFs fs;
    RFile file;
    RApaLsSession lsSession;

    // Connect to file server
    User::LeaveIfError( fs.Connect() );
    CleanupClosePushL( fs );

    // Connect to application architecture server
    User::LeaveIfError( lsSession.Connect() );
    CleanupClosePushL( lsSession );

    // Open (replace if exists) the file for writing
    file.Replace( fs, KFileName, EFileWrite | EFileStreamText );
    CleanupClosePushL( file );

    TApaAppInfo appInfo;
    TBuf<KMaxSize> buf;
    TBuf8<KMaxSize> fileBuf;

    // Get info on all apps, then iterate through each app
    // and write its info (caption, name, uid) to file
    lsSession.GetAllApps();
    while( lsSession.GetNextApp( appInfo ) == KErrNone )
    {
    buf.Zero();
    buf.AppendNum((TUint)appInfo.iUid.iUid, EHex);
    buf.Append( _L("\t") );
    buf.Append( appInfo.iCaption );
    buf.Append( _L("\t") );
    buf.Append( appInfo.iFullName );
    fileBuf.Copy( buf );
    fileBuf.Append( _L("\n") );
    file.Write( fileBuf );
    }

    CleanupStack::PopAndDestroy( 3 ); // file, lsSession, fs
    }

    In the Includes folder of my project there is the folder containing the libraries I inclued in the code.

    I don't understand why i have those errors.

  8. #8
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Code:
    // INCLUDE FILES
    #include <f32file.h>    // link against efsrv.lib
    // i.e. add LIBRARY efsrv.lib statement to the *.MMP file
    #include <apgcli.h>     // link against apgrfx.lib, apparc.lib
    // i.e. add LIBRARY apgrfx.lib apparc.lib statement to the *.MMP file
    
    // This is a GCCE toolchain workaround needed when compiling with GCCE
    // and using main() entry point
    #ifdef __GCCE__
    #include <staticlibinit_gcce.h>
    #endif
    
    _LIT(KFileName, "c:\\applications.txt"); 
     const TInt KMaxSize = 512;
     
     LOCAL_C void WriteAppInfoToFileL();
    
    int main(void)
    	{
    	WriteAppInfoToFileL();
    	return 0;
    	}
    
    LOCAL_C void WriteAppInfoToFileL()
       {
       RFs fs;
       RFile file;
       RApaLsSession lsSession;
       
       // Connect to file server
       User::LeaveIfError( fs.Connect() );
       CleanupClosePushL( fs );
       
       // Connect to application architecture server
       User::LeaveIfError( lsSession.Connect() );
       CleanupClosePushL( lsSession );
       
       // Open (replace if exists) the file for writing
       file.Replace( fs, KFileName, EFileWrite | EFileStreamText );
       CleanupClosePushL( file );
       
       TApaAppInfo appInfo;
       TBuf<KMaxSize>  buf;
       TBuf8<KMaxSize> fileBuf;
       
       // Get info on all apps, then iterate through each app  
       // and write its info (caption, name, uid) to file
       lsSession.GetAllApps();  
       while( lsSession.GetNextApp( appInfo ) == KErrNone )
         {
         buf.Zero();
         buf.AppendNum((TUint)appInfo.iUid.iUid, EHex); 
         buf.Append( _L("\t") );
         buf.Append( appInfo.iCaption );
         buf.Append( _L("\t") );
         buf.Append( appInfo.iFullName );
         fileBuf.Copy( buf );
         fileBuf.Append( _L("\n") );
         file.Write( fileBuf );
         }
         
       CleanupStack::PopAndDestroy( 3 ); // file, lsSession, fs
       }
    ... and delete the libraries from your project's directory, their place is in SDK.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  9. #9
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Thank you!!!...now it's working fine!!!
    I'm not very good with MMP file!!!

    However the libraries are not in my project's directory, it is only the link shown by Carbide! (I'm not so stupid!!!)

    Thank you so much!

  10. #10
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Quote Originally Posted by christianproietti View Post
    ...(I'm not so stupid!!!)
    That is good. You've scared me for a second
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  11. #11
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    I'm interested also in extracting Email List, Contact List and Calendar entries, could anybody post me some code, please?!

    Thank you.

    Christian

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Consider checking related examples then...
    Since you are successful in hiding the SDK you use, it is hard to suggest an actual one, however recent SDK-s (S60 3rd and 5th edition ones) surely contain an example called Contacts.
    You can also check the Docs section above, here is how it works: you click on Docs, then Documentation, then select Symbian C++, and there you are. Messaging-related examples will be in the Messaging section, PIM (Personal Information Management - like calendar or contacts) examples are in the PIM section.
    And do not forget the Wiki, it is still there.

  13. #13
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    S60 3rd edition FP2!...thank you for what you suggested me!...

    Christian

  14. #14
    Registered User
    Join Date
    Dec 2008
    Posts
    8

    Re: Extracting data like Call List, SMS List, Installed Applications List

    I didn't find any useful examples there. I'm interesting in extracting Email List, Contact List and Calendar entries in format like .txt or .csv .

  15. #15
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Extracting data like Call List, SMS List, Installed Applications List

    Well, the examples are there. If you see an example filling a lisbox with contacts (like the Contacts example), you can bet that it is also possible to write that data to a file instead of feeding to a list...

Similar Threads

  1. Replies: 2
    Last Post: 2007-11-10, 13:19
  2. 6680 and bluetooth service profiles
    By ceruault in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-08, 22:24
  3. retrieving the list of installed applications
    By wfettich in forum Symbian
    Replies: 2
    Last Post: 2004-10-10, 17:29
  4. Replies: 1
    Last Post: 2004-04-29, 20:44
  5. Installed applications list
    By chrispazz in forum Symbian
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×