Back to project page AndroidFinally.
The source code is released under:
GNU General Public License
If you think the Android project AndroidFinally listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.androidfinallyapp; /*from w w w.j a v a 2 s . com*/ import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.util.Log; public class ServiceOnStartCommand extends Service { private static final String TAG = "ServiceOnStartCommand"; @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub //onBind??unOnBind??????????????????? Log.i(TAG, "at onBind"); return null; } @Override public void onCreate() { // TODO Auto-generated method stub //????onBind????onStartCommand????????????onCreate???? super.onCreate(); Log.i(TAG, "at onCreate"); } @Override public int onStartCommand(Intent intent, int flags, int startId) { // TODO Auto-generated method stub //???????????????????,???????????????? Log.i(TAG, "at onStartCommand"); return super.onStartCommand(intent, flags, startId); } @Override public void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); Log.i(TAG,"at onDestroy"); } }