×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    88

    How to know: device support GPS ?

    Hi all,


    I want to know: Whether or not device supports GPS device in symbian S60 3rd
    Do I have to do ? Anybody can help me ?

    Thank you very much !
    Best regards,

    Nguyend

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: How to know: device support GPS ?

    I don't know if there exists any API to check this feature directly. This might not be an ideal solution but I would suggest you to try calling Connect() on RPositionServer which would result in TInt error code. You can check that code; if that code is KErrNotSupported(-5) then there is no GPS hardware in that device.
    Nokia Developer Wiki Moderation team

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: How to know: device support GPS ?

    TPositionModuleInfo can tell you for example (EDeviceInternal means that there is a built-in GPS module).

  4. #4
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    88

    Re: How to know: device support GPS ?

    Thank you for reply, I will try!
    Best regards,

    Nguyend

  5. #5
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    88

    Re: How to know: device support GPS ?

    Dear all,

    I use this code

    Code:
    for (TInt moduleIndex = 0; moduleIndex < numModules; moduleIndex++)
    		{
    		TPositionModuleInfo moduleInfo;
    		error = ps.GetModuleInfoByIndex(moduleIndex, moduleInfo);
    		if (error != KErrNone)
    			{
    			continue;
    			}
    
    		TPositionModuleInfo::TDeviceLocation deviceLoc =
    				moduleInfo.DeviceLocation();
    		if (deviceLoc == TPositionModuleInfo::EDeviceInternal)
    			{
    			ps.Close();
    			return ETrue;
    			}
    		}
    
    	ps.Close();
    	return EFalse;
    But when I build on Nokia 6120 (no GPS) this function return TRUE

    May I meet some mistake?
    Best regards,

    Nguyend

Similar Threads

  1. Replies: 5
    Last Post: 2009-01-07, 08:36
  2. Replies: 0
    Last Post: 2006-06-24, 15:07
  3. Is there emulator or device that support JSR205 ?
    By seno_ap in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-02-18, 13:20

Posting Permissions

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