Windows 8 Preview Samples - windows-8

I have downloaded the Metro Style Application Sample that is available on the Microsoft Web Site. There are lots of examples that shows how you can interact with the hardware device (sensors,gps,etc). I have of course downloaded the Windows 8 Developer preview to execute those examples. My question is : how can I test those samples that uses the device hardware (gps, accelerometer) or that accesses to the phone features (sms,etc) using the emulator?
At the moment there are not devices that support windows 8 (the first phone will probably come out this autumn) ?
I'd like to start to develop some metro style applications to be ready when windows 8 store will be online but using just the emulator is a big limitation isn't it?

Yes and no. There are slate devices that can run the Windows 8 Dev Preview just fine.
If you are unable to get one of these, one option is to create your own interfaces for all the devices. Underneath you can have two implementations.
First one, you connect to the actual underlying devices via the Windows 8 APIs. Sure you won't be able to test these until you have a device but such is life.
The second implementation can be a dummy one. For example, you can have a thread running and every 2-3 seconds publishing some GPS event.
That way you at least have some dummy device data coming in that you can test with for the time being.

Related

UWP access buttons

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.
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
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

Kinect- test data to simulate multiple tracked people

I'm building a Kinect application in Unity (C#) that tracks multiple people. My stumbling block is how to test this without having several live 'actors' in front of the sensor.
I know Kinect Studio allows you to record live streams, but don't think this can be played back so that it feeds a Unity app. I am using the Kinect for Windows Unity package as a starting point.
https://dev.windows.com/en-us/kinect/tools
Any Kinect or Unity experts care to chime in?
Actually you can use recorded data to playback them without any "actors".
While you are running your app (and without the need of an actual Kinect device plugged in your PC), open Kinect Studio and chose Open (Read-Only) from File. Click then on the Connect icon under the Play tab:
After that, using the Play icon (the typical triangular-shaped one), your recordings will be send to the KinectService, so you can test your app without any actors.

Is an Windows 8.1 Emergency App for Windows Store doable?

At my current level of knowledge, I think it is not possible, to develop an emergency or time critical alarm app for Windows 8.1 as a Windows Store App (no Desktop).
Maybe also Windows Phone 8 would fit such app scenario, for having smaller devices to carry around.
For (fictitious) example you have a blind person walking down a road, now he or she unfortunately enters a area, where no one should walk around without seeing something, then the app should warn the person with a toast notification (with sound or vibration) or some UI related function if the app is on top but the Screen is turned off.
As Windows 8.1 sets time limits to the background tasks to safe battery life, I think it is not possible to build such an app on that plattform.
A similar scenario is this question Location tracking windows 8, but it was Windows 8 he asks about and now it is 1 year over and I hope there is something new which I have missed.
Maybe there is way to hook up the Tracking Service?
If the interaction works for you, you would want to create a windows phone app that supports running in the background much the way that GPS navigation applications work (the application must be navigating for it to run in the background).
How to run location-tracking apps in the background for Windows Phone 8
Monitoring geolocation this way will be timely and you can create toast notifications, but you have to be wary of when the application will be deactivated. Whether the platform will work for you depends on your requirements and centers around deactivation. Take a look to see if the conditions for deactivation don't meet your standards, and implement a proof of concept.

What are the equivalents of intents in Windowsphone 8 application development?

I thought of an app to upload photos when they are taken. How do I notify my app when a photo has been taken in wp8 programmatically? Are there anything similar to intents in android? In android, I would listen for an intent when a photo has been taken and get that photo. In my windows phone 8 application. how do I get the system to notify my application when the photo has been taken and process it?
There is a specific API since Windows Phone 8 that allows auto-uploading photos for third-party apps: Auto-upload apps for Windows Phone 8 (MSDN)
Maybe this is not exactly what you are looking for since the agent will only launch under certain conditions and not immediately when a new photo is taken. For example, Wi-Fi and an external power source are required, in order to reduce the battery drain.
However that's the only viable solution for auto-uploading photos in a background task.

Locked Windows 8 For POS

I've developed a Windows 7 app using the Surface SDK for a POS application (ordering drink/food from your table using tactile screen).
I'd like to start migrating to using a Metro App, as I fear the Surface SDK will die soon (and I'd like the app to evolve).
My biggest issue, concerns Windows 8 and how to "lock" it for public usage.
Basically I'd like the machine to boot and run my metro app, and of course prevent the user from accessing the OS using charms or other gestures.
I know how to secure a Windows 7 and older, but somehow the new metro system feels like it's going to be harder to do such a simple task.
I do believe the same GPO on Windows 7 is applicable to Windows 8 as well, with a few exceptions. There are some discussions on the net which I found useful (I needed to lock down a few Windows 8 tablets and these got me going). The only problem is that I haven't figure out how to lock down an RT tablet.
Windows 8 Tablet Lockdown
Discussion on locking down windows 8 start screen
In addition to GPO, something else we've done for touch devices(in our case Surface Pro) is build a custom enclosure that overlaps all the screen edges(so you're putting the device in a case but the case covers up a bit of the touchscreen) so users' can't bring up the Charm menu, switch apps or use the "Microsoft" button. You can turn off switching from previous app by swiping from the left in the OS.
It is a bit severe but you are putting it in a public setting so I imagine you were planning to put it in an enclosure anyway.