1
00:00:00,390 --> 00:00:01,170
Welcome back.

2
00:00:01,530 --> 00:00:08,130
You probably have noticed that once you create a new board, the board will not be displayed.

3
00:00:08,130 --> 00:00:11,070
So I'm just going to create a new board here in Port one.

4
00:00:11,470 --> 00:00:13,680
It's not going to be displayed in our boards here.

5
00:00:13,920 --> 00:00:16,129
So it's not reloading this page.

6
00:00:16,140 --> 00:00:16,420
Right.

7
00:00:16,650 --> 00:00:19,260
So that is something that we can add as well.

8
00:00:19,290 --> 00:00:25,980
So once we create a new board and we click this button, we pretty much want to get a result from it.

9
00:00:25,990 --> 00:00:33,330
So we create a board with a start activity for result, or we click this button and we start the activity

10
00:00:33,330 --> 00:00:36,360
for results so that we get to this screen here.

11
00:00:36,360 --> 00:00:43,350
And once we click the create button, then it will also send us the information that there was a new

12
00:00:43,350 --> 00:00:43,980
entry made.

13
00:00:43,980 --> 00:00:48,050
And if that is the case, then we want to reload the boards.

14
00:00:48,270 --> 00:00:48,780
All right.

15
00:00:49,050 --> 00:00:52,370
So let's go ahead and add that functionality in real quick.

16
00:00:52,680 --> 00:01:00,270
Therefore, in the main activity, I will create a new entry here at the very top in our companion object.

17
00:01:00,780 --> 00:01:10,110
So I'm just going to create a new concept, will create board request code, which I'm going to assign

18
00:01:10,110 --> 00:01:12,830
the value to one to two, OK?

19
00:01:13,020 --> 00:01:20,190
Now, the next thing is that we can start the activity for results once we click on the create board

20
00:01:20,190 --> 00:01:20,620
button.

21
00:01:20,640 --> 00:01:23,280
So here FEBA create a board.

22
00:01:24,780 --> 00:01:31,200
And currently we start the activity, but but without asking for a result, so I'm going to change that

23
00:01:31,210 --> 00:01:31,540
now.

24
00:01:32,310 --> 00:01:38,940
Start activity for results with the intent and with our create board request code code.

25
00:01:40,100 --> 00:01:49,010
OK, now the next step that we need to prepare is to set the result as OK once we get over to the cricket

26
00:01:49,010 --> 00:01:49,820
board activity.

27
00:01:50,540 --> 00:01:53,150
And to be precise, we want to.

28
00:01:54,370 --> 00:01:56,950
Do that once the board was created successfully.

29
00:01:57,340 --> 00:02:02,340
All right, so let's go over to our activities here and create board activity.

30
00:02:02,830 --> 00:02:03,460
So here.

31
00:02:04,510 --> 00:02:10,310
We have this function that we created, which was called create board successfully.

32
00:02:10,479 --> 00:02:20,570
All right, so here what we will do is we will just set the result to be activity that result.

33
00:02:20,590 --> 00:02:21,130
OK.

34
00:02:23,770 --> 00:02:30,280
Now, in the main activity, we have this one activity result function.

35
00:02:32,940 --> 00:02:35,370
This one here and we now can check.

36
00:02:36,420 --> 00:02:40,800
So let's create another iffier else if.

37
00:02:43,410 --> 00:02:47,220
And here what we want is.

38
00:02:48,890 --> 00:02:57,200
To check if the result code was OK, so pretty much the same thing as we had before, and if the request

39
00:02:57,200 --> 00:02:58,040
code is.

40
00:03:01,520 --> 00:03:05,340
And how do you call it request code, create port request code?

41
00:03:05,360 --> 00:03:12,530
This one here, if it's that code, then we want to run some code, which means I just want to go to

42
00:03:12,710 --> 00:03:17,720
our store class here and get the boards list once again.

43
00:03:17,960 --> 00:03:22,990
And here we didn't just pass in the get list activity that we need here.

44
00:03:23,000 --> 00:03:24,260
So it's going to be this.

45
00:03:25,070 --> 00:03:28,070
And now let's run this again on the device.

46
00:03:32,890 --> 00:03:35,080
Now, let's go ahead and create the new board.

47
00:03:38,140 --> 00:03:41,650
So that we aren't we see what one is here now, this cricket board to.

48
00:03:45,380 --> 00:03:51,650
Or whatever the name doesn't really matter what created successfully and then you can see it's here

49
00:03:51,650 --> 00:03:52,130
as well.

50
00:03:52,760 --> 00:04:00,800
OK, so now we have this functionality that allows us to update our passports directly once we created

51
00:04:00,800 --> 00:04:01,580
a new board.

