IBM Support

PI23793: WL.DEVICE.GEO.ACQUIREPOSITION MAY NOT WORK CORRECTLY IN V6.1 ANDV6.2

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Geolocation may not work correctly in Worklight v6.1.z and
    6.2.x.
    When using WL.Device.Geo.acquirePosition, the OnSuccess and
    OnFailure events may not be triggered.
    
    
    Additional Keywords :
    GPS ,Geo.location,acquirePosition
    
    
    Versions affected: 6.1.x and 6.2.x
    Initial impact : Medium
    

Local fix

  • In WL 6.2, please add this code in worklight.js to fix the
    problem:
    
    
    var PositionError = function(code, message) {
     this.code = code || null;
     this.message = message || '';
    };
    
    PositionError.PERMISSION_DENIED = 1;
    PositionError.POSITION_UNAVAILABLE = 2;
    PositionError.TIMEOUT = 3;
    
    In WL 6.1, please also add this code in javascript to fix the
    problem:
    
    var Position = function(coords, timestamp) {
     if (coords) {
     this.coords = new Coordinates(coords.latitude,
    coords.longitude, coords.altitude, coords.accuracy,
    coords.heading, coords.velocity, coords.altitudeAccuracy);
     } else {
     this.coords = new Coordinates();
     }
     this.timestamp = (timestamp !== undefined) ? timestamp : new
    Date();
    };
    
    var Coordinates = function(lat, lng, alt, acc, head, vel,
    altacc) {
     this.latitude = lat;
     this.longitude = lng;
     this.accuracy = acc;
     this.altitude = (alt !== undefined ? alt : null);
     this.heading = (head !== undefined ? head : null);
     this.speed = (vel !== undefined ? vel : null);
     if (this.speed === 0 || this.speed === null) {
     this.heading = NaN;
     }
     this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
    };
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Worklight hybrid apps developers that use geo location and   *
    * have Android environment in their app                        *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The geo location feature is not working                      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * -                                                            *
    ****************************************************************
    

Problem conclusion

  • Some Javascript code was missing after cordova plugin was
    removed, the missing code has been added
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI23793

  • Reported component name

    WORKLIGHT CONSU

  • Reported component ID

    5725I4301

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-08-14

  • Closed date

    2014-11-14

  • Last modified date

    2014-11-14

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WORKLIGHT CONSU

  • Fixed component ID

    5725I4301

Applicable component levels

  • R610 PSY

       UP

  • R620 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSZH4A","label":"IBM Worklight"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 October 2021