This commit is contained in:
yonghyon
2024-03-08 09:39:24 +09:00
parent b089b218e3
commit 2a3f5b4b85
6 changed files with 41 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import LS2Request from "./LS2Request";
import * as Config from '../utils/Config';
export const getConnectionStatus = ({ onSuccess, onFailure, onComplete }) => {
if (process.env.REACT_APP_MODE === "DEBUG") {
@@ -87,3 +88,19 @@ export const getHttpHeaderForServiceRequest = ({
});
}
};
export const getDeviceId = (parameters, {onSuccess, onFailure, onComplete}) => {
if (typeof window === 'object' && window.PalmSystem) {
return new LS2Request().send({
service: 'luna://com.webos.service.sm',
method: 'deviceid/getIDs',
subscribe: false,
parameters: parameters,
onSuccess,
onFailure,
onComplete
});
}else{
onSuccess({returnValue: true, idList: [{idValue: Config.DEBUG_WINDOW_DEVICEID, idtype:"LGUDID"}]});
onComplete();
}
};