You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi TianHang,
我们想在车机娱乐系统上和米家的设备互动互通,想获取到米家设备的状态以发送命令给设备,据了解应该是通过这个mijiaSDK接入,测试阶段没有服务器,已申请企业组,在小米开放平台创建了应用(智能家庭服务权限申请被拒了,原因是该能力仅面向智能硬件已接入小米IOT平台的企业开放重新申请审核中),把demo的包名改成了创建应用的包名,同时替换了APPID和APPKEY,这样的话点击demo中的MIACCOUNTLOGIN button会遇到NumberFormatException的问题,应该是格式转换中传递参数的问题,异常log如下:
05-16 14:36:23.246 14116 14116 E AndroidRuntime: FATAL EXCEPTION: main
05-16 14:36:23.246 14116 14116 E AndroidRuntime: Process: com.aptiv.aptivdemo, PID: 14116
05-16 14:36:23.246 14116 14116 E AndroidRuntime: java.lang.NumberFormatException: null
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at java.lang.Long.parseLong(Long.java:557)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at java.lang.Long.valueOf(Long.java:808)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.account.XiaomiAccountGetPeopleInfoTask.(XiaomiAccountGetPeopleInfoTask.java:38)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.activity.main.AccountActivity.processAuthResult(AccountActivity.java:183)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.activity.main.AccountActivity.access$200(AccountActivity.java:32)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.activity.main.AccountActivity$3.onPostExecute(AccountActivity.java:155)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.AsyncTask.finish(AsyncTask.java:755)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.AsyncTask.access$900(AsyncTask.java:192)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7116)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
Hi TianHang,
我们想在车机娱乐系统上和米家的设备互动互通,想获取到米家设备的状态以发送命令给设备,据了解应该是通过这个mijiaSDK接入,测试阶段没有服务器,已申请企业组,在小米开放平台创建了应用(智能家庭服务权限申请被拒了,原因是该能力仅面向智能硬件已接入小米IOT平台的企业开放重新申请审核中),把demo的包名改成了创建应用的包名,同时替换了APPID和APPKEY,这样的话点击demo中的MIACCOUNTLOGIN button会遇到NumberFormatException的问题,应该是格式转换中传递参数的问题,异常log如下:
05-16 14:36:23.246 14116 14116 E AndroidRuntime: FATAL EXCEPTION: main
05-16 14:36:23.246 14116 14116 E AndroidRuntime: Process: com.aptiv.aptivdemo, PID: 14116
05-16 14:36:23.246 14116 14116 E AndroidRuntime: java.lang.NumberFormatException: null
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at java.lang.Long.parseLong(Long.java:557)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at java.lang.Long.valueOf(Long.java:808)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.account.XiaomiAccountGetPeopleInfoTask.(XiaomiAccountGetPeopleInfoTask.java:38)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.activity.main.AccountActivity.processAuthResult(AccountActivity.java:183)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.activity.main.AccountActivity.access$200(AccountActivity.java:32)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.mi.activity.main.AccountActivity$3.onPostExecute(AccountActivity.java:155)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.AsyncTask.finish(AsyncTask.java:755)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.AsyncTask.access$900(AsyncTask.java:192)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7116)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
05-16 14:36:23.246 14116 14116 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
我账号下家里有一台 米家智能摄像机云台版,其实目的就是想和米家的设备互通,获取设备状态以及发送命令给设备,因为没有服务器,所以通过授权码授权模式是不是不可用?那账号接入中的回调地址也没发修改填写了。
1.这种情况只能用隐式授权模式吗?
2.获取设备列表是否和申请应用的家庭服务权限有关,还是只和登陆的账户有关?
3.能否获取米家官方的设备(电视,门锁,空调,扫地机器人等),还是只能控制企业自己的硬件?
呈请解惑,多谢!
mi.log
The text was updated successfully, but these errors were encountered: