Skip to Content
Android Application Development All-in-One For Dummies, 2nd Edition
book

Android Application Development All-in-One For Dummies, 2nd Edition

by Barry A. Burd
August 2015
Beginner
768 pages
18h 18m
English
For Dummies
Content preview from Android Application Development All-in-One For Dummies, 2nd Edition

Chapter 4

An Android Social Media App

In This Chapter

check1 Posting on Twitter with Android code

check1 Tweeting with your app on a user’s behalf

Areader from Vancouver (in British Columbia, Canada) writes:

“Hello, Barry. I just thought I would ask that you include the area that seems to get attention from app developers: programs connecting with social sites. I look forward to reading the new book! Best regards, David.”

Well, David, you’ve inspired me to create a Twitter app. This chapter’s example does two things: It posts a new tweet, and it gets a Twitter user’s timeline. The app can perform many more Twitter tasks — for example, search for tweets, look for users, view trends, check friends and followers, gather suggestions, and do lots of other things that Twitter users want done. For simplicity, though, I have the app perform only two tasks: tweet and display a timeline.

I can summarize the essence of this chapter’s Twitter code in two short statements. To post a tweet, the app executes

twitter.updateStatus("This is my tweet.");

 

And, to display a user’s timeline, the app executes

List<twitter4j.Status> statuses =

    twitter.getUserTimeline("allmycode");

 

Of course, these two statements only serve as a summary, and a summary is never the same as the material it summarizes. Imagine ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android Application Development For Dummies, 2nd Edition

Android Application Development For Dummies, 2nd Edition

Michael Burton, Donn Felker
Android App Development

Android App Development

Hervé J. Franceschi

Publisher Resources

ISBN: 9781118973806Purchase book