57 lines
1.6 KiB
Java
57 lines
1.6 KiB
Java
package com.info.sn.service;
|
|
|
|
import android.app.Service;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.os.IBinder;
|
|
import android.util.Log;
|
|
|
|
import com.info.sn.KeepAliveConnection;
|
|
import com.info.sn.activity.MainActivity;
|
|
import com.info.sn.bean.AppInfo;
|
|
import com.info.sn.bean.BaseResponse;
|
|
import com.info.sn.network.HTTPInterface;
|
|
import com.info.sn.network.NetWorkManager;
|
|
import com.info.sn.network.api.ForceInstall;
|
|
import com.info.sn.utils.Utils;
|
|
|
|
import java.util.List;
|
|
|
|
import io.reactivex.Observer;
|
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
|
import io.reactivex.annotations.NonNull;
|
|
import io.reactivex.disposables.Disposable;
|
|
import io.reactivex.schedulers.Schedulers;
|
|
|
|
public class InitJpushServer extends Service {
|
|
public InitJpushServer() {
|
|
|
|
}
|
|
|
|
@Override
|
|
public IBinder onBind(Intent intent) {
|
|
// TODO: Return the communication channel to the service.
|
|
// throw new UnsupportedOperationException("Not yet implemented");
|
|
return new KeepAliveConnection.Stub() {
|
|
};
|
|
}
|
|
|
|
|
|
@Override
|
|
public void onCreate() {
|
|
super.onCreate();
|
|
}
|
|
|
|
@Override
|
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
|
// HTTPInterface.checkDevicesInfo(InitJpushServer.this);
|
|
HTTPInterface.getAllappPackage(InitJpushServer.this);
|
|
HTTPInterface.getForceInstall(InitJpushServer.this);
|
|
HTTPInterface.checkUpdate(InitJpushServer.this);
|
|
HTTPInterface.checkUpdate(InitJpushServer.this,"com.appstore.uiui");
|
|
return START_STICKY;
|
|
}
|
|
|
|
|
|
}
|