CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 通讯/手机编程 android开发

文件名称:android_service

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-11-16
  • 文件大小:
    942.29kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

本次实验主要是学习怎样在activity中启动一个service,启动的service的生命周期顺序是哪些,然后service通过广播机制向特定的activity传递数据,传送数据当然用的是intent,然后接收到该广播的activity读取intent中的数据,根据读取到的数据来更新activity的UI。

  关于怎样通过service广播机制来更新activity的UI,可以阅读网上的这篇文章:http://www.pocketdigi.com/20110303/197.html

  需要注意的是service类是继承的android框架中的Service类,程序中需要将写好的service在AndriodManiFest.xml中进行注册,注册方法和activity的注册类似。

  本程序的activity中有2个按钮和1个TextView,2个按钮分别用来启动service和停止service,然后在activtiy和service的生命周期函数中各自在后台打印出相关语句,同时为了方便观察,程序也直接将相关语句输出到了textview中。-This experiment to learn how to start a service in the activity start service order of the life cycle of which, and service through the broadcast mechanism to transfer data to a specific activity, transmission of data, of course with the An intent, and then receives the broadcast activity to read the intent of the data, according to the read data to update the activity of the UI. This article can be read online on how to update the activity through the service broadcast mechanism UI: http://www.pocketdigi.com/20110303/197.html need to pay attention to in the service class in the service class is inherited android framework The program will need to write the service in AndriodManiFest.xml register, similar to the method of registration and the registration of the activity. The activity of this program have two buttons and a TextView, 2 buttons are used to start the service and stop service, and then activtiy and service life cycle function in the background print out statements at the s
(系统自动生成,下载前可以参看下载内容)

下载文件列表

Android开发历程_13(Service的使用).pdf
service/
service/.classpath
service/.project
service/.settings/
service/.settings/org.eclipse.jdt.core.prefs
service/AndroidManifest.xml
service/assets/
service/bin/
service/bin/AndroidManifest.xml
service/bin/classes/
service/bin/classes/com/
service/bin/classes/com/example/
service/bin/classes/com/example/service/
service/bin/classes/com/example/service/BuildConfig.class
service/bin/classes/com/example/service/FisrtService.class
service/bin/classes/com/example/service/MainActivity$EndOnClickListener.class
service/bin/classes/com/example/service/MainActivity$MyReceiver.class
service/bin/classes/com/example/service/MainActivity$StartOnClickListener.class
service/bin/classes/com/example/service/MainActivity.class
service/bin/classes/com/example/service/R$attr.class
service/bin/classes/com/example/service/R$drawable.class
service/bin/classes/com/example/service/R$id.class
service/bin/classes/com/example/service/R$layout.class
service/bin/classes/com/example/service/R$menu.class
service/bin/classes/com/example/service/R$string.class
service/bin/classes/com/example/service/R$style.class
service/bin/classes/com/example/service/R.class
service/bin/classes.dex
service/bin/jarlist.cache
service/bin/res/
service/bin/res/drawable-hdpi/
service/bin/res/drawable-hdpi/ic_action_search.png
service/bin/res/drawable-hdpi/ic_launcher.png
service/bin/res/drawable-ldpi/
service/bin/res/drawable-ldpi/ic_launcher.png
service/bin/res/drawable-mdpi/
service/bin/res/drawable-mdpi/ic_action_search.png
service/bin/res/drawable-mdpi/ic_launcher.png
service/bin/res/drawable-xhdpi/
service/bin/res/drawable-xhdpi/ic_action_search.png
service/bin/res/drawable-xhdpi/ic_launcher.png
service/bin/resources.ap_
service/bin/service.apk
service/gen/
service/gen/com/
service/gen/com/example/
service/gen/com/example/service/
service/gen/com/example/service/BuildConfig.java
service/gen/com/example/service/R.java
service/ic_launcher-web.png
service/libs/
service/libs/android-support-v4.jar
service/proguard-project.txt
service/project.properties
service/res/
service/res/drawable-hdpi/
service/res/drawable-hdpi/ic_action_search.png
service/res/drawable-hdpi/ic_launcher.png
service/res/drawable-ldpi/
service/res/drawable-ldpi/ic_launcher.png
service/res/drawable-mdpi/
service/res/drawable-mdpi/ic_action_search.png
service/res/drawable-mdpi/ic_launcher.png
service/res/drawable-xhdpi/
service/res/drawable-xhdpi/ic_action_search.png
service/res/drawable-xhdpi/ic_launcher.png
service/res/layout/
service/res/layout/activity_main.xml
service/res/menu/
service/res/menu/activity_main.xml
service/res/values/
service/res/values/strings.xml
service/res/values/styles.xml
service/res/values-v11/
service/res/values-v11/styles.xml
service/res/values-v14/
service/res/values-v14/styles.xml
service/src/
service/src/com/
service/src/com/example/
service/src/com/example/service/
service/src/com/example/service/FisrtService.java
service/src/com/example/service/MainActivity.java

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com