version:1.0
update:2021-10-13 18:52:13 fix:去除okgo,rxAndroid1,优化依赖 add:切换到奥乐云平台
This commit is contained in:
42
app/src/main/java/com/aoleyun/sn/service/RemoteService.java
Normal file
42
app/src/main/java/com/aoleyun/sn/service/RemoteService.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.aoleyun.sn.service;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.aoleyun.sn.IGetLicenseInterface;
|
||||
import com.aoleyun.sn.utils.Logutils;
|
||||
import com.aoleyun.sn.utils.SPUtils;
|
||||
|
||||
public class RemoteService extends Service {
|
||||
private String TAG = RemoteService.class.getSimpleName();
|
||||
|
||||
public RemoteService() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
Logutils.e(TAG, "onBind: ");
|
||||
return mBinde;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
return super.onStartCommand(intent, flags, startId);
|
||||
}
|
||||
|
||||
IGetLicenseInterface.Stub mBinde = new IGetLicenseInterface.Stub() {
|
||||
@Override
|
||||
public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLicense() throws RemoteException {
|
||||
String ebagCode = (String) SPUtils.get(RemoteService.this, "ebagCode", "");
|
||||
Logutils.e(TAG, "getLicense: " + ebagCode);
|
||||
return ebagCode;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user