Skip to main content

Introduction to Threads and Tweets

Lesson 14 from: Building a Twitter App

Tony Hillerson

Introduction to Threads and Tweets

Lesson 14 from: Building a Twitter App

Tony Hillerson

buy this class

$00

$00
Sale Ends Soon!

starting under

$13/month*

Unlock this classplus 2200+ more >

Lesson Info

14. Introduction to Threads and Tweets

Lesson Info

Introduction to Threads and Tweets

welcome to Week three of creating a Twitter client with Android. What will be talking about today is background tasks. So we're kind of continuing on the theme that we ended up with last week, where we talked about the importance and the the ins and outs and the how twos of doing long running tasks work long running units of work in your code in the background or what? What? Ah, or more to the point off of the thread that is used that is called a U I thread, which is doing all of the display work and user interaction. The importance of taking those tasks off of the U. I thread is that it allows your application remain responsive, which is, um, which is like, It's one of those things. That's ah, if it's if it's there, then nobody really notices. But if it's gone, people notice really quickly, and it seems it seems like the APP is not trustworthy anymore. And people start to ask questions about how this thing works and why it's not working the way they want, even though it's doing what t...

hey asked. It's just like, um, slow and chunky, and then people start to lose trust, and that's not good. So to continue on with that theme, we're gonna talk about loading avatars for each tweet. Um, that shows up in the in the table view there, the list view. We're gonna load them on a thread, and then we're gonna talk about some of the some of the issues there with using threads for for more than one background task at a time. Up till now, what we've done is just load one thing in the background at a time. But this will be loading a couple things at once. And then we're talking about those issues. And then, well, then we'll introduce something called in a sink task, which helps us deal with some of the issues that will discover. And then we'll talk about, ah, changing reporting over some of the code we've already written to use a sink task. And then we'll talk about navigation inside of an android app between the different activities that are available using a menu and then at the end will push some new tweets. Of course, using an a sink task as well. So some of the new classes Ah, that will be introducing our highlighted here. We're gonna make they, uh um actually, authorization activity is not new. I'm not sure what the deal is there. Um, um I led that one, even though it's not new, but the menu helper below it is new. And then all of the classes inside of common Riley android a tweet tasks are new, and those of the a sink tasks will be creating today. Okay, so let's talk about threads and tweets. First. We'll talk about what the user is expecting of our application when they start to use it. Um, avatars air. Nice to have their kind of give a little personality teach tweet avatars also help the user, um, to kind of understand is they scroll through the list they're not gonna re reading. Nobody goes through and reads every tweet all the way through. I guarantee that's not the way that you actually use on application like this. You kind of scan through. And what helps you to pick out something that you may want to read is the avatar. Um hey, that's somebody that I want to hear from. Let me let me stop and take a look at that. It's also important that we have the avatars, um, not only for a little bit of style, but to let the user, um, scan through the information and pick out information that they want to consume a little more in depth. And then we're also going to allow navigation through the application so that we let the user go through and post a tweet and then move back to the home timeline or go toe to post again and to allow space for Mawr Mawr activities to be put into the application later. And then we will allow the user to post new tweets as we go through The code today will run into a few new characters in this drama of android development. Um, the a sink task we already talked about in depth a little bit. Ah, and is a pretty good an introduction. It's It's a way to, ah to deal with some unit of work in the background without using a thread. Um, and it also deals with, as I said, to come of a couple of the Thea problems of using more than one thread at us at the same time. Um and then we'll also deal with the menu, which is the way that navigation works on the android platform.

RELATED ARTICLES

RELATED ARTICLES