西安电子科技大学:《Mobile Programming》课程PPT教学课件(Android Programming)Lecture 9 Service and Broadcast Receiver

Android Programming Lecture 9 Service and broadcast receiver
Android Programming Lecture 9 Service and Broadcast Receiver

Sample App: Music Player Sweet With A Love Like You 2
Sample App: Music Player 2

Sample App (1/7) Click on the icon and get the startup Launcher activity is started by the sending of a special intent-the Launcher intent o Application Manifest declares Which Java class accepts the launcher intent
Sample App (1/7) • Click on the icon and get the startup • Launcher activity is started by the sending of a special intent – the Launcher intent o Application Manifest declares which Java class accepts the launcher intent 3

Sample App(2/7) Left side is a menu for different views The activity has a few fragments(sub activity) for navigation Google Play Music o Youtube tutoria My Library Tablet Click on updates Fragment B My Library Activity A contains ragment A and Fragment B
Sample App (2/7) • Left side is a menu for different views • The activity has a few fragments (subactivity) for navigation o Youtube tutorial • Click on My Library 4

Lien Now M Lera Sample App( 3/7) Click Albums to get into the Albums sub-activity(fragment) o Tab UI can be easily achieved T LIbrary using Tab Host View Group ATIS Amenca Town American Hi-Fi L Form Widgets Click an album name Amencan idiot 用Gdew[ Scrollview 已 HorizontalScrollview Q SearchView Adagio sostenuto Marre bokar 49 WebView 5
Sample App (3/7) • Click Albums to get into the Albums sub-activity (fragment) o Tab UI can be easily achieved using Tab Host ViewGroup • Click an album name 5

Sample App(4/7) Shows the album in a different activity Click on a track for immediate d172 playback Click adds it to the task bar o Launches a service to play Moonlight Sonat Click on the back button to return to the previous activity Allegretto o Android maintains a stack of Presto agitato activities for "back Refer to http://developer.androidcom/guide/components/tasks-and-back-stack.html 6
Sample App (4/7) • Shows the album in a different activity • Click on a track for immediate playback o Click adds it to the task bar o Launches a service to play • Click on the back button to return to the previous activity o Android maintains a stack of activities for “back” 6 Refer to: http://developer.android.com/guide/components/tasks-and-back-stack.html

● Sample App(5/7) Moon ight Sorata Playback continues, even if the user navigates away Even if the user locks the phone as long as the user does not shut down the app 7
Sample App (5/7) • Playback continues, even if the user navigates away • Even if the user locks the phone, as long as the user does not shut down the app 7

Sample App(6/7) Service can be controlled by a widget when locked Also from the notification bar By clicking the notification bar, we can get back to the musIc player 17:31-=sn Moonlight Sonata Screenshot captured USB debugging cornette Adagio sost Connected as a media device Allegretto Presto agitato Manne taian 8
Sample App (6/7) • Service can be controlled by a widget when locked • Also from the notification bar • By clicking the notification bar, we can get back to the music player 8

Sample App(7/7) Service interrupted when a call come Home 04-660HME o a Broad cast event that all the INCOMING CALL (registered)apps would receive Resumes after the call hangs up 9
Sample App (7/7) • Service interrupted when a call come o A Broadcast Event that all the (registered) apps would receive! • Resumes after the call hangs up 9

Listen Now My Library Amerca Town: Amencan H-F Adag o sostenuto Mamre han 17:31 Home tito Moonlight Sonata Adagio sostenuto Presto agitato 10
10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 泛型编程 Generic Programming(PPT讲稿)Templates.ppt
- 北京大学SAS俱乐部:SAS软件会员培训(PPT讲稿)SAS编程语言入门.ppt
- 中国科学技术大学:《数据结构及其算法》课程电子教案(PPT课件讲稿)第三章 栈和队列.pps
- 白城师范学院:《数据库系统概论 An Introduction to Database System》课程教学资源(PPT课件讲稿)第六章 关系数据理论.pptx
- 安徽广播影视职业技术学院:《ASP动态网页设计实用教程》课程教学资源(PPT讲稿)第1章 ASP基础(贾海陶).ppt
- 《MATLAB应用基础》课程教学资源(PPT课件讲稿)第4章 MATLAB的数值计算.ppt
- 《编译原理》课程教学资源(PPT课件讲稿)第七章 中间代码生成.ppt
- 上海交通大学:Basic Raster Graphics Algorithms for Drawing 2D Primitives.ppt
- Transport Layer Identification of P2P Traffic.ppt
- 复旦大学:《数据库基础与应用》课程PPT教学课件(Access案例教程)第1章 数据库基础知识.pptx
- 香港科技大学:Advanced Topics in NextGeneration Wireless Networks.ppt
- 《编译原理》课程教学资源(PPT课件讲稿)第五章 语法分析——自下而上分析.ppt
- 香港城市大学:Introduction to Real-Time Systems(Design and Analysis of Algorithms).pptx
- 《网站设计与建设 Website design and developments》课程教学资源(PPT课件讲稿)第一部分 Web基础知识 第3章 图形与Web设计.ppt
- 《汇编语言》课程PPT教学课件:第三章 80x86寻址方式和指令系统.ppt
- 清华大学:高校信息门户建设(PPT讲稿).ppt
- 《计算机辅助设计 Computer Aided Design》课程PPT教学课件:第一篇 CAD技术 第一章 几何造型方法介绍和分类.ppt
- 西安电子科技大学:《操作系统 Operating Systems》课程教学资源(PPT课件讲稿)Chapter 02 进程和线程 Processes and Threads.ppt
- 《数字图像处理 Digital Image Processing》课程教学资源(PPT课件讲稿)第2章 图像的基本知识及运算.ppt
- 江苏海洋大学(淮海工学院):《Java面向对象程序设计》课程教学资源(PPT课件讲稿)第3章 Java 面向对象编程 3.1 面向对象软件开发概述.pptx
- 计算机问题求解(PPT讲稿)算法在计算机科学中的地位(算法的效率).pptx
- 《计算机组装与维修》课程教学资源(PPT讲稿)第7章 显示器.ppt
- 《Java语言程序设计》课程教学资源(PPT课件讲稿)第四章 Applet及其应用.ppt
- 《编译原理实践》课程教学资源(PPT讲稿)词法分析程序的自动生成器LEX.ppt
- 华中科技大学:《面向对象程序设计》课程PPT教学课件(Visual C++ 编程)第2讲 Visual C++ 6.0开发环境.ppt
- 东南大学:《泛型编程 Generic Programming》课程教学资源(PPT课件讲稿)Chapter 14 Templates.ppt
- Coded Caching under Arbitrary Popularity Distributions.pptx
- Distributed Systems and Networking Programmin(SOAP – Introduction).ppt
- 北京师范大学现代远程教育:《计算机应用基础》课程教学资源(PPT课件讲稿)第5章 Microsoft Excel 2010.pptx
- 图形处理及多媒体应用(PPT课件讲稿).pps
- Vitebi 译码.ppt
- 香港城市大学:Rank Aggregation in MetaSearch.ppt
- 《计算机网络技术》课程教学资源(PPT课件讲稿)第5章 广域网.ppt
- 中国科学技术大学:《现代密码学理论与实践》课程教学资源(PPT课件讲稿)第二部分 公钥密码和散列函数 第8章 数论入门(苗付友).pptx
- 中国科学技术大学:《计算机体系结构》课程教学资源(PPT课件讲稿)向量体系结构.pptx
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)面向对象的分析与设计简介 OOA & OOD:An introduction.ppt
- 北京师范大学现代远程教育:《计算机应用基础》课程教学资源(PPT课件讲稿)第1章 计算机常识(主讲:马秀麟).pptx
- 《并发控制技术》课程教学资源(PPT课件讲稿)第7章 事务管理 transaction management.ppt
- 山东大学软件学院:非线性规划(PPT讲稿)一维搜索方法.ppt
- 合肥工业大学:《计算机网络技术》课程教学资源(PPT课件讲稿)第4章 交换网的运行.ppt