Skip to content

Commit

Permalink
We now look at GSM and CDMA Cell Locations
Browse files Browse the repository at this point in the history
  • Loading branch information
wclarkso committed Apr 20, 2011
1 parent 1d3bdf4 commit f9e402c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions iPhoneTrackingAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,13 @@ - (BOOL)tryToLoadLocationDB:(NSString*) locationDBPath forDevice:(NSString*) dev
const float precision = 100;
NSMutableDictionary* buckets = [NSMutableDictionary dictionary];

// Default query is for GSM iPhone
NSString* queries[] = {@"SELECT * FROM CellLocation;", @"SELECT * FROM WifiLocation;"};

// Determine if CDMA or GSM iPhone.
BOOL isCDMAiPhone = [database tableExists:@"CdmaCellLocation"];
if (isCDMAiPhone) {
// Adjust first query for CDMA Cell Locations
queries[0] = @"SELECT * from CdmaCellLocation;";
}
NSString* queries[] = {
@"SELECT * FROM CellLocation;", // GSM iPhone
@"SELECT * FROM CdmaCellLocation;", // CDMA iPhone
@"SELECT * FROM WifiLocation;"};

// Temporarily disabled WiFi location pulling, since it's so dodgy. Change to
for (int pass=0; pass<1; /*pass<2;*/ pass+=1) {
for (int pass=0; pass<2; /*pass<3;*/ pass+=1) {

FMResultSet* results = [database executeQuery:queries[pass]];

Expand Down

0 comments on commit f9e402c

Please sign in to comment.