1 00:00:00,000 --> 00:00:00,870 ‫Instructor: Hi, 2 00:00:00,870 --> 00:00:03,120 ‫within this lecture we are going to bring 3 00:00:03,120 --> 00:00:05,010 ‫in the Java code. 4 00:00:05,010 --> 00:00:07,860 ‫So in order to do that, I'm going to close this down 5 00:00:07,860 --> 00:00:12,690 ‫because I already have java codes opened in this tab. 6 00:00:12,690 --> 00:00:15,600 ‫So make sure you go to SecureTweet folder 7 00:00:15,600 --> 00:00:18,450 ‫and find this Java code. 8 00:00:18,450 --> 00:00:21,600 ‫So we're going to start with this, okay? 9 00:00:21,600 --> 00:00:24,630 ‫Which is our recycler view adapter. 10 00:00:24,630 --> 00:00:25,470 ‫So as you can see 11 00:00:25,470 --> 00:00:29,580 ‫I'm getting everything from the import tabs. 12 00:00:29,580 --> 00:00:33,540 ‫So make sure you get everything, not the package name 13 00:00:33,540 --> 00:00:36,840 ‫because yours will be different, obviously. 14 00:00:36,840 --> 00:00:38,610 ‫However, rest of the code 15 00:00:38,610 --> 00:00:41,310 ‫will be necessary to complete this. 16 00:00:41,310 --> 00:00:43,950 ‫So make sure you get everything exactly 17 00:00:43,950 --> 00:00:46,290 ‫in the way that I'm doing right now. 18 00:00:46,290 --> 00:00:50,400 ‫So I'm starting with the imports and I'm coming all the way 19 00:00:50,400 --> 00:00:54,360 ‫to the down and with all the curly braces. 20 00:00:54,360 --> 00:00:56,520 ‫Okay, I'm copying it. 21 00:00:56,520 --> 00:01:00,420 ‫I'm going to come over here to Tweet Recycler Review. 22 00:01:00,420 --> 00:01:02,136 ‫I'm going to delete everything 23 00:01:02,136 --> 00:01:05,457 ‫except from the package name itself, okay? 24 00:01:05,457 --> 00:01:07,470 ‫And I'm gonna paste it. 25 00:01:07,470 --> 00:01:12,470 ‫So once you do that, it will just adjust itself. 26 00:01:12,690 --> 00:01:14,730 ‫So maybe you can come up 27 00:01:14,730 --> 00:01:19,730 ‫with something like this where it doesn't recognize the IDs 28 00:01:19,800 --> 00:01:23,670 ‫even though we have defined them in the layout. 29 00:01:23,670 --> 00:01:28,590 ‫Then we are going to check it and see if it works, okay? 30 00:01:28,590 --> 00:01:30,360 ‫So for example, if I come 31 00:01:30,360 --> 00:01:34,530 ‫over here to user email, I can see user email text 32 00:01:34,530 --> 00:01:37,170 ‫and if I come over here it'll say, 33 00:01:37,170 --> 00:01:38,940 ‫yeah, cannot resolve it. 34 00:01:38,940 --> 00:01:42,330 ‫Even though it's there, it doesn't synchronize. 35 00:01:42,330 --> 00:01:43,770 ‫So in order to do this 36 00:01:43,770 --> 00:01:46,680 ‫I'm going to come over here and say, build clean 37 00:01:46,680 --> 00:01:49,830 ‫and then build rebuild, okay? 38 00:01:49,830 --> 00:01:51,900 ‫And it'll synchronize the project. 39 00:01:51,900 --> 00:01:53,586 ‫It'll rebuild the project 40 00:01:53,586 --> 00:01:56,730 ‫and we will see if that resolves the problem. 41 00:01:56,730 --> 00:02:00,420 ‫And if it doesn't, there are other take techniques 42 00:02:00,420 --> 00:02:05,420 ‫that we can use in order to make this kind of bug go away. 43 00:02:05,667 --> 00:02:08,640 ‫Since we are copying and pasting code, 44 00:02:08,640 --> 00:02:12,030 ‫sometimes these kind of problems may occur 45 00:02:12,030 --> 00:02:15,330 ‫and you have to know how to deal with them. 46 00:02:15,330 --> 00:02:20,010 ‫So let's wait until it's done and I believe it's done 47 00:02:20,010 --> 00:02:21,870 ‫and it doesn't still go away. 48 00:02:21,870 --> 00:02:24,330 ‫So it still gives us the error. 49 00:02:24,330 --> 00:02:26,190 ‫And this time I'm going to try this. 50 00:02:26,190 --> 00:02:28,445 ‫I'm gonna go over here to file menu 51 00:02:28,445 --> 00:02:31,297 ‫and say invalidate caches. 52 00:02:31,297 --> 00:02:35,250 ‫And this will invalidate all the caches in this 53 00:02:35,250 --> 00:02:39,150 ‫Android studio and it will restart our project. 54 00:02:39,150 --> 00:02:43,410 ‫So maybe it will be a little bit wiser if we did that 55 00:02:43,410 --> 00:02:47,426 ‫after we complete everything on the Java codes so that 56 00:02:47,426 --> 00:02:52,170 ‫if we get any errors, like similar errors in the activities 57 00:02:52,170 --> 00:02:54,210 ‫they will be resolved as as well. 58 00:02:54,210 --> 00:02:58,350 ‫But anyhow, we did it and let's see if that worked out 59 00:02:58,350 --> 00:03:00,780 ‫and if that solved that problem. 60 00:03:00,780 --> 00:03:05,780 ‫So as you can see, I think it is solved right now. 61 00:03:06,060 --> 00:03:07,170 ‫It looks promising 62 00:03:07,170 --> 00:03:10,523 ‫since we don't have any red errors showing up 63 00:03:10,523 --> 00:03:14,433 ‫in this activity or Java code. 64 00:03:16,050 --> 00:03:17,640 ‫So I'm going to wait 65 00:03:17,640 --> 00:03:22,140 ‫until it's finished anyhow and then see if it's done or not. 66 00:03:22,140 --> 00:03:24,930 ‫And yep, as you can see 67 00:03:24,930 --> 00:03:28,696 ‫it's already done and it seems to be working. 68 00:03:28,696 --> 00:03:33,696 ‫So it recognizes the user tweet text and user email, text. 69 00:03:34,020 --> 00:03:35,820 ‫So we are done with here. 70 00:03:35,820 --> 00:03:38,520 ‫So let's go to tweet activity 71 00:03:38,520 --> 00:03:43,520 ‫and let's find the related codes for tweet activity in here. 72 00:03:43,920 --> 00:03:45,660 ‫I'm going to copy everything 73 00:03:45,660 --> 00:03:49,080 ‫excluding the package name, okay? 74 00:03:49,080 --> 00:03:52,830 ‫And I'm going to take everything here as well 75 00:03:52,830 --> 00:03:55,290 ‫including these braces. 76 00:03:55,290 --> 00:04:00,290 ‫So let me copy this and come back here and delete everything 77 00:04:00,480 --> 00:04:03,753 ‫except the package name and then paste everything. 78 00:04:04,590 --> 00:04:08,910 ‫So I believe we don't have any errors like we had before. 79 00:04:08,910 --> 00:04:10,500 ‫So we can move on. 80 00:04:10,500 --> 00:04:13,290 ‫Let's go to sign up activity 81 00:04:13,290 --> 00:04:16,230 ‫and let's find the sign up activity as well. 82 00:04:16,230 --> 00:04:17,790 ‫Here we go. 83 00:04:17,790 --> 00:04:19,650 ‫And let's take everything 84 00:04:19,650 --> 00:04:24,630 ‫from here up until the end, like that. 85 00:04:26,340 --> 00:04:28,500 ‫Make sure you find everything. 86 00:04:28,500 --> 00:04:31,710 ‫Make sure you copy it, come back 87 00:04:31,710 --> 00:04:35,283 ‫and just delete everything over here and paste it. 88 00:04:36,270 --> 00:04:38,700 ‫That's good, right? 89 00:04:38,700 --> 00:04:43,200 ‫So now, it's time to go for the feed activity. 90 00:04:43,200 --> 00:04:44,700 ‫So let's go back 91 00:04:44,700 --> 00:04:49,097 ‫and find the feed activity and let's delete- 92 00:04:49,097 --> 00:04:53,253 ‫let's copy everything first like this, okay? 93 00:04:54,240 --> 00:04:59,240 ‫And then make sure you get curly braces and then copy it 94 00:05:00,698 --> 00:05:04,200 ‫and then come back and then just delete everything 95 00:05:04,200 --> 00:05:05,403 ‫and then paste it. 96 00:05:07,326 --> 00:05:08,250 ‫So it was boring enough. 97 00:05:08,250 --> 00:05:12,780 ‫Okay, I know it, but now we have our app. 98 00:05:12,780 --> 00:05:14,610 ‫Now it should run. 99 00:05:14,610 --> 00:05:15,570 ‫It should work. 100 00:05:15,570 --> 00:05:18,330 ‫When we run it, we are gonna test it. 101 00:05:18,330 --> 00:05:20,730 ‫We are going to see if that works or not. 102 00:05:20,730 --> 00:05:21,630 ‫And don't worry 103 00:05:21,630 --> 00:05:24,510 ‫I'm going to explain all these codes either. 104 00:05:24,510 --> 00:05:27,510 ‫So first we are going to test to see if that works 105 00:05:27,510 --> 00:05:30,120 ‫and then I'm going to explain all the codes to you. 106 00:05:30,120 --> 00:05:33,540 ‫Then we are going to do our penetration tests. 107 00:05:33,540 --> 00:05:35,943 ‫So see you in new lecture.