- package com.example.mywidget;
- import android.app.Service;
- import android.content.Intent;
- import android.os.IBinder;
- public class MyService extends Service {
- public MyService() {
- }
-
- @Override
- public int onStartCommand(Intent intent,int flags,int startId)
- {
- buildUpdate();
- return super.onStartCommand(intent, flags, startId);
- }
-
- private void buildUpdate()
- {
-
- }
-
- @Override
- public IBinder onBind(Intent intent) {
- // TODO: Return the communication channel to the service.
- throw new UnsupportedOperationException("Not yet implemented");
- }
- }
複製代碼 |