1 00:00:01,130 --> 00:00:06,040 In the last video we managed to get some console logs of a user's location changing over time. 2 00:00:06,050 --> 00:00:10,190 Now at this point I just want to mention very quickly that you do not have to use this test file that 3 00:00:10,190 --> 00:00:12,820 we put together over here at the MOCA location stuff. 4 00:00:12,830 --> 00:00:16,670 The only reason we put this together is so that you can very easily test out this application if you're 5 00:00:16,670 --> 00:00:21,770 on a physical device so you don't have to like walk around the world if you're on an emulator or simulator 6 00:00:22,040 --> 00:00:23,650 you do not have to use it. 7 00:00:23,660 --> 00:00:28,880 However like I mentioned I have ran into a lot of issues trying to get location work on the IWM emulator 8 00:00:28,880 --> 00:00:29,920 in particular. 9 00:00:30,110 --> 00:00:34,950 So at present I just console logged or I commented out the mock location import right there. 10 00:00:35,150 --> 00:00:38,740 So I no longer am running all that fake location data. 11 00:00:38,810 --> 00:00:44,840 Now if I refresh my application and go back over and track create you'll notice that back over here 12 00:00:44,870 --> 00:00:52,980 I get absolutely no console logs for an update location if I go up to debug up here and then go to location. 13 00:00:52,980 --> 00:00:58,110 You'll notice that I have freeway drive on freeway drive should indicate that my location is changing 14 00:00:58,170 --> 00:01:03,540 like once per second and that I'm somehow like driving along freeway to 80 right here. 15 00:01:03,540 --> 00:01:08,790 If I change this over to like city run however and then refresh the application and come back to track 16 00:01:08,790 --> 00:01:15,850 create well still nothing over here let me try it one more time I'm gonna try this time city bicycle 17 00:01:15,850 --> 00:01:22,000 ride I'll refresh and go to track create and now you'll see that I'm getting some console logs here 18 00:01:22,570 --> 00:01:25,390 and I'm getting one just not one per second. 19 00:01:25,390 --> 00:01:31,010 This is some once again fake location information that's coming from the Iaw emulator. 20 00:01:31,060 --> 00:01:33,730 In other words it's simulating a city bicycle ride. 21 00:01:33,760 --> 00:01:37,120 It's not using the test data from our mock location file. 22 00:01:37,120 --> 00:01:45,140 Now as you just saw when I had selected either city run or freeway drive I was getting no console logs 23 00:01:45,140 --> 00:01:45,500 at all. 24 00:01:45,800 --> 00:01:51,110 So my point here is that at this point in time depending upon what device you're using to run the application 25 00:01:51,320 --> 00:01:56,900 it's kind of up to you to either try to use this built in location stuff on the Iaw device or on the 26 00:01:56,900 --> 00:02:00,050 android emulator or just use that test file. 27 00:02:00,050 --> 00:02:03,980 There's not really a right way to do this and this is really getting into the realm of React Native 28 00:02:03,980 --> 00:02:07,740 where unfortunately sometimes things just really don't work that well. 29 00:02:07,760 --> 00:02:11,290 So at this point moving forward you just need to decide for yourself. 30 00:02:11,300 --> 00:02:17,360 Either use that test data or if you're on an OS or Android simulator you can rely upon this location 31 00:02:17,360 --> 00:02:18,040 setting right here. 32 00:02:18,070 --> 00:02:20,060 But like I just said it is really finicky. 33 00:02:20,060 --> 00:02:21,200 For me personally. 34 00:02:21,200 --> 00:02:25,520 So that's why I choose to use the test data to make sure that this location stuff works 100 percent 35 00:02:25,520 --> 00:02:27,970 the time when I'm actually trying to test it. 36 00:02:27,980 --> 00:02:32,030 So for me I'm going to change this location right here too just like none. 37 00:02:32,030 --> 00:02:35,940 And I'm going to rely entirely on the mock location test data. 38 00:02:36,200 --> 00:02:39,850 So once again pulled up to you which one you use if you're on a physical device. 39 00:02:39,860 --> 00:02:45,230 I really think that you're going to end up using mock location if you are on a physical device and you're 40 00:02:45,230 --> 00:02:50,660 using mock location you might try updating the longitude and latitude right here to your physical location. 41 00:02:50,660 --> 00:02:56,180 Otherwise you're going to see the map kind of like jumping around as it tells you what your location 42 00:02:56,180 --> 00:03:01,220 is and then it tries to update that or or overwrite that with the Apple headquarters longitude latitude 43 00:03:01,640 --> 00:03:03,850 you'll see that in action very quickly. 44 00:03:03,920 --> 00:03:04,120 OK. 45 00:03:04,160 --> 00:03:08,360 So once again just want to throw that quick note out here this location stuff really finicky kind of 46 00:03:08,360 --> 00:03:08,860 buggy. 47 00:03:09,080 --> 00:03:11,340 Nonetheless it's the best thing we have. 48 00:03:11,480 --> 00:03:15,950 So now that we've got this stuff out of the way let's take a quick pause and start recording all this 49 00:03:15,950 --> 00:03:17,700 location data so quick pause. 50 00:03:17,720 --> 00:03:18,890 I'll see you in just a minute.