Win8 Compass, false readings - windows-8

I have been confused for a long time by the Compass in Windows 8.
I knew that there is a API called "Compass" in Devices.Sensors, and I can use it to get the the compass reading as a magnetic-north or true-north value.
You can see a sample in Microsoft help: (Compass sensor sample)!
The problem is the value is not correct at all and the value is almost ridiculous.
To get more information, I searched some apps in Windows 8 APP STORES. I found some similar compass apps, such as "Quick Compass"/"Simple Compass"/"Compass APP"
The values from these apps are the same as mine. They are all not correct.
The devices I tested are Surface and Tablet2.
So I would like to get some help from you. If you ever used compass API and did some related research about Windows 8 sensors. Please give me some clues.

Related

is there a way to get pressure sensitivity of tablet thorugh javascript

I want to make a little painting program. So i am going over if it's even possible. As with all good painting programs it needs to have pressure sensitivity. And i don't think i have ever come across anyway to get pressure sensitivity of mouse/tablet. Is there a workaround.
The thing i have come closest to is touch event that is supposed to have pressure property.
This question has been asked before but that was like in 2009. I am hoping that there would be something available this time.
Chrome apps are also an option.
As far as I know only Firefox support this through a proprietary property on the event object:
var pressure = event.mozPressure;
which keeps a value between 0.0 and 1.0.
Wacom has a plugin that can be installed to give browsers an API to read these sort of values from but I guess it only works with their own tablets.
Hello from the future world of 2022!
There is a PointerEvent API that appears to be supported by major browsers, and pressure can be read out from the PointerEvent.pressure property.
tldraw is an example of a project using this API.
Notes on operating system support for this:
macOS
I can confirm pressure-sensitivity with tldraw's drawing tool works for me on macOS, with either Chrome or Firefox, and a cheap Wacom tablet. Safari did not.
Linux
Chrome on Linux works out of the box; I used the Flatpak version. Your mileage may vary with the .deb or Snap package.
For Firefox, you may need to do this or this to get pressure-sensitivity working. There seems to be a regression with Xinput 2 support being tracked by bug #1207700, so maybe this will be fixed some day.
Windows
I don't imagine you'll have any problems on Windows, but I'm unable to test.
If you were interested in creating a web-based paint program in 2022, you might have a look at Pressure.js, which claims to support both pressure input and "3D Touch" present on some Apple devices in a single library. I have no first-hand experience with this library, though, so I can't back up those claims.
It's true this comes 9 years too late for your project. Sorry about that. But this question ranks high in search results for "pressure sensitivity javascript api," so perhaps it can still be useful to someone.

Developing apps for Xbox One?

I've heard that Xbox One application development is quite similar to Windows 8, but I haven't found much to suggest why, or what differences there are.
Is there any documentation about creating Xbox One applications (not games, apps.. like Netflix, etc), or even how to apply to obtain such information?
I've been trying to find more details myself. It sounds like the ability to develop apps is coming:
http://arstechnica.com/gaming/2013/10/wait-can-the-xbox-one-really-run-generalized-windows-8-apps/
Nothing to announce today, but when I talk about that common core,
you're seeing that common core in action, being able to target other
devices over time that run the Windows 8 engine.
If you want to know about how to get a head start about thinking about
developing for Xbox One, the logical thing to do is [to] go build
Windows 8 applications.
There are some additions in WinRT designed to allow interaction with Kinect:
http://www.oxm.co.uk/59024/features/what-its-actually-like-to-develop-for-xbox-one-microsoft-explains/?page=2
The applications are very similar to Windows 8, like we brought a lot
of the Windows 8 namespace - WinRT can be used for building those
applications, the time it takes to port a Windows 8 application to the
new Xbox? It's super, super easy. There's some things we added to the
platform for handling gestures, for handling voice and handling ten
foot UI paradigms.
Right now it appears the most you can do is try out your app ideas in WinRT and wait until an Xbox One SDK appears.
I've worked on a few of the launch apps for Xbox One. Unfortunately, you cannot get an app on the platform unless you've been invited (at this point in time), however rumour has it that MS may open up the platform a bit more in the next year or two.
All documentation and information regarding the development itself is all under strict NDA, so it's highly unlikely that you'll find any in depth details.
If you're interested, you can always try contacting the Xbox team for more information.
Important update on this topic:
Every Xbox One is now capable of going into developer mode via the Xbox Dev Mode App. Games and more importantly apps can now be developed by anyone.
FAQ on this topic: http://support.xbox.com/en-US/xbox-one/apps/developer-mode-activation-app-faq
Microsoft currently does not have any official documentation for Xbox One Apps, however it seems that if you go here: http://www.xbox.com/en-us/Developers/id You can register to become a developer for the Xbox One and get the development kit so you can develop apps for it.
Main information about developing for the Xbox can be found at http://www.xbox.com/en-US/developers, which includes how to register for an Xbox One development Kit
and the different tools and middleware that can be used to create games/apps for the Xbox. More documentation for the Xbox One will most likely get published by the end of this year.
To add to what I said, I recommend creating apps for the windows phones as it will show Microsoft that you can successfully build apps for their products. If your app gets enough downloads they will probably allow you to create an app for the Xbox One because you already have a track history
You could use Unity because it can use cross-platforms like Xbox, iPad, iPhone, PS4 and more. Also you can create 3D and 2D apps for development and to upload it to the phone you can use Xcode to build and run the unity project on the phone. If you get stuck you can always go to https://unity3d.com.

Multiple players via game center for iOS 7

Seems like Game center promised this feature to let multiple players play the same game at real time.
By researching a bit, just found http://www.raywenderlich.com/3325/how-to-make-a-simple-multiplayer-game-with-game-center-tutorial-part-22, but I would not use the GKSession to find out each others.
Then go to http://www1.in.tum.de/lehrstuhl_1/people/98-teaching/tutorials/508-sgd-ws13-tutorial-multiplayer-games , seems like more sensible for iOS 7 without GKSession.
Just want to get a quick test with some sample support multiple players, even in the same Wifi, or just Bluetooth by using multiple peer to peer in iOS 7.
Question here to get the simple sample or any specific clues for this. Thanks,
You have a new framework dedicated to peer connections in iOS7 called MultipeerConnectivity. You can find an exemple on the main's developer website here.
There is also a video at the WWDC 2013 introducing it : Nearby Networking with Multipeer Connectivity
I just followed the guide by Apple:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Users/Users.html#//apple_ref/doc/uid/TP40008304-CH8-SW19
It has all the information, and is accurate. Works with iOS 7.
I don't use GKSession for anything -> All the information I need is available in the GKMatch object.

Is it possible to record screen with Titanium / Appcelerator?

We're in process of developing a desktop application which needs to record user's screen once he clicks a button. I read a tutorial about Adobe AIR, which says it is easy to do with AIR: http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html
But our preference is Titanium as we've explored it a little bit. So I want to know is that even possible? If yes, how can we get started with?
There's also an interesting solution which uses Java applet for recording, as demonstrated here: http://www.screencast-o-matic.com/create?step=info&sid=default&itype=choose
But again, we're not sure about JAVA and would like to know how can it be done? or if its even possible to run a JAVA applet in Titanium?
When you say "record screen", I'm assuming you mean video. Correct?
The only way to do this in Titanium Desktop right now is to take a bunch of screenshots and string them together (encoding would probably need to be done server-side).
Depending on how long your videos need to be, this probably won't work for you. I'm also not confident in how quickly you could capture screenshots, and if it would have a high enough frame rate to be usable.
Past that, a module could be developed for Desktop to support some native APIs to record video. That's not something I see on the horizon, though.
I hope this helps, albiet a rather dismal answer. -Dawson

How can I change the audio output device in Objective-C?

I'm building a simple Cocoa app and I want to direct the audio output to a specific device, instead of the system selected one. I know some apps, like Skype, let you select where to send the output to. How do they do this?
I tried the MTCoreAudio framework but I can't even compile my app (or their AudioMonitor demo) with it included and the errors aren't helpful (_objc_fatal). Are there any complete examples that I can learn from? So far my searches haven't turned anything up.
Thanks!
The CAPlayThrough example on the Mac Dev Center Sample Code library shows how to list all of the available input and output devices, and select a default device from a menu.
Have you looked through the sample code on http://developer.apple.com ?
Look at these projects http://developer.apple.com/mac/library/navigation/index.html?section=Resource+Types&topic=Sample+Code
Namely the DefaultAudioUnit project.
I should say that working with Core Audio is more challenging than Cocoa. Most of the API's are C-based (I find that harder). You should read the Core Audio programming guide as well to get a sense of how the audio system is put together.