EmilioBlackBird Posted June 25 Author Share Posted June 25 This is the application created in Csharp, winform and Visual Studio. I want the battery information to be seen in the holes prepared for it. It is an exe application. I send image of the code. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted June 25 Share Posted June 25 4 minutes ago, EmilioBlackBird said: This is the application created in Csharp, winform and Visual Studio. I want the battery information to be seen in the holes prepared for it. It is an exe application. I send image of the code. Do you mean your code is able to send information from device to PC? Link to comment Share on other sites More sharing options...
EmilioBlackBird Posted June 25 Author Share Posted June 25 Yes, I want this information In my csharp external application Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted June 25 Share Posted June 25 Hi @EmilioBlackBird, Your title wrote "battery info", and now you want all information of the device? Link to comment Share on other sites More sharing options...
EmilioBlackBird Posted June 25 Author Share Posted June 25 I want battery info, but I would like to know, just in case, if I can get more information. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted June 25 Share Posted June 25 Hi @EmilioBlackBird, For getting battery info, you can get it by using below code, using Wave.Native; var battPercentage = Interop.WVR_GetDeviceBatteryPercentage(WVR_DeviceType.WVR_DeviceType_HMD); For device info such as serial number, I am not able to get it, not sure is it because of permission issue. I tried getting serial number by AndroidJavaClass ajc = new AndroidJavaClass("android.os.Build"); string serialno = ajc.CallStatic<string>("getString", "ro.serialno"); But from the log I get 06-25 20:44:03.733 7652 7680 E libc : Access denied finding property "ro.serialno" And it returns unknown. I will need to search online to see how to resolve this issue. UPDATE: For API level 29 and above, you are not allowed to get serial number. Link to comment Share on other sites More sharing options...
EmilioBlackBird Posted June 26 Author Share Posted June 26 The build we are doing is for computer, we don't use the HTC API to make the build for the device. It is an .exe. And the application is external. The only thing we use is Vive Streaming. Well we want that battery information to be seen in the external application, created in csharp. But both the application and the build are not for the device. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted June 26 Share Posted June 26 Hi @EmilioBlackBird, Your project did import any plugin such as SteamVR Unity Plugin? Link to comment Share on other sites More sharing options...
EmilioBlackBird Posted June 26 Author Share Posted June 26 Yes. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted June 26 Share Posted June 26 Hi @EmilioBlackBird, I was told that you are able to get battery information(Prop_DeviceBatteryPercentage_Float) from SteamVR Unity Plugin. Could you try that? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now