1 00:00:02,750 --> 00:00:04,060 So now for the important part, 2 00:00:04,070 --> 00:00:08,990 testing this on a real phone. For this, I'm reinstalling the expo client on my iPhone so that all the permissions 3 00:00:08,990 --> 00:00:13,940 I did set up there in the past during testing and so on are reset so that they can show this from scratch 4 00:00:14,450 --> 00:00:20,330 and I opened up my expo dev window in the browser here, it was always open but now I brought it on 5 00:00:20,390 --> 00:00:24,050 the screen so that we have the barcode there to scan. 6 00:00:24,050 --> 00:00:29,840 So with that, we can of course scan this with the help of the camera application here which I point 7 00:00:29,840 --> 00:00:35,090 that the barcode so that I can tap this to open it, on Android you have the scanner in the expo app 8 00:00:35,250 --> 00:00:37,600 but I'll show this in a second. 9 00:00:37,700 --> 00:00:38,530 Got that, 10 00:00:38,630 --> 00:00:43,740 here's the app and now I can add a place, test this 11 00:00:43,760 --> 00:00:45,350 and now you'll see something interesting. 12 00:00:45,350 --> 00:00:48,760 If I click take image, I'm asked for permissions and I click 13 00:00:48,800 --> 00:00:51,800 okay but now this will actually fail. 14 00:00:51,920 --> 00:00:53,570 You see that warning here at the bottom, 15 00:00:53,600 --> 00:00:55,510 this failed. 16 00:00:55,550 --> 00:00:59,750 Now the reason for why this failed is that I'm asking for the wrong permission here in the image 17 00:00:59,750 --> 00:01:00,510 picker. 18 00:01:00,530 --> 00:01:04,760 Now previously, I had to change this because on the simulator, I was also getting an error 19 00:01:04,760 --> 00:01:10,760 there. Now this should actually be fixed by not just asking for the camera roll permission here but also, 20 00:01:11,090 --> 00:01:14,520 we can simply add a second argument here, for permissions camera, 21 00:01:14,540 --> 00:01:17,250 so we need both - camera and camera roll. 22 00:01:17,420 --> 00:01:22,190 Now previously, changing this to camera roll fixed the issue because we did ask for the camera permission 23 00:01:22,190 --> 00:01:28,400 first but in the end, you need to ask for both and whenever you reinstall the expo client or relaunched 24 00:01:28,400 --> 00:01:32,210 the app on a new device, you definitely need to ask for both 25 00:01:32,210 --> 00:01:35,590 for this to work. So make sure you do ask for both 26 00:01:35,660 --> 00:01:38,240 and with that added, with both permissions added here, 27 00:01:38,240 --> 00:01:42,500 this will now always work because now we're asking for both permissions even though we're only using 28 00:01:42,500 --> 00:01:43,660 the camera here 29 00:01:43,850 --> 00:01:50,330 but since this package could also use the camera roll, we need to get both permissions and thereafter, 30 00:01:50,390 --> 00:01:53,790 close expo and rescan that barcode here, 31 00:01:56,540 --> 00:02:00,160 like this and open this in expo again and now it should work. 32 00:02:00,150 --> 00:02:10,100 So now if we go here and we enter test here and then I take an image, now I'm asked for whether I want 33 00:02:10,100 --> 00:02:17,450 to grant access and I do and now I'll take this amazing image here which is very meta because I take 34 00:02:17,450 --> 00:02:22,820 an image of the screen where I record that I take an image and I can use that photo, 35 00:02:22,820 --> 00:02:27,640 here it is and now let's choose a location on the map, 36 00:02:27,680 --> 00:02:29,410 maybe this one, save 37 00:02:29,420 --> 00:02:35,060 this, seems to work or get my current location which I don't want to here, so I'll just click 38 00:02:35,060 --> 00:02:36,560 save place 39 00:02:36,560 --> 00:02:40,540 and here it is, add it, you can view it, you can view the details. 40 00:02:40,580 --> 00:02:41,540 So this seems to work 41 00:02:41,540 --> 00:02:47,930 and now let me also close this and reopen it so that we see whether it was really stored in a database. 42 00:02:48,080 --> 00:02:53,320 So it should now load this place hopefully and it does and all the data is there. 43 00:02:53,330 --> 00:03:00,290 So this is now our application running on a real iPhone and we fixed this important permission error, 44 00:03:00,350 --> 00:03:03,230 let's now also run it on an Android device.