Android Service 组件
Service是Androd系统提供的四种组件之一,它的地位和Activity是并列的,只不过没有Activity的使用频率高。顾名思义Service就是运行在后台的一种服务程序,一般很少和用户交互,因此没有可视化界面。 下面我们演示一下如何创建一个Service: 1:我们通过布局文件layout/main.xml创建一个启动、停止、及绑定一个Service <?xml version= "1.0"encoding= "utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <Button android:id="@+id/startButton01" android:layout_width="wrap_content" android:l...








