diff --git a/OSSDKDemo/app/libs/CloudserviceLib.jar b/OSSDKDemo/app/libs/CloudserviceLib.jar index 2ffee8b..0b9f8f8 100644 Binary files a/OSSDKDemo/app/libs/CloudserviceLib.jar and b/OSSDKDemo/app/libs/CloudserviceLib.jar differ diff --git a/OSSDKDemo/app/src/main/java/com/jeejio/ossdk/demo/MyApplicaion.java b/OSSDKDemo/app/src/main/java/com/jeejio/ossdk/demo/MyApplicaion.java index 047c038..e089099 100644 --- a/OSSDKDemo/app/src/main/java/com/jeejio/ossdk/demo/MyApplicaion.java +++ b/OSSDKDemo/app/src/main/java/com/jeejio/ossdk/demo/MyApplicaion.java @@ -1,6 +1,7 @@ package com.jeejio.ossdk.demo; import android.app.Application; +import android.provider.Settings; import android.util.Log; import com.jeejio.cloudservice.sdk.HMessage; @@ -22,7 +23,6 @@ public class MyApplicaion extends Application { public void onCreate() { super.onCreate(); registerOSSDK(); - Log.e(TAG, JeejioCloudService.SDK_VERSION); } @Override @@ -33,6 +33,18 @@ public void onTerminate() { private void registerOSSDK(){ + + //获取sdk版本信息 + Log.i(TAG, JeejioCloudService.SDK_VERSION); + + //获取设备id + String deviceid = JeejioCloudService.getDeviceId(this); + Log.i(TAG, "deviceId = " + deviceid); + + //获取userId + String userId = JeejioCloudService.getUserId(this); + Log.i(TAG, "userId = " + userId); + if (mCloudMessageListener == null){ mCloudMessageListener = new CloudMessageListener(); //注册云服务 diff --git a/README.md b/README.md index 8190868..5e802c3 100644 --- a/README.md +++ b/README.md @@ -118,12 +118,28 @@ public class InputEventListener implements OnInputEventListener { InputEventService.getInputEventService(mContext).unRegisterEventListener(mEventListener); ``` +**3、获取基础信息** + +```java +//获取sdk版本信息 +Log.i(TAG, JeejioCloudService.SDK_VERSION); + +//获取deviceId +String deviceid = JeejioCloudService.getDeviceId(this); +Log.i(TAG, "deviceId = " + deviceid); + +//获取userId +String userId = JeejioCloudService.getUserId(this); +Log.i(TAG, "userId = " + userId); +``` + ## 更新日志 | 版本号 | 发布时间 | 更新内容 | | ------ | ---------- | ------------------------------------------ | +| 1.2.1 | 2020.05.27 | ●增加获取userId、deviceId等基础信息接口 | | 1.1.1 | 2020.05.15 | ●增加sdk版本信息接口 | | 1.0.1 | 2020.03.24 | ●增加设备按键监听
●修改参数和返回值类型 | | 1.0.0 | 2019.09.27 | ●提供注册与云服务交互 |