‫Speaker: Hi. Before we continue to do
‫reverse engineering curve this application,
‫I just wanted to explain all of these codes to you.
‫So if you're not an Android developer,
‫you get to see what we are doing in this codes.
‫Of course, in real reverse engineering
‫or real penetration testing,
‫you won't get to see the codes
‫at this context this clearly.
‫But since this is a test
‫and since you are learning how to do it,
‫then I believe it would be a good idea
‫to learn about all of this stuff before we continue.
‫So if you are already an Android developer
‫then you're more than welcome to skip this lecture.
‫So I'm gonna start with Android manifest.
‫As you can see, we have this main launcher tag
‫which indicates the activity
‫that needs to be shown first when application is launched.
‫So signup activity is actually the first activity
‫that we see.
‫So over here in the signup activity,
‫we see some methods like on create and the other methods.
‫There are a couple of edit texts, email texts,
‫and password texts,
‫Of course, these are the texts
‫that we are getting input from,
‫and we have this fire base authentication object.
‫So let me go over here to this buttons.
‫As you can see, we have signing clicked and sign up clicked.
‫So these are for signing the user up
‫and registering,
‫signing and registering and logging in the user.
‫And we are using this fire base authentication object
‫in order to create user with email and password.
‫So this is the power of fire base SD case case.
‫As you can see, it's very clear.
‫You all need just type, create user with email and password
‫and you get the email and password from the email text
‫and password text as usual.
‫And if it's a successful operation,
‫it will give you a call back like this,
‫you get to do what you want to do.
‫And over here we do an intent to Feedactivity
‫once we register the user.
‫And actually it gets to see the tweets,
‫previous to it that are held,
‫that are actually written by other users.
‫So sign and click does exactly the same thing
‫only it's just logs the user in
‫rather than registering the user up.
‫So over here we still do the same thing
‫with just having an intent to the feed activity.
‫And over here you see a coding block,
‫which starts with controlling the fire based user.
‫So if the user is already signed in before,
‫if it's not null,
‫null means void now means new.
‫And if it's not null if it's over there,
‫then we're going to do an intent.
‫We won't have to show the sign in or sign up activity
‫to the user at all if they're already logged in before.
‫So let me go back to your feed activity over here.
‫As you can see, we have couple of array lists
‫of strengths and we store the user email
‫from Firebase and user tweet from Fire Base
‫in this array list.
‫And also we have our recycler adapter
‫which we will talk about later.
‫We have the menu, options menu functions over here.
‫So we get to say what happens when we click
‫each one of these buttons over here.
‫Okay, and remember we created that menu under resources
‫under menu folder,
‫so we actually connect that menu to our activity
‫using this methods.
‫So if we click on a tweet,
‫then we are going to do as if we click on signup,
‫then we are going to do this.
‫So if we click on a tweet,
‫we are going to go for tweet activity
‫every click on signup,
‫we are going to go back to signup activity.
‫Okay? So under onCreate, we don't do much,
‫we only do the setup thing like getting the data
‫from the fire store.
‫So I have written all of this actually codes
‫under a separate method like this,
‫since it's a little bit long.
‫And as you can see, we're getting the collection tweets,
‫we are reading from collection tweets.
‫We can have multiple collections over here
‫like tweets, user, I don't know, address
‫whatever you can think of.
‫Since this is a test application,
‫we only have one collection and we are reading it.
‫So we are getting the data from tweets
‫in this coding block in this method,
‫and we are sorting them by the date.
‫And over here, we are getting everything and storing them
‫inside of these two array lists.
‫Okay? And over here, we are actually using those array lists
‫in order to create an adapter.
‫So adapter actually connects this data source
‫with the recycler view itself.
‫So if you look at the activity feed XML,
‫you will only see a recycler view,
‫you won't see anything else,
‫because we are going, we are using Recycler Row XML
‫over her,
‫and since we are using our tweet recycler adapter,
‫we can connect our recycler row with the recycler view
‫and also with the feed activity data.
‫So that's what Tweet recycler adapter does.
‫So adapter is very important.
‫It's holding everything together.
‫So as you can see, it's using some class
‫called RecyclerView.Adapter,
‫it actually has its own class.
‫And over here we create a constructor
‫to specify the data that we are going to need.
‫And over here, we are actually connecting
‫the recycler row views with like text view or edit texts.
‫So we have two text views over here,
‫User tweet text and user email text.
‫And after that, we are just connecting everything together
‫under this tweet recycler adapter.
‫Now, since we are using this tweet recycler adapter,
‫we are actually able to connect our feed activity data
‫with the recycler review that we are seeing.
‫So this may sound a little bit complicated
‫if you're not an Android developer
‫but believe me, it's not.
‫If you learn about Android development it should be
‫an easy thing to do for you
‫after actually spending at least a couple of months in it.
‫And over here in the tweet activity,
‫you'll see tweet button click,
‫and of course we are uploading every data
‫to the fire store in this case.
‫And then like we store the date,
‫we store the user email at Tweet itself over here.
‫And then if it says success, if it's a successful operation,
‫then we go back to feed activity
‫to display this data to gather this information
‫from fire store and display it to the user.
‫So that's what we are doing in this code.
‫Of course, you don't need to understand everything
‫at this point,
‫but we are going to reverse engineer it in the next lecture,
‫so maybe it would give you a good idea
‫about what we are doing.