Okay I'm developing a win phone app, and I have buttons here and there and I want the phone to vibrate when someone hits a button.
I managed to do that with
using Windows.Phone.devices.Notification;
VibrationDevice v = VibrationDevice.GetDefault();
v.Vibrate(TimeSpan.FromSeconds(0.1);
However that vibration is rather strong and annoying to get everytime someone hits a button, I'm wondering, do we get access to the soft vibration? Like when someone hits the windows button / back key / search glass - those three buttons have a more soft vibration
For WP7.1 you could use XNA:
Microsoft.Xna.Framework.WindowsPhone.Input.GamePad.SetVibration(player, leftMotorStrength, rightMotorStrength)
However, for Windows Phone 8 this is not possible.
Please refer to MSDN for more details.
You can use a shorter timespan. Do some experiments on different devices. You might need to use different values for different devices.
I got a really nice soft vibration from Samsung ATIV Odyssey with TimeSpan.FromSeconds(0.01). However, HTC 8X seems to ignore a timespan this short - the results with 0.02 was somewhat inconsistent; 0.03 was a good one.
Related
Using Surface pro touch screen to select element in viewer works sometimes other times it seems to translate to a rotate/zoom action. In this case the viewer rotates/moves and the element is NOT selected.
When logging the events there are plenty of mouse down/up events along with mouse moves when it doesnt work. When select does work a single click event occurs.
Double click seems to work ok.
Zoom/rotate etc using standard tools works ok.
Using the keyboard cover touch pad that you can get for the Surface pro to move and click works as expected and the element is selected.
Running same application on a GETAC Windows 10 ruggadised tablet the select element works correctly so it seems related to the Surface Pro.
Unable to change browsers as cordova apps use IE11 on windows and that is currently fixed.
The only solution i can think of for the moment is to remove the standard navigation tools completely (somehow) and recreate a select mode tool that would ignore any mouse moves and use button down event to select element.
Any suggestions on how to fix this?
Tech Details:
Windows 10 Pro,
Surface Pro,
Browser: IE11,
Viewer version 2.11,
Other: WINJS81 cordova application
Thanks for any help
We've had problems with touch events on the Surface Pro in the past. It sounds like the edges of the touch screen are overly sensitive and are triggering extra touch points.
Does the problem happen if you are holding the device up, gripping with one hand, and using your other hand to touch/select a 3D object ?
Could you try doing a selection again, but this time, make sure you other hand is not holding the edge of the screen? (Perhaps place the device on the surface of a desk, so you are not holding it up)
Found a fix to this issue. In viewer3D in the base toolcontroller there is line
var kClickThreshold = 2;
This value is used further down in code to determine if singleClick has occured. It does it by comparing XY on down and up events.
var deltaX = _downX - event.canvasX;
var deltaY = _downY - event.canvasY;
_downX = -1;
_downY = -1;
if( Math.abs(deltaX) <= kClickThreshold && Math.abs(deltaY) <= kClickThreshold )
_this.handleSingleClick( event );
If movement is above this threshold it does not trigger singleClick if below it does.
Did testing and increasing the value to around 5-7 means that the selection of elements worked consistently. (there is still a minor rotate or zoom at same time as select occurs but I assume that this would be another part of viewer that would need adjusting)
Unfortunately it does require edit of viewer code but easy enough. I added code to overwrite standard value if external variable existed.
Would be nice for future viewer dev if more of these types of properties be exposed so that direct edit of code is not required.
Still it is good to have the source code to be able to debug at this level.
At a guess the Surface Pro 4 must have a more sensitive touch system or it could just be related to IE11 as well.
Im trying to open this link http://3dhd.co.il/mobile/170 in my chrome browser in samsung galaxy s6, and after about 2 minutes the browser crushes and im getting the message "Rats Web GL hit a snag".
I've tried following the chrome instruction (clear cookies etc), tried enabling the flags in chrome://flags.
How can i debug this problem and understand why is it happening,
i developed that scene, and i cant understand what i have done wrong.
Thanks.
Here's Suggestion .
Overlap vertices example :
It means that 3d mesh object is complex . Try to use blender ( free software ) open 3d object (import) click to enter edit mode . Then you can see numbers of vertex point. Best optimization for this example is to make convex optimise .
Also check materials !
See this answer :
Three.js project crashes mobile
Look at :
https://blender.stackexchange.com/questions/6253/how-to-convert-from-high-poly-to-low-poly
I'm using an API to get some data, but one of the JSON values, contains HTML inside of it. Is there a way for me to use the HTML tags that are inside the JSON value exactly like they are shown, instead of having to make the exact same HTML tags in my MVC view, and editing these ones out? If this wasnt descriptive enough heres an example of what i mean:
This is just one of the JSON values, I didnt wanna paste the whole thing:
"detail": "<h1>Overwatch Patch Notes – October 19, 2016</h1>\r\n\r\n<p>A new patch is now live on Windows PC. Read below to learn more about the latest changes.</p>\r\n\r\n<p>To share your feedback, please post in the General Discussion forum.<br />\r\nFor a list of known issues, visit our Bug Report forum.<br />\r\nFor troubleshooting assistance, visit our Technical Support forum.</p>\r\n\r\n<p>Please note that these changes will be rolled into a larger patch for PlayStation 4 and Xbox One at a later date.</p>\r\n\r\n<h2>BUG FIXES</h2>\r\n\r\n<p><strong>General</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue causing the default Overwatch spray to override a player’s chosen spray when watching a Play of the Game or Highlight</li>\r\n\t<li>Fixed an issue causing players to frequently disconnect while viewing Highlights</li>\r\n\t<li>Fixed a bug preventing the appropriate music from playing after a loss on the Junkenstein's Revenge Brawl</li>\r\n</ul>\r\n\r\n<p><strong>Gameplay</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug causing multiple issues when displaying data on the leaderboards</li>\r\n</ul>\r\n\r\n<p><strong>Heroes</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue preventing Ana’s Nano Boost callouts from being heard by the enemy team</li>\r\n\t<li>Fixed a bug preventing players from receiving credit toward the Healing Done commendation when healing D.Va’s mech</li>\r\n\t<li>Fixed a graphical issue that was preventing the liquid in Mei’s Endothermic Blaster from appearing</li>\r\n\t<li>Fixed a bug causing Reinhardt’s Charge to unexpectedly stop when crossing certain thresholds (e.g. when exiting a dropship)</li>\r\n\t<li>Increased the volume of Roadhog’s “Want some candy” voice line</li>\r\n</ul>\r\n\r\n<p><strong>Map</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug on Eichenwalde that caused some textures to stretch across the map for some players</li>\r\n</ul>\r\n".
You can use Html.Raw inside your view to use the raw string value:
#Html.Raw(Model.detail);
https://msdn.microsoft.com/en-us/library/gg480740(v=vs.118).aspx
Does Microsoft group WinPhone8 and WinRT device's displays into groups/categories as Apple (iOS: standard and retina) and Google (Android: ldpi, mdpi, hdpi, etc.) do?
WinPhone8 DPI range from about 220 up to 440, so I doubt that's all "standard".
I've searched but found nothing…
If someone could give me a link to the docs that would be great!
Why do I need this Info:
I'm adding WinPhone8 and WinRT support to my Unity3d Editor extension xARM.
It provides a sortable list of resolutions, display diagonals, … and DPI-Groups per platform. Currently the DPI-Group-Column is empty...
Windows Phone 8 and Windows RT devices aren't grouped into DPI categories.
However both platforms have their own scaling system which is based on resolution (not DPI). So it could be used for grouping, but it's not a very helpful info.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx
http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx
How to choose between the front and rear camera in a webapp?
also usefull for: How to choose between multiple microphones?
There is a live example on:
https://webrtc.github.io/samples/src/content/devices/input-output/
(This webrtc-link is new, and should work on Chrome mobile)
Link is from this answer - https://stackoverflow.com/a/35480435/2414207, which is discussing MediaDevices.enumerateDevices()[new] vs MediaStreamTrack.getSources()[deprecated] in depth.
You can find further information (slightly outdated now, but usefull to get the big picture) about this on:
http://www.html5rocks.com/en/tutorials/getusermedia/intro/#toc-gettingstarted
Scroll down and skip:
Feature detection
Gaining access to an input device
Setting media constraints
until
Selecting a media source
For reference: my former live example (broken)
https://simpl.info/getusermedia/sources/
They are using MediaStreamTrack.getSources()[deprecated],this is not working on Chrome 45 and Firefox 39 anymore.
For the new function MediaDevices.enumerateDevices() - see https://stackoverflow.com/a/35480435/2414207