zhangzengfei
2022-01-10 4496b59ab27d569df1da7ef634e02273b3a9618a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.alfeye.powerdemo;
 
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
 
import com.alfeye.a1io.DeviceControl;
 
public class MyService extends Service {
    public MyService() {
    }
 
    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        throw new UnsupportedOperationException("Not yet implemented");
    }
 
    @Override
    public void onCreate() {
        super.onCreate();
    }
 
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        DeviceControl.sendInformationScreen(this, false);
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        DeviceControl.sendInformationScreen(this, true);
        return super.onStartCommand(intent, flags, startId);
    }
 
}