SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
COMS 6998-7 Celluar Networks and Mobile Computing 
Final Project Report 
Bocheng Zhou bz2228 
1. Motivation 
For this final project, I wanted to gain more experience in android development. And 
since I'm the only team member of my team, I wanted to implement something 
interesting and useful to me. Finally, I decided to implement an xkcd viewer, because 
I'm a huge fan of this nerdy and ridiculously profound webcomic, and have always 
wanted a convenient app to browse the comics easily. Moreover, I thought I would learn 
a lot of new android stuff along the way. 
2. Problem statement & proposed solution 
First of all, I wanted my app to have the basic functionalities like those on the xkcd 
website: when the app boots, it will fetch me the latest xkcd comic. I can browse the 
next comic, the previous one, the last one, the first one, and, if I'm feeling lucky, a 
random one. Second, there is this awesome website called “explain xkcd”, which, not 
surprisingly, explains to you in great detail the actually meaning behind the comics if 
you find some of them hard to understand. And it would be great to integrate this into 
the app. Third, I want to “favorite” the comics, because some of them(or almost all of 
them) are hilarious and enlightening. And I really like the concept of circles in the 
google+ app, so I thought it would be neat if I can “circle” the comics(make them 
belong to one or more categories) as a way of favoriting them. 
To implement those functionalities, the android actionbar will be a natural choice, since 
it provides a clean user interface and a bunch of intuitive options. And there will be a tab
bar with two tabs, one for displaying the comic and the other displaying the list of 
favorited comics. 
3. Design and Architecture 
One of the essential design issues is that avoid sending http requests as much as 
possible. As has mentioned in the lectures, energy bugs contribute significantly to high 
battery usage. In terms of power consumption, many components of the phone have very 
high tail states even after they stop the service, and wifi/network connection is one of 
them. A typical scenario is that the user may want to go back to the previous 
comics they've seen, which have already been downloaded, so it is not necessary to 
download them again. In other words, I should cache the images. When the user goes 
back to a previous comic, the app should just load it from the cache. 
The app's main activity is an action-bar activity with two tab bars embedded in it. With 
the help of viewpager, the user can swipe back and forth between the 2 tab bars. The 2 
tab bars are subclasses of android fragments. The first tab bar contains an image view, 
which will display the comic once it is downloaded, and 5 buttons which the user can 
press them to wade through all the comics. The second bar is a listview, whose items are 
comprised of the titles, connotations and the tags of the favorited comics. The action 
bar provide the options like favorite, share and explain. 
4. Implementation and testing 
There app will use the REST api porvided by xkcd, which will fetch the metadata of the 
comics in JSON format. One of the import libraries used in the project is Picasso, which 
is a powerful image downloading and caching library for android. I first tried to 
implement my own caching of images, but it turned out to be error-prone. Picasso did a 
really great job caching the images:when the user go back to previously downloaded
comics, it loads instantly, the speedup is very noticeable. Another library used in this 
project is PhotoView, which is for image zooming and pinching. The user can pinch to 
zoom in or zoom out the comic image smoothly. 
For storing the tags across different sessions, I used the Shared Preference, which is the 
most suitable storage option for this task. 
For testing, the Logcat is the most helpful during the process of doing this project. One 
can assign tags to the log messages, and logcat provides filtering based on keywords and 
saving the log to a file, which had been very useful for analyzing the behavior of the 
program. 
5. Lessons learned 
1.Start early and join a team. When I started to do the project, it had been over a month 
since the last android homework. I basically needed to relearn quite a few things before I 
could go on with more advanced stuff. Given the time constraints, I could not implement 
a more sophisticated app, which is a shame. I think if I had joined another team instead 
of working alone, I could have learned faster and have added more complex 
functionalities to the app. 
2. Don't reinvent the wheel. Before using the Picasso library, I tried to implement image 
caching myself, which is error-prone and time consuming. Using full-fledged libraries 
will make the development faster and the app more robust. 
3. Make sure to initialize the objects correctly, and always beware of the possibility of 
the object being null. Actually many of the bugs can be attributed to null pointer 
exception.
4. Learn and understand the life cycle of Fragments, Activity, etc. Fully understanding 
these things will save you a lot of time which would otherwise be used on unncessary 
tial and error. 
6. Summary and further work 
Although the project doesn't look as sophisticated as those of other teams, but I did learn 
a lot about android programming. For further work, I think I can add more advanced 
features to the app. I'm actually planning on adding social elements into the app, such as 
see how your facebook friends tag the comic you have favorited, try to find the people 
who are similar to you based on the tags they given to the comics. 
Extra Remarks 
Dear Professor Li, Xiao and William, I'm so sorry I missed the presentation which I 
should have given. Before the class, I'd only slept for 4 hours in 2 days, so I'm very sleep 
deprived. I fell asleep unconsciously and woke up only to find I already missed the 
presentation time. But this report is basically the transcript of what I was going to say in 
the presentation, and I also included a video to showcase the app. 
I know it's totally my fault to miss the presentation and turn in the project late. But I 
swear I did it all by myself and did put a lot of time and effort into it. Any grade is 
acceptable for me. Please don't fail me!

Mais conteúdo relacionado

Mais procurados

Devices and technology
Devices and technologyDevices and technology
Devices and technologyGingee96
 
How to design and build great apps (with moderator notes)
How to design and build great apps (with moderator notes)How to design and build great apps (with moderator notes)
How to design and build great apps (with moderator notes)Andreas Weder
 
How did you use media tech in construction, planning and evaluation stages?
How did you use media tech in construction, planning and evaluation stages?How did you use media tech in construction, planning and evaluation stages?
How did you use media tech in construction, planning and evaluation stages?Chereece Skeete
 
AS Media - Evaluation question 6.docx
AS Media - Evaluation question 6.docxAS Media - Evaluation question 6.docx
AS Media - Evaluation question 6.docxAaronHunter96
 
Media Technologies
Media TechnologiesMedia Technologies
Media Technologiessarahlambe
 

Mais procurados (12)

Devices and technology
Devices and technologyDevices and technology
Devices and technology
 
evaluation6
evaluation6evaluation6
evaluation6
 
How to design and build great apps (with moderator notes)
How to design and build great apps (with moderator notes)How to design and build great apps (with moderator notes)
How to design and build great apps (with moderator notes)
 
Q4daft
Q4daftQ4daft
Q4daft
 
Question 6
Question 6Question 6
Question 6
 
How did you use media tech in construction, planning and evaluation stages?
How did you use media tech in construction, planning and evaluation stages?How did you use media tech in construction, planning and evaluation stages?
How did you use media tech in construction, planning and evaluation stages?
 
AS Media - Evaluation question 6.docx
AS Media - Evaluation question 6.docxAS Media - Evaluation question 6.docx
AS Media - Evaluation question 6.docx
 
Media Technologies
Media TechnologiesMedia Technologies
Media Technologies
 
question 6
question 6question 6
question 6
 
Eval 4
Eval 4Eval 4
Eval 4
 
Question 6 (1)
Question 6 (1)Question 6 (1)
Question 6 (1)
 
Hannah media q4
Hannah media q4Hannah media q4
Hannah media q4
 

Destaque

Sketch of the ZXFS
Sketch of the ZXFSSketch of the ZXFS
Sketch of the ZXFSZx MYS
 
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)Zx MYS
 
Bookio report
Bookio reportBookio report
Bookio reportZx MYS
 
a Google Glass app presentation
a Google Glass app presentationa Google Glass app presentation
a Google Glass app presentationZx MYS
 
Stay Anonymous app report
Stay Anonymous app reportStay Anonymous app report
Stay Anonymous app reportZx MYS
 
Shopping buddy report
Shopping buddy reportShopping buddy report
Shopping buddy reportZx MYS
 
Universal login
Universal loginUniversal login
Universal loginZx MYS
 
Event Coordinator
Event CoordinatorEvent Coordinator
Event CoordinatorZx MYS
 
Hi tune sharing
Hi tune sharingHi tune sharing
Hi tune sharingZx MYS
 

Destaque (9)

Sketch of the ZXFS
Sketch of the ZXFSSketch of the ZXFS
Sketch of the ZXFS
 
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
 
Bookio report
Bookio reportBookio report
Bookio report
 
a Google Glass app presentation
a Google Glass app presentationa Google Glass app presentation
a Google Glass app presentation
 
Stay Anonymous app report
Stay Anonymous app reportStay Anonymous app report
Stay Anonymous app report
 
Shopping buddy report
Shopping buddy reportShopping buddy report
Shopping buddy report
 
Universal login
Universal loginUniversal login
Universal login
 
Event Coordinator
Event CoordinatorEvent Coordinator
Event Coordinator
 
Hi tune sharing
Hi tune sharingHi tune sharing
Hi tune sharing
 

Semelhante a xkcd viewer report

AS Media Evaluation Question 6
AS Media Evaluation Question 6 AS Media Evaluation Question 6
AS Media Evaluation Question 6 DannyRoth
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)alloy020
 
Media evaluation question 6 - What have you learnt about technologies from th...
Media evaluation question 6 - What have you learnt about technologies from th...Media evaluation question 6 - What have you learnt about technologies from th...
Media evaluation question 6 - What have you learnt about technologies from th...DannyRoth
 
Leynard quizon work portfolio (2012 to 2014)
Leynard quizon work portfolio (2012 to 2014)Leynard quizon work portfolio (2012 to 2014)
Leynard quizon work portfolio (2012 to 2014)Leynard Quizon
 
How to add ar effects to an android app using vr face library
How to add ar effects to an android app using vr face library How to add ar effects to an android app using vr face library
How to add ar effects to an android app using vr face library Moon Technolabs Pvt. Ltd.
 
Semantic web, python, construction industry
Semantic web, python, construction industrySemantic web, python, construction industry
Semantic web, python, construction industryReinout van Rees
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
Of Rowers and Programmers, or What's in Common Between Software Development B...
Of Rowers and Programmers, or What's in Common Between Software Development B...Of Rowers and Programmers, or What's in Common Between Software Development B...
Of Rowers and Programmers, or What's in Common Between Software Development B...Andrey Karpov
 
Media evaluation question 6 –
Media evaluation question 6 –Media evaluation question 6 –
Media evaluation question 6 –DannyRoth
 
Where All Libraries & Data Required For Android App Development Are Present
Where All Libraries & Data Required For Android App Development Are PresentWhere All Libraries & Data Required For Android App Development Are Present
Where All Libraries & Data Required For Android App Development Are PresentTechugo
 
Avoid adding a new library to the project
Avoid adding a new library to the projectAvoid adding a new library to the project
Avoid adding a new library to the projectPVS-Studio
 
Steps Building Photo Kast creating an iPhone app in one month
Steps Building Photo Kast creating an iPhone app in one monthSteps Building Photo Kast creating an iPhone app in one month
Steps Building Photo Kast creating an iPhone app in one monthMohamed Ibrahim
 

Semelhante a xkcd viewer report (20)

React projects for beginners
React projects for beginnersReact projects for beginners
React projects for beginners
 
HealthyCodeMay2014
HealthyCodeMay2014HealthyCodeMay2014
HealthyCodeMay2014
 
AS Media Evaluation Question 6
AS Media Evaluation Question 6 AS Media Evaluation Question 6
AS Media Evaluation Question 6
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
 
Question 6
Question 6Question 6
Question 6
 
Media evaluation question 6 - What have you learnt about technologies from th...
Media evaluation question 6 - What have you learnt about technologies from th...Media evaluation question 6 - What have you learnt about technologies from th...
Media evaluation question 6 - What have you learnt about technologies from th...
 
Creating Android apps
Creating Android appsCreating Android apps
Creating Android apps
 
Question 6
Question 6Question 6
Question 6
 
Leynard quizon work portfolio (2012 to 2014)
Leynard quizon work portfolio (2012 to 2014)Leynard quizon work portfolio (2012 to 2014)
Leynard quizon work portfolio (2012 to 2014)
 
How to add ar effects to an android app using vr face library
How to add ar effects to an android app using vr face library How to add ar effects to an android app using vr face library
How to add ar effects to an android app using vr face library
 
Question 6
Question 6Question 6
Question 6
 
Semantic web, python, construction industry
Semantic web, python, construction industrySemantic web, python, construction industry
Semantic web, python, construction industry
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
Of Rowers and Programmers, or What's in Common Between Software Development B...
Of Rowers and Programmers, or What's in Common Between Software Development B...Of Rowers and Programmers, or What's in Common Between Software Development B...
Of Rowers and Programmers, or What's in Common Between Software Development B...
 
Walter api
Walter apiWalter api
Walter api
 
Media evaluation question 6 –
Media evaluation question 6 –Media evaluation question 6 –
Media evaluation question 6 –
 
Where All Libraries & Data Required For Android App Development Are Present
Where All Libraries & Data Required For Android App Development Are PresentWhere All Libraries & Data Required For Android App Development Are Present
Where All Libraries & Data Required For Android App Development Are Present
 
Question 6
Question 6Question 6
Question 6
 
Avoid adding a new library to the project
Avoid adding a new library to the projectAvoid adding a new library to the project
Avoid adding a new library to the project
 
Steps Building Photo Kast creating an iPhone app in one month
Steps Building Photo Kast creating an iPhone app in one monthSteps Building Photo Kast creating an iPhone app in one month
Steps Building Photo Kast creating an iPhone app in one month
 

Mais de Zx MYS

Camevent
CameventCamevent
CameventZx MYS
 
iBoard presentation
iBoard presentationiBoard presentation
iBoard presentationZx MYS
 
Delicious – A Recipe Share App
Delicious – A Recipe Share AppDelicious – A Recipe Share App
Delicious – A Recipe Share AppZx MYS
 
Oculus presentation
Oculus presentationOculus presentation
Oculus presentationZx MYS
 
Cloud-based smart classroom
Cloud-based smart classroomCloud-based smart classroom
Cloud-based smart classroomZx MYS
 
Carrier pigeon presentation
Carrier pigeon presentationCarrier pigeon presentation
Carrier pigeon presentationZx MYS
 
Columbia connect project rep
Columbia connect project repColumbia connect project rep
Columbia connect project repZx MYS
 

Mais de Zx MYS (7)

Camevent
CameventCamevent
Camevent
 
iBoard presentation
iBoard presentationiBoard presentation
iBoard presentation
 
Delicious – A Recipe Share App
Delicious – A Recipe Share AppDelicious – A Recipe Share App
Delicious – A Recipe Share App
 
Oculus presentation
Oculus presentationOculus presentation
Oculus presentation
 
Cloud-based smart classroom
Cloud-based smart classroomCloud-based smart classroom
Cloud-based smart classroom
 
Carrier pigeon presentation
Carrier pigeon presentationCarrier pigeon presentation
Carrier pigeon presentation
 
Columbia connect project rep
Columbia connect project repColumbia connect project rep
Columbia connect project rep
 

Último

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

xkcd viewer report

  • 1. COMS 6998-7 Celluar Networks and Mobile Computing Final Project Report Bocheng Zhou bz2228 1. Motivation For this final project, I wanted to gain more experience in android development. And since I'm the only team member of my team, I wanted to implement something interesting and useful to me. Finally, I decided to implement an xkcd viewer, because I'm a huge fan of this nerdy and ridiculously profound webcomic, and have always wanted a convenient app to browse the comics easily. Moreover, I thought I would learn a lot of new android stuff along the way. 2. Problem statement & proposed solution First of all, I wanted my app to have the basic functionalities like those on the xkcd website: when the app boots, it will fetch me the latest xkcd comic. I can browse the next comic, the previous one, the last one, the first one, and, if I'm feeling lucky, a random one. Second, there is this awesome website called “explain xkcd”, which, not surprisingly, explains to you in great detail the actually meaning behind the comics if you find some of them hard to understand. And it would be great to integrate this into the app. Third, I want to “favorite” the comics, because some of them(or almost all of them) are hilarious and enlightening. And I really like the concept of circles in the google+ app, so I thought it would be neat if I can “circle” the comics(make them belong to one or more categories) as a way of favoriting them. To implement those functionalities, the android actionbar will be a natural choice, since it provides a clean user interface and a bunch of intuitive options. And there will be a tab
  • 2. bar with two tabs, one for displaying the comic and the other displaying the list of favorited comics. 3. Design and Architecture One of the essential design issues is that avoid sending http requests as much as possible. As has mentioned in the lectures, energy bugs contribute significantly to high battery usage. In terms of power consumption, many components of the phone have very high tail states even after they stop the service, and wifi/network connection is one of them. A typical scenario is that the user may want to go back to the previous comics they've seen, which have already been downloaded, so it is not necessary to download them again. In other words, I should cache the images. When the user goes back to a previous comic, the app should just load it from the cache. The app's main activity is an action-bar activity with two tab bars embedded in it. With the help of viewpager, the user can swipe back and forth between the 2 tab bars. The 2 tab bars are subclasses of android fragments. The first tab bar contains an image view, which will display the comic once it is downloaded, and 5 buttons which the user can press them to wade through all the comics. The second bar is a listview, whose items are comprised of the titles, connotations and the tags of the favorited comics. The action bar provide the options like favorite, share and explain. 4. Implementation and testing There app will use the REST api porvided by xkcd, which will fetch the metadata of the comics in JSON format. One of the import libraries used in the project is Picasso, which is a powerful image downloading and caching library for android. I first tried to implement my own caching of images, but it turned out to be error-prone. Picasso did a really great job caching the images:when the user go back to previously downloaded
  • 3. comics, it loads instantly, the speedup is very noticeable. Another library used in this project is PhotoView, which is for image zooming and pinching. The user can pinch to zoom in or zoom out the comic image smoothly. For storing the tags across different sessions, I used the Shared Preference, which is the most suitable storage option for this task. For testing, the Logcat is the most helpful during the process of doing this project. One can assign tags to the log messages, and logcat provides filtering based on keywords and saving the log to a file, which had been very useful for analyzing the behavior of the program. 5. Lessons learned 1.Start early and join a team. When I started to do the project, it had been over a month since the last android homework. I basically needed to relearn quite a few things before I could go on with more advanced stuff. Given the time constraints, I could not implement a more sophisticated app, which is a shame. I think if I had joined another team instead of working alone, I could have learned faster and have added more complex functionalities to the app. 2. Don't reinvent the wheel. Before using the Picasso library, I tried to implement image caching myself, which is error-prone and time consuming. Using full-fledged libraries will make the development faster and the app more robust. 3. Make sure to initialize the objects correctly, and always beware of the possibility of the object being null. Actually many of the bugs can be attributed to null pointer exception.
  • 4. 4. Learn and understand the life cycle of Fragments, Activity, etc. Fully understanding these things will save you a lot of time which would otherwise be used on unncessary tial and error. 6. Summary and further work Although the project doesn't look as sophisticated as those of other teams, but I did learn a lot about android programming. For further work, I think I can add more advanced features to the app. I'm actually planning on adding social elements into the app, such as see how your facebook friends tag the comic you have favorited, try to find the people who are similar to you based on the tags they given to the comics. Extra Remarks Dear Professor Li, Xiao and William, I'm so sorry I missed the presentation which I should have given. Before the class, I'd only slept for 4 hours in 2 days, so I'm very sleep deprived. I fell asleep unconsciously and woke up only to find I already missed the presentation time. But this report is basically the transcript of what I was going to say in the presentation, and I also included a video to showcase the app. I know it's totally my fault to miss the presentation and turn in the project late. But I swear I did it all by myself and did put a lot of time and effort into it. Any grade is acceptable for me. Please don't fail me!