This is no longer required due to lazy loading of location, accelerometer, etc.
-----
If you are building an application that does not rely on location, you might want to disable the notice you get when the application starts. To do this, you need to comment out or delete some lines from two files.
To comment the files out, just put a // in front of each line.
The first file is GlassAppDelegate.h, and you need to comment out the lines below. They are in order they are found:
//#import <CoreLocation/CoreLocation.h>
//#import "Location.h"
//#import "Contacts.h"
//@class Contacts;
// CLLocationManagerDelegate,
//IBOutlet UIActivityIndicatorView *activityView;
//CLLocationManager *locationManager;
//CLLocation *lastKnownLocation;
//@property (nonatomic, retain) CLLocation *lastKnownLocation;
The second file you need to worry about is GlassAppDelegate.m. Again, these are in the order they are found:
//#import <CoreLocation/CoreLocation.h>
//@synthesize lastKnownLocation;
// locationManager = [[CLLocationManager alloc] init];
// locationManager.delegate = self;
// [locationManager startUpdatingLocation];
// double lat = lastKnownLocation.coordinate.latitude;
// double lon = lastKnownLocation.coordinate.longitude;
//if([(NSString *)[parts objectAtIndex:1] isEqualToString:@"getloc"]){
//NSLog(@"location request!");
//jsCallBack = [[NSString alloc] initWithFormat:@"gotLocation ('%f','%f');", lat, lon];
//NSLog(jsCallBack);
//[theWebView stringByEvaluatingJavaScriptFromString:jsCallBack];
//[jsCallBack release];
// } else
//- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
//{
// [lastKnownLocation release];
// lastKnownLocation = newLocation;
// [lastKnownLocation retain];
//}
// [lastKnownLocation release];
Comments (0)
You don't have permission to comment on this page.