×

Discussion Board

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 36
  1. #16
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    13

    Re: JSR 293: LBS Goes Social

    So as part of the specification, we are in the process of registering with IANA two known SMS ports for location exchange purposes. IANA controls a range of SMS ports that have a known service handler listening to that port; this is exactly the same concept as in TCP/IP world. For example, Wap Push is assigned port 2948, so that whenever there is a SMS coming to that port, the device knows that this is a Wap Push message.

    Now, the two ports what we'll register is for these use cases:

    1) the first port X would be dedicated to incoming location messages. The messages must be in the Landmark Exchange Format as specified in JSR293 specification. When this message is received, the handler is started on the device and it will give the user an option eg. to view the landmark on a map.

    2) second port Y would be dedicated for incoming location requests. Location request SMS is sent by someone who wants to get to know your location. The TP-User-Data field of the SMS may be empty, or contain user-generated message, such as "Hey, where you at? wanna have lunch?" The fact that this message was received in the dedicated port identifies it as a location request, thus the TP-User-Data field may also be empty. The sender is identified by the sender MSISDN. When the recipient receives a location request, the handler will prompt the user whether the user wants to response her/his current location, or based on trust policy, it will respond to request automatically. For example, you could set that your wife is able to get your location automatically. By user acceptance or privacy policy permitting, the device performs positioning and then response is sent back to sender's MSISDN/port X (use case 1) with a message formatted in 293's Landmark Exchange Format.

    Cool, huh? I have been many years wondering why this kind of peer-to-peer location exchange has not yet been standardized...


    Quote Originally Posted by kevin_s2f View Post
    Carl, your demo code showed how to exchange landmarks over SMS using the new Landmark Exchange Format. That was cool. You also discussed a port handler to make that work. Can you talk about that a little?

  2. #17
    Registered User
    Join Date
    Dec 2004
    Posts
    3

    Re: Provider Selection

    Quote Originally Posted by kevin_s2f View Post
    So I can select the criteria and have a service provider selected for me. Can I directly select a service provider myself?
    No, selection of the location provider is always done by the API implementation.

    The API (already in JSR 179) has been designed so that the implementation may change the location provider transparently from the application if the current location provider goes out-of-service or becomes temporarily unavailable. With this mechanism the application still receives the location updates but this time from a different location provider. The actual location methods used can be retrieved through Location.getLocationMethod. So from the application point of view, nothing changes.

    If the application would be able to select on particular location provider the burden of handling temporarily unavailable or out-of-service situations would be moved from the API implementation to the application itself. So in this case it would need to instantiate another location provider and request location updates from it and that could cause significant delays in getting the location fix.

  3. #18
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    13

    Re: JSR 293: LBS Goes Social

    So the new API provides MapServiceProvider interface, that provides services in two "modes":
    1) in uncontrolled mode, the MIDlet passes all control to the implementation, which then takes over the screen and events, and shows the provided objects (Coordinates, Landmarks, GeographicAreas, Routes) on it. This is just two lines of code:

    MapServiceProvider mapProvider = (MapServiceProvider) ProviderManager.connectToServiceProvider(null,
    ProviderManager.MAP, null);
    mapProvider.displayMap(initialViewport, geographicAreas, landmarks, coordinates, null, null, this);

    Then, when user pressed Back or similar, a callback in MapServiceListener is called to notify the app has the control again.

    2) in the controlled "mode" the MIDlet gets a Map object and then is responsible of everything: panning, zooming the map, rendering it whenever needed, centering on new coordinates etc. This gives a much more control and thus lots more power to do map mashups, since its up to the MIDlet to render whatever it want to on top of the map. See Demo3_MapMashupWithReverseGeocoding.java in the demo code to see actual code.

    Quote Originally Posted by kevin_s2f View Post
    The code also showed how to use the new APIs to draw maps with just a few lines of code. How did you do that?

  4. #19
    Nokia Developer Expert
    Join Date
    Jul 2007
    Posts
    102

    Thank you

    Carl and Jaana, thanks for coming on line this morning. I know how tempting it is to take a bit of a holiday after a conference presentation.

    Jaana, have a safe trip back to Finland.

  5. #20
    Nokia Developer Expert
    Join Date
    Jul 2007
    Posts
    102

    Re: JSR 293: LBS Goes Social

    Quote Originally Posted by csnellman View Post
    I showed a bunch of demos during the presentation, and I promised to post them all online.
    Here you go.

  6. #21
    Registered User
    Join Date
    Apr 2008
    Posts
    5

    Re: JSR 293: LBS Goes Social

    Hi Carl,

    In the JSR 293, I have some questions about the class of ProviderCapabilities.

    1. This class defines a series of property keys in string type, for example, GEO_SUPPORTS_GEOCODING, this key's description writes:
    Property key value for an application to query does the service provider support geocoding service. The value of this property is Boolean .
    Value: "geo_supports_geocoding"
    So, what is the exact type of the value, Boolean or string? If it is in string type, how to determine whether it supports geocoding or not?

    2. In my understanding, this class should be implemented by the service provider, ie, plugin provider side(if the service provider is made in a plugin form), and is used by the provider manager, ie, plugin management side, is that right?

    Thanks
    David

  7. #22
    Registered User
    Join Date
    Apr 2008
    Posts
    5

    Re: JSR 293: LBS Goes Social

    Hi Guys,
    Does anyone know the issue described below?
    Thanks a lot

    Quote Originally Posted by lbsuser View Post
    Hi Carl,

    In the JSR 293, I have some questions about the class of ProviderCapabilities.

    1. This class defines a series of property keys in string type, for example, GEO_SUPPORTS_GEOCODING, this key's description writes:
    Property key value for an application to query does the service provider support geocoding service. The value of this property is Boolean .
    Value: "geo_supports_geocoding"
    So, what is the exact type of the value, Boolean or string? If it is in string type, how to determine whether it supports geocoding or not?

    2. In my understanding, this class should be implemented by the service provider, ie, plugin provider side(if the service provider is made in a plugin form), and is used by the provider manager, ie, plugin management side, is that right?

    Thanks
    David

  8. #23
    Registered User
    Join Date
    Dec 2004
    Posts
    3

    Re: JSR 293: LBS Goes Social

    Hi lbsuser,

    1. Property key GEO_SUPPORTS_GEOCODING is defined in the specification source code as public static final int GEO_SUPPORTS_GEOCODING = "geo_supports_geocoding";. So that is where the value comes from. However method call ProviderCapabilities.getPropertyValue(GEO_SUPPORTS_GEOCODING) returns a Boolean object that specifies whether geocoding is supported or not.

    2. Yes, each service provider must implement ProviderCapabilities class that is then used by the ProviderManager implementation and by the application to determine which service provider to use.

    Hope this helps,
    Jaana

  9. #24
    Registered User
    Join Date
    Apr 2008
    Posts
    5

    Re: JSR 293: LBS Goes Social

    Thanks a lot, Jaana.

    Quote Originally Posted by jmajakan View Post
    Hi lbsuser,

    1. Property key GEO_SUPPORTS_GEOCODING is defined in the specification source code as public static final int GEO_SUPPORTS_GEOCODING = "geo_supports_geocoding";. So that is where the value comes from. However method call ProviderCapabilities.getPropertyValue(GEO_SUPPORTS_GEOCODING) returns a Boolean object that specifies whether geocoding is supported or not.

    2. Yes, each service provider must implement ProviderCapabilities class that is then used by the ProviderManager implementation and by the application to determine which service provider to use.

    Hope this helps,
    Jaana

  10. #25
    Registered User
    Join Date
    Oct 2008
    Posts
    1

    Re: JSR 293: LBS Goes Social

    Hi,

    I have a question about ProviderManager and ProviderCapabilities.

    I'm wondering about the method ProviderManager.getServiceProviderCapabilities(), in particular the comment that...
    "In some implementations the actual service request may be performed on a remote server. However even for these kind of services the capabilities of the service must be stored on the device. So searching the service providers the API implementation supports must not cause network traffic."
    If searching the service providers must not cause any network traffic, how would you suggest that a service provider that uses a remote server can dynamically update its capabilities? (for example, when the server is extended to add new capabilities)

    Thanks for any suggestions.

  11. #26
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    198

    Re: JSR 293: LBS Goes Social

    Quote Originally Posted by webkai View Post
    how would you suggest that a service provider that uses a remote server can dynamically update its capabilities? (for example, when the server is extended to add new capabilities)
    My immediate thought is that you would do it whenever a connection is made using (for example) a version number. So the service provider, when it does make a connection, says "Hi, I'm version 1.3" and the server says "Hi 1.3, there's now a version 2.9".

    How you would update the service provider is an entirely different story... I guess you'd need to update the firmware... not something that can be done during a Java ME session for sure!

    - Mike
    NAVTEQ Network for Developers
    The community for developing innovative location-based applications
    http://NN4D.com

  12. #27
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Re: JSR 293: LBS Goes Social

    Hello Carl,

    Just responding to your encouragement to post Location API 2.0 specific questions

    It seems the only way to display landmarks on a map is to pass a list of landmarks to MapServiceProvider.getMap method. So what if I want to display a new set of landmarks on the map, do I have to create a new map object instance using this method?

    Similar question can appy to the route. If I want to display the new route on the map, do I have to create a new map instance using this MapServiceProvider.getMap method?

    Thanks in advance,
    Wojciech

  13. #28
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    198

    Re: JSR 293: LBS Goes Social

    Quote Originally Posted by wmlynar View Post
    So what if I want to display a new set of landmarks on the map, do I have to create a new map object instance using this method?

    Similar question can appy to the route. If I want to display the new route on the map, do I have to create a new map instance using this MapServiceProvider.getMap method?
    The short answer is "yes".

    The Map Service Provider is a completely separate application to your own. You make a call to the Map Service Provider which then interacts with the user. Your application is free to wait until the Map Service Provider has finished, or carry on doing some background processing, but you cannot push information to the Map Service Provider once it has started, and you generally should not push your application to the front of the screen until the user has finished using the Map Service Provider.

    Therefore, in order to show new locations or a new route, you would need to start a new instance of the Map Service Provider, but only after the user has finished with any previous instances of the Map Service Provider.

    Incidentally, there are no implementations of a Map Service Provider available on any device at this time.

    - Mike
    NAVTEQ Network for Developers
    The community for developing innovative location-based applications
    http://NN4D.com

  14. #29
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Re: JSR 293: LBS Goes Social

    Hi!

    Another question, clarification about landmark store this time:

    You can find following sentence in the JavaDoc of LandmarkStore.addLandmark method:

    "If the Landmark object is an instance that does not belong to this LandmarkStore and the identifier for the landmark has been set to value 0, the implementation must check that there is not already a landmark with the same identifier and author combination in the LandmarkStore"

    In other words in one LandmarkStore there can be many Landmarks in the with the same id and author BUT NOT when id is 0. There can be only one landmark with particular author and id=0. What is the reason for that?

    On the other hand there is a constant Landmark.NO_IDENTIFIER = -1

    Would you be so kind to clarify what is the difference between id=0 and id=-1?

    Thanks in advance,
    Wojciech

  15. #30
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    198

    Re: JSR 293: LBS Goes Social

    Quote Originally Posted by wmlynar View Post
    You can find following sentence in the JavaDoc of LandmarkStore.addLandmark method
    Actually, I can't... I looked here.

    However, it seems that the document you are reading was actually written to describe how someone would implement the API, not use the API.

    Since it is is not possible for you as a developer using the API to change a Landmark identifier, you do not need to worry about what this means.

    - Mike
    NAVTEQ Network for Developers
    The community for developing innovative location-based applications
    http://NN4D.com

Similar Threads

  1. FPC Bench, Database API and a lot more...
    By sblantipodi in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2008-03-23, 01:47
  2. Realtime Fishing LBS Content's becoming a Hot Issue.
    By viva99kim in forum News and Announcements
    Replies: 1
    Last Post: 2008-02-29, 23:49
  3. what is the difference of jsr 226 and tinyline?
    By shydisturbedboy in forum Mobile Java General
    Replies: 4
    Last Post: 2007-07-26, 22:09
  4. E61, CDC & JSR 179
    By jdesjean in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2007-06-27, 13:41

Posting Permissions

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