Uploaded image for project: 'Spring Mobile'
  1. Spring Mobile
  2. MOBILE-84

Device Interface should support method getCapability

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: device
    • Labels:

      Description

      If a user wants to use spring mobile with a device repository (wurfl, deviceatlas etc), our interface 'Device' does not have a method which can be overridden by implementing class to get individual capabilities of device.
      We need a method in interface Device with below signature -

      /**

      • Given name of capability, returns its value for current device. For example, if current device is iPhone and capabilityName = Touch, method will return 'true'.
      • This method should be used when using a device repository, e.g. WURFL, DeviceAtlas, DetectRight or a custom one. If the user-agent of current device is present in
      • device repository being used, the method will simply return capability value as present in device repository. If no device repository is being used or device repository does not
      • have user agent of current device, method will return null.
      • @param capabilityName
      • @return
        */
        String getCapability( String capabilityName );

      The default implementation class LiteDevice will simply return null in this method -
      public String getCapability(String capabilityName)

      { return null; }

      Without this method, users can not use spring-mobile with any server side device repository.

        Attachments

        1. Device.java
          2 kB
        2. LiteDevice.java
          2 kB
        3. StubDevice.java
          2 kB

          Activity

            People

            • Assignee:
              rclarkson Roy Clarkson
              Reporter:
              kuldeepshandilya kuldeep tiwari
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified