×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    can we get cell and mobile info in single click event?

    Hi

    i got all details like cell info(id, local area id etc), Network info, network availability, signal info etc.

    Above all things implemented using Active Object and give all info into the option menu means if we click on cell info than gave cell phone related information, if click on network info than gave network information.

    but my question is how to get all information on single click event. Like if click on GetAllInfo than give all information related to cell, network, signal etc...

    i tried but give me an E32USER-CBase 42, 46 error.

    Code:
    AppUi
    ------
    
    void CMobileDetailsAppUi::HandleCommandL(TInt aCommand)
        {
        switch ( aCommand )
            {
             case EMobileDetailsCmdGetAllInfo:
    			{
    			iMobInfo->GetDetailsL(EGetAllDetails);
    			break;
    			}
            }
        }
    
    
    CMobInfo.cpp
    --------------
    
    
    void CMobInfo::GetDetailsL(TMobInfoRequest aRequest)
    {
    	_LIT(KIssueReq,"In GetDetailsL");
    	CFileLogger::WriteLogL(KIssueReq);
    
    	TInt ret = KErrNone;
    	if(iRequest == ENoMobInfoRequest)
    	{
    		iRequest = aRequest;
    		if (aRequest == EGetAllDetails)
    			{
    			_LIT(KReq,"Get All Details");
    			CFileLogger::WriteLogL(KReq);
    
    		     iMobileNetworkInfo->GetCellId(iCellID,iStatus);
    		     iMobileNetworkInfo->GetCurrentNetwork(iMobNetInfo,iStatus);
                    	}
    	}
    	SetActive();
    }
    
    
    
    void CMobInfo::RunL()
        {
    		_LIT(KRun,"In RunL");
    		CFileLogger::WriteLogL(KRun);
    		iMobDetails.Zero();
    
    		TBuf<256> buf;
    		if(iStatus.Int() == KErrNone)
    		{
    			if (iRequest == EGetAllDetails)
    				{
    					_LIT(KCellId,"Cell ID=> ");
    					CFileLogger::WriteLogL(KCellId);
    
    					iMobDetails.Append(KCellId);
    
    					iMobDetails.AppendFormat(_L(" Country Code: %d"),iCellID().iCountryCode);
    					iMobDetails.AppendFormat(_L(" N/W ID: %d"),iCellID().iNetworkIdentity);
    					iMobDetails.AppendFormat(_L(" Area Code: %d"),iCellID().iLocationAreaCode);
    					iMobDetails.AppendFormat(_L(" Cell ID: %d"),iCellID().iCellId);				
    					CFileLogger::WriteLogL(iMobDetails);
    
    CFileLogger::WriteLogL(KNullDesC);
    					_LIT(KNetWorkInfo,",CURRENT NETWORK INFO=> ");
    					CFileLogger::WriteLogL(KNetWorkInfo);
    
    					iMobDetails.Append(KNetWorkInfo);
    					iMobDetails.Append(_L(" N/W Id: "));
    					iMobDetails.Append(iMobNetInfo.iNetworkIdentity);
    					iMobDetails.Append(_L(" DispTag: "));
    					iMobDetails.Append(iMobNetInfo.iNetworkDisplayTag);
    					iMobDetails.Append(_L(" LongName: "));
    					iMobDetails.Append(iMobNetInfo.iNetworkLongName);
    					iMobDetails.Append(_L(" ShortName: "));
    					iMobDetails.Append(iMobNetInfo.iNetworkShortName);
    					iMobDetails.Append(_L(" NW Country Code: "));
    					iMobDetails.Append(iMobNetInfo.iNetworkCountryCode);
    					CFileLogger::WriteLogL(iMobDetails);
    				}
            GetDetails();
    	else
    		{
    		buf.SetLength(0);
    		buf.AppendFormat(_L("Mobinfo Error: [%d]"),iStatus.Int());
    		CFileLogger::WriteLogL(buf);
    		}
    	_LIT(KEndRun,"End RunL Function");
    	CFileLogger::WriteLogL(KEndRun);
    	iRequest = ENoMobInfoRequest;
        }
    
    
    void CMobInfo::GetDetails()
    	{
            iAppUi->GetAllMobDetails(iMobDetails);
    	}

    void CMobileDetailsAppUi::GetAllMobDetails(const TDesC& aMobDetails)
    {
    write data into the file
    }
    Tanya

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

    Re: can we get cell and mobile info in single click event?

    If you Create separate AO for each request / information you want then only you can get all the informations.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: can we get cell and mobile info in single click event?

    The reason for E32USER-CBase 42 is that already the Active Object (AO) is active and you are trying to call a SetActive() again. So it is always a best practice by checking the status of the AO using IsActive(). In your API, GetDetailsL() you're calling the async function inside a if-condition and called the SetActive() out side the if-condition, that is not safe. More over as skumar_rao stated you're not supposed to call multiple AO request simultaniously. You can find an example here: DevInfo - Get the IMEI, IMSI, CellId etc., synchronously on 3.x devices.

  4. #4
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: can we get cell and mobile info in single click event?

    Hi thanks

    you mean if i need

    1. Cell Info
    2. Network Info
    3. mobile Info
    4. battery Info

    than i make 4 AO in 4 Different Class File???

    Tanya

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

    Re: can we get cell and mobile info in single click event?

    Yes you got it right.

  6. #6
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: can we get cell and mobile info in single click event?

    Quote Originally Posted by Tanya View Post
    Hi thanks

    you mean if i need

    1. Cell Info
    2. Network Info
    3. mobile Info
    4. battery Info

    than i make 4 AO in 4 Different Class File???

    Tanya
    Not exactly. I request you to check the link which I've provided in my previous post. There you will find how to implement it.

  7. #7
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: can we get cell and mobile info in single click event?

    But i used FP2 2nd Edition so it gives me an file corrupted error.

    Tanya

  8. #8
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: can we get cell and mobile info in single click event?

    hi,

    Quote Originally Posted by Tanya View Post
    you mean if i need

    1. Cell Info
    2. Network Info
    3. mobile Info
    4. battery Info

    than i make 4 AO in 4 Different Class File???
    4 AO's not needed at all u can do it in a single AO itself..

    Its been discussed in this forum alot so plz search for the keywords "cellid" ,"batery status" etc in this forum..

    you will get the links of it..


    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  9. #9
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: can we get cell and mobile info in single click event?

    Quote Originally Posted by Tanya View Post
    But i used FP2 2nd Edition so it gives me an file corrupted error.

    Tanya
    But still you can go through the code and use the logic (not the exact code snippets).

  10. #10
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: can we get cell and mobile info in single click event?

    i have a mobinfo Example and also search but i do not find out all information stored only on single variable in single process.

    Tanya

  11. #11
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: can we get cell and mobile info in single click event?

    thanks vin2ktalks

    i try to implement second AO.

    tanya

  12. #12
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: can we get cell and mobile info in single click event?

    Hi

    Anybody have a other solution of my problem??

    i want to take information cell id, mobile info, network info, battery level, signal level... and i make different different class with Active Class. but it's make a very lengthy project for get small details.

    i think it's not proper because i already work with 3 active classes and for get above details i need more active classes.

    So please if anybody knows that take all details on only single event than please help me.

    Tanya

  13. #13
    Regular Contributor
    Join Date
    Mar 2007
    Location
    "On a b'ful lil palnet called EARTH belongs wid Galaxy named MilkyWay in Universe"
    Posts
    402

    Re: can we get cell and mobile info in single click event?

    Quote Originally Posted by Tanya View Post
    Hi

    Anybody have a other solution of my problem??

    i want to take information cell id, mobile info, network info, battery level, signal level... and i make different different class with Active Class. but it's make a very lengthy project for get small details.

    i think it's not proper because i already work with 3 active classes and for get above details i need more active classes.

    So please if anybody knows that take all details on only single event than please help me.

    Tanya

    refer dis, may b helpful 4 u..

    http://newlc.com/Retrieving-IMEI-IMSI-Network-Info.html
    ===With Symbian===
    "Something Has Survived..!!!"

  14. #14
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: can we get cell and mobile info in single click event?

    Thanks

    But i worked on Symbian S60 FP2 2nd Edition.

    Tanya

  15. #15
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: can we get cell and mobile info in single click event?

    Quote Originally Posted by Tanya View Post
    Hi

    Anybody have a other solution of my problem??

    i want to take information cell id, mobile info, network info, battery level, signal level... and i make different different class with Active Class. but it's make a very lengthy project for get small details.

    i think it's not proper because i already work with 3 active classes and for get above details i need more active classes.

    So please if anybody knows that take all details on only single event than please help me.

    Tanya
    No need of creating different AOs. Create one AO with in that have an enum for different purpuse. Now create different APIs for gathering different informations, like cell id mobile info etc. Each time while calling your api for a specific purpose set the enum to the curresponding value.

Similar Threads

  1. Need to know cell Info display
    By skeelawat in forum General Development Questions
    Replies: 1
    Last Post: 2006-11-11, 22:20
  2. cell area info
    By sudhinma in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-10-26, 12:46
  3. cell area info
    By sudhinma in forum Mobile Java General
    Replies: 0
    Last Post: 2006-10-26, 12:44
  4. Getting Cell Info
    By rameshkannank in forum General Development Questions
    Replies: 1
    Last Post: 2005-09-23, 12:33
  5. How to read cell info from mobile phone?
    By andresfulo in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2004-10-26, 08:56

Posting Permissions

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