B4i Library iLocationPlus Library

Hi,

I needed some more functions in the Location Library and some intellegence. I have made a plus version which has some more functions (completly compatible with the current) but also some intellegence in the Green Mode: This is the Objective C code:

B4X:
if (location.horizontalAccuracy < 200.0 && location.coordinate.latitude != 0 && location.coordinate.longitude != 0) {
             
                if (self.isIncreasedAccuacy) {
                    [self reduceTrackingAccuracy];
                }
             
                if ( abs([location.timestamp timeIntervalSinceDate: [NSDate date]]) < _validTimeUntilLastLocation) {
                    [B4IObjectWrapper raiseEvent:self :@"_locationchanged:" :@[lw]];
                } else {
                    // NSLog(@"Old data of GPS");
                }
             
            } else if (!self.isIncreasedAccuacy) {
                [self increaseTrackingAccuracy];
            }

Atatched you will find the zip file.
 

Attachments

  • iLocationPlus.zip
    163.2 KB · Views: 136
Top