文件名称:android service demo
文件大小:651KB
文件格式:ZIP
更新时间:2017-05-20 10:23:29
service demo
android开发中sercie的简单事例 package com.example.servicedemoactivity; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.util.Log; public class ServiceDemo extends Service { private static final String TAG = "ServiceDemo"; public static final String ACTION = "com.example.servicedemoactivity.ServiceDemo"; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub Log.e(TAG, " onBind "); return null; } @Override public void onCreate() { // TODO Auto-generated method stub Log.e(TAG, " onCreate "); super.onCreate(); } @Override public void onStart(Intent intent, int startId) { // TODO Auto-generated method stub Log.e(TAG, " 1onStart "); super.onStart(intent, startId); } @Override public int onStartCommand(Intent intent, int flags, int startId) { // TODO Auto-generated method stub Log.e(TAG, " onStartCommand "); return super.onStartCommand(intent, flags, startId); } }
【文件预览】:
ServiceDemoActivity
----res()
--------drawable-ldpi()
--------values-v11()
--------values-v14()
--------drawable-hdpi()
--------drawable-xhdpi()
--------drawable-xxhdpi()
--------values()
--------drawable-mdpi()
--------layout()
----proguard-project.txt(781B)
----ic_launcher-web.png(50KB)
----assets()
----.settings()
--------org.eclipse.jdt.core.prefs(177B)
----src()
--------com()
----.project(855B)
----.classpath(475B)
----project.properties(563B)
----AndroidManifest.xml(1KB)
----libs()
--------android-support-v4.jar(633KB)