0

Helloo all I'm currently developing an app for surface pro 3 that should be capable of:

  • detecting whether touchscreen was tapped and where
  • getting device information (product ID, amount of RAM, CPu model etc.) done by launching console application first which is capable of getting this information and saves it to a specific folder, UWP app can read its results from there and log them.
  • accessing sensor data like: accelerometer, gyroscope and ambient light sensor
  • testing cameras as i can command an app to make picture using either front or rear camera
  • testing microphones (both front and back)
  • testing speakers (i made synthesizer that is able to make beeps at given frequency at given stereo mode (left or right if both)
  • testing wifi - so it can connect to desired wifi network
  • bluetooth (swill working on it...)

I have already figured out quite a lot and put out a lot of work into it already, all listed tests are already developed on that UWP application so switching to completely different platform means rewriting whole app which I don't have time anymore.

UWP was chosen because this can run on different windows 10 devices and after completing this app the same app (with minor modifications) will be used on other windows 10 devices (like other surfaces and many different windows 10 phones)

This app will be automatically installed on a factory-resetted surface pro 3 that has no special configurations enabled, so tinkering with its settings is resource-hungry and not recommended process at all.

Now I have some other serious issues regarding of device: how can I test the functionality of all the buttons Surface pro 3 has ? It has 3 buttons: Volume up, Volume down and power button but pressing power button sets screen to clack and locks device. Can I make app override basic functionality of a button so that if button is pressed it detects it and logs its result. same question goes to volume up and down buttons.

Only similiar questions about this are here: Another thread on StackOverflow

I also cannot use same solution as I did with getting device information because test must be repetitive while app is running. (and UWP app cannot launch console application by itself)

Any help regarding this topic is highly welcome.

Community
  • 1
  • 1
LempsPC
  • 125
  • 1
  • 1
  • 9

2 Answers2

0

First for the power button behavior try this : https://www.windowscentral.com/how-customize-power-button-action-when-pressed-windows-10 I don't have a surface so I cannot test it

also, I do have some inputs and thoughts about your app: it seems to me that you are doing some sort of sanity check software for pieces of hardware I'd suggest looking into this

https://support.microsoft.com/en-my/help/4037239/surface-fix-common-surface-problems-using-surface-diagnostic-toolkit

https://www.lovemysurface.net/surface-diagnostic-toolkit/

additional thoughts of mine : Overriding hardware behavior programmatically ould be considered as a harmful action especially when it comes to prebuilt devices such as the surface and by extension, I don't foresee MS providing API's for such a capability also such button might be communicating to the hardware directly rather and doesn't go through the software, runtime or the OS at all, changing it manually using the link i provided might be reflecting some registry settings changes but since UWP apps run in containers and cannot directly edit registry there is a dirty workaround look into this

read/write registery key file in uwp

hope this would help

maces13
  • 305
  • 3
  • 13
0

You can use SystemInformation helper class from windows community toolkit it gives you a lot of details about the device.

https://learn.microsoft.com/en-us/windows/communitytoolkit/helpers/systeminformation

halfer
  • 19,824
  • 17
  • 99
  • 186
Muhammad Touseef
  • 4,357
  • 4
  • 31
  • 75