Prevent Apple Watch from turning off the screen - watchkit

I'm writing an extension for the Apple Watch which aim is to guide the user through a set of steps. I don't have the watch to test the extension but I need to be sure that the screen will remain always on until all the steps are completed.
Does anyone can tell me when Apple Watch display is turned off or if there any way to prevent the display from turning off (similar idleTimerDisabled from UIApplication in iOS)?

There is currently no way to programmatically prevent the display from being turned off. Otherwise, we can speculate that as long as the user is interacting with your app, the screen will remain on. Worst case, you'll receive a didDeactivate when the app is suspended and a willActivate when the user wakes it up to continue (assuming the Watch app isn't terminated in between).

As of watchOS 4 you can use this boolean to keep the display on, and this will rotate the UI when the arm is turned.
https://developer.apple.com/documentation/watchkit/wkextension/2868464-isautorotating

Consider HKWorkout.
it ensures that your app appears whenever the user checks their watch
https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings

It seems when the system is using the mic, it forces the screen to stay on — I’ve noticed this even in third party apps that allow sending voice messages. Here is the view that the user sees when screen idling is disabled in this way:
Note that this is a third party app and the screen didn’t turn off even after 2 full minutes!

Related

A-Frame: how to simulate tracked controllers when developing on desktop?

My HTC Vive is set up in a different room to my developer workstation. When developing for A-Frame, I understand I can: use my desktop monitor instead of a headset; use mouse dragging instead of motion controls; use WASD instead of room-scale tracking. However, what is the preferred way to simulate the tracked controllers?
For example, how can I move the cubes in this demo from my desktop: https://aframe.io/examples/showcase/tracked-controllers
This is not yet released, but we're working on tools to be able to record camera and controllers, output to a file, and then you can load it up any device and replay the camera and controller pose and events without needing a headset. Project is led by Diego:
https://github.com/dmarcos/aframe-motion-capture
http://swimminglessonsformodernlife.com/aframe-motion-capture/examples/
This will become the common way to develop for VR without having to enter and re-enter VR to test each code change, and to do it on the go

Triggering Windows Store background task from Band tile opened events

Is there a good way to trigger a Windows Store background task when a band tile is opened? And are there any examples for working with the band from a background task with the latest SDK? I have seen mentions of the ability to do so but can't find any code examples of this.
I have a scenario where the tile's content is only valid for a short time (~30 seconds) and would like to wake up a background service on the phone while the band's tile is open to update the content as needed.
I was hoping to find an IBackgroundTrigger in the SDK that would do the trick but no luck there. The best I can think of to fill this need would be to have a task that uses a system trigger and hooks up listeners for the tile opened/closed events. This seems like a lot of unnecessary work for the task though and could end up with unnecessary battery usage on the phone.
Thanks,
Tony
I'm afraid that is not possible. As far as I can see from the SDK, the app on the phone has to be running to allow a tile on the band to send an event back to the phone.
An alternative would be to open your app from the Band using a voice command. Would that solve your problem?

passbook on the apple watch

Somewhere in the near future, an application I'm working on is going to its own pass to be stored in the user's passbook.
Since you cannot really test the passbook app from the watch in the simulator, and my watch will be arriving next month, I was hoping someone could shed some light..
I had a few questions about passbook for the apple watch..
Is it safe to assume the passes in passbook will automatically be
synced and added from the phone to the watch?
Are there any sort of visual guidelines when it comes to showing
passes on the apple watch? Does text automatically shrink? are things truncated? Are only certain fields appearing on the watch to conserve space?
Is it safe to assume if the user turns their wrist, the screen will
not shut off if a pass is currently being displayed?
Yes it automatically syncs.
Thus far I've noticed that the Pass is added to Apple Watch Passbook quite quickly after added in iPhone; although if you reorder the passes on the iPhone the order takes a little longer to sync on the Apple Watch view. (I haven't timed this under different scenarios but I'll test that and get back to you). Please note, I have >300 passes in Passbook so a 'typical consumer' may not experience the same.
Visual Guidelines.
The logo image remains at the top left of the Watch view of the Pass and automatically scales.
The strip or thumbnail image are removed from the Watch view. A background image (on an event ticket type) remains visible but is not scaled.
The header fields moves below the logo image (i.e. it is not to the right of the logo as it appears in the phone).
All other (text) fields appear on the watch view, but they are not side by side. The are presented in a 'list view' - separated by a fine line between each field. I have experienced some situations where the text length runs over one line (e.g. an email address i.e. no spaces between words) and it doesn't look so beautiful as the text does not resize to fit all on one line.
The pass automatically scales width-wise so it fits in the watch view but it is "longer" than the watch screen so you scroll the Pass up and down.
The pass length in the Watch app is dependent on the number of fields used in the Pass.
As you scroll to the QR code and tap on it, all other background colours and the 'close' link disappears and only the barcode is displayed. The square barcodes look significantly better. Of course redemption/scanning still works with the PDF417 barcode but it just doesn't look as nice in the watch view. It is presented in vertical format in the centre of the watch view, with black to the left and right of the PDF417 barcode.
Please note that there is no 'back view' on the apple watch pass. i.e. you cannot flip the pass to access the back of the pass as you can on the iPhone.
Screen shut off
The screen will not shut off only if the barcode has been selected (as described above). If you are just viewing the pass and have not selected the barcode the watch screen will shut off after time of no activity or if you turn your wrist.
If the barcode is selected, the barcode remains on the screen irrespective of wrist position and does not shut off over time.
Other - Lockscreen notifications / convenience.
Works the same as iPhone when in proximity to an associated GPS location or beacon or following a push update.
The pass can be accessed by tapping on the notification (i.e. no need to open the Passbook app on the watch) and can also be accessed by a swipe down to notifications. A 'small pass' is displayed in notifications. The 'small pass' is the same width as the watch face, and about half the height (same as other notifications). It consists of the logo image, inherits the background colour of the Pass, and includes the pass description field (when in proximity) or the updated field (when pushing an update).

Way to hide splash screen?

Is it possible to hide splash screen in MAF app and directly display some form/page to gather information from user at place of splash screen, and while user is being entering his values then initial loading process (which loads behind splash screen) can be continue at back-end?
The splash screen is of value to you as users know you app is loading. Its purpose is to load quickly as the rest of the app sets up.
Why would you want to move logic into this visual process? I want to caution you that I think it's a poor choice to reject industry standards. Work with the framework.

Flex - invisible text until mouse pointer moves outside textInput

We have an application running flex sdk 4.5 and have recently encountered an issue with textInput fields which we have not been able to reproduce on our end for the better part of a month now.
Here are the symptoms:
Users opens an input form which contains several input fields (combo boxes, calendars, text inputs, etc)
User clicks inside a text field
Users types (obviously!)
** Nothing appears in the text input - we have validators on some of these fields and they do kick in properly (ie. user sees red box around textInput disappearing)
User moves cursor outside of text input field and text appears
Give or take, this is the test case we've been provided. We have been unable to reproduce this and I'm reaching out to see if anybody has heard of issues like this in the past.
They are running our flex application in the following environment:
Windows XP SP3
IE 7.0.5730.13 (locale = en-gb)
Flash Player 10.3.181.14
Upgrading either of these components is not an option. Installing the flash player debugger is not an option either.
Now we've setup a pc exactly the same way as they have on their end and still haven't reproduced. So we're really stuck at this point :)
Any suggestion is greatly appreciated. I'll provide any additional info needed.
-Marc
Feb. 2nd 2012 - Update
As I noted in my comment reply to shaun, it seems our customer was more or less precise in their description of the issue. We ran a webex session with them this morning and actually saw the issues first hand.
Here's what happens:
- User loads our application via its url
- User is able to input data and pretty much do any function for a 'random' time period
- All of a sudden, the issues start (there are more symptoms than just the one I originally mentioned):
1. Users type in text input fields and they won't see the text appear until they move the cursor out of / into any other component (could be entering an hbox, exiting a text input field, etc)
2. Combo boxes behave more or less the same. They can drop them down, but then the mouse wheel no longer refreshes the list. It actually scrolls in the background, but until the user moves the mouse, the list does not refresh
3. We also communicate between the server and client via an amf channel. The events make it to the client, but again, they won't see the screen refresh until they move their cursor.
So basically, the application still seems to work, but the screen is no longer refreshing. Could it be something to do with an invalidate / update of the display list that doesn't kick in? We'd like to get them to install the debugger version of FP, but that doesn't seem to be an option.
Another thing to keep in mind: they have a VERY bad internet connection. They average around 1-1.5mbps (megabits) which is enough for our app, but I just thought I'd let you know.
We learned that they also use a Citrix presentation layer to deploy IE 7 to the end users. We've received confirmation from the end user that even if they launch IE on their workstation (not through citrix), they get the issue also.
Another note is that we've seen no errors in our web server, jboss or application logs...
So that's the update I've got... anyone have more thoughts on this? We've more or less discarded the fonts being an issue at this point since the issue affects more than just 'fonts'. Is everything on the screen not updating anymore.

Resources