Windows 8 metro UI: what is a new place for tray notification icons? - windows-8

Before windows 8, if application want to non-intrusively inform user that something happens, it displays tray icon, maybe animated. For example, if e-mail application finds a new e-mail, it displays a new tray icon (outlook) or animate it's own icon in tray (all other e-mail clients).
With new Windows 8 Metro UI it's a new screen with tiles that supposed to be a main thing user will use to launch and switch apps. Where is no tray area in this mode, but many other things - charms area, something like status area that displays clock and battery usage etc.
According to Microsoft Metro UI design guides - what is the new place for poor e-mail app notification icon?

I think what you want is a notification. There are three kinds of notifications: a tile update, a badge update on the tile or a "toast" in the upper right corner of the screen (when in another application). The various options for these types of notifications are listed here.

The new place to let someone know your app has updated information is the tile itself.
These are called "Live Tiles" because they're intended to be dynamic, and change as new data becomes available.
http://www.winsupersite.com/article/windows8/windows-8-feature-focus-tiles-143175

Related

How can I detect/observe when third party app launches a full screen process?

I would like to build a helper app for gamers, and to build some extra functionality I would like to observe/time certain third party games behaviors, more specifically when the game actually launches the full screen process.
For example: my app is a system tray app, the game has a "launcher" app with lobby and menu screens. Once the game launches the extra process, usually OS X will switch resolutions (optionally) and my App would be notified somehow. Then I can start a timer. Once game match finishes, either the process is closed, or the game is not full screen anymore, my app gets a second notification and I can stop the timer.
Are there official Apple APIs that provide any way to observe/poll for the app going full screen and/or launch additional windows that I can reliably assume it's the actual game screen?
I doubt you're going to find a completely comprehensive solution. There are many ways for apps to achieve a full-screen experience and most don't provide a notification about that fact.
A full-screen app can modify the presentationOptions of NSApplication to hide the Dock and menu bar. Another app can use key-value observing to monitor its application object's currentSystemPresentationOptions property, which will reflect the current system status.
A full-screen app can capture the displays (although Apple discourages this technique). You can try to detect this by calling CGDisplayIsCaptured(), although it's been deprecated since 10.9 with no replacement. It may be possible that, if you register a callback with CGDisplayRegisterReconfigurationCallback(), you'll get called when something captures the display. However, capturing the display is sort of about preventing other processes from noticing such changes, so maybe not. In that case, you'd have to poll. You might also poll for the current display mode; changing the mode is the primary reason why a game would capture the display in the first place.
A full-screen game could also just create a borderless window the size of the screen and set its window level to be in front of the Dock and menu bar (and other apps' windows). There's not really a notification about this. You could detect it using the CGWindowList API, but you would have to poll. For example, you could call CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly, kCGNullWindowID) and iterate through the dictionaries looking for one the size of the screen and at a window level above kCGStatusWindowLevel.
(You might be able to use the Accessibility API to get a notification when the frontmost window changes, so you'd only have to poll when that happens.)
You cannot observe a notification if there is none. So firstly you need to know if the app you want to observe is actually sending a notification that is observable. You cannot 'hook' into other apps without their planned consent.

iOS : Disable Push Notifications drop down tray programatically

In my app design, I have a dropdown menu from the top as the user swipes down the top edge of the screen. This interferes with the Push notification tray. Is there any way to disable the default tray dropdown when my app is in the foreground?
Currently, there is no public API for manipulating the behavior of the notification center or how to prevent it.
I think it is a design decision to keep a consistent user experience at the price of developer freedom. I do not think it's not likely that an app will ever be able to block a notification's appearance, and only slightly less unlikely that an app would be able to prevent the notification center from appearing.
After all, it is what made iOS so successful. The consistency between the operating system and apps in general.

Detect whether a Windows 8 Store App has a touch screen

There are certain elements of Win 8 Store App UI that change based on whether the user has a touch screen. For example, a ScrollViewer, when rendered on a non-touch screen shows a vertical scrollbar. On a touch screen, the scrollbar is hidden.
I would like to tailor my application UI, adding extra controls, for non-touch screen users. Does anyone know if it is possible to detect whether a user has a touch screen?
You can use the Windows.Devices.Input namespace to detect various capabilities (touch, keyboard, mouse, etc.). For example, the TouchCapabilities class has a TouchPresent property you could check to see if there's a digitizer available.
Take a look at the Input: Device capabilities sample to see them in action.
If you are using HTML/JS you can query it like this
var touchCapabilities = new Windows.Devices.Input.TouchCapabilities();
var isTouchCapable = touchCapabilities.touchPresent;

Set color for desktop application's start screen shortcut

Metro applications can have a colour set, which appears on their shortcut on the start screen, and also on any dialogs and UI elements, so users can recognise the application, for example helping them associate toasts with the source application quickly.
So far so good. Traditional shortcuts to desktop applications also appear on the start screen. They don't have a colour, and any toast notifications they send have a grey background. Microsoft's own applications such as VS2012, redone in semi-metro-style, also have a colourless start screen tile.
How can a colour be set for the start screen shortcut, or toast notifications, for a desktop application?
For desktop apps, the background color used on Start screen tiles and toast notifications is not configurable by the app itself. The color is determined by the Start screen color theme chosen by the user (PC Settings -> Personalize -> Start screen).
For the toast notifications, here are some resources:
Quickstart: Sending a toast notification from the desktop: http://msdn.microsoft.com/en-us/library/windows/apps/hh802768.aspx
Sending toast notifications from desktop apps sample: http://code.msdn.microsoft.com/windowsdesktop/sending-toast-notifications-71e230a2
I hope this helps with notifications!
--ed

Cocoa Application with Menubar but no Dock Icon / switch menu

This is yet one more of those "how to switch from running with a dock icon to running without one" questions with a twist.. I don't want the dock icon but I do want a menu bar when the application is at the front. Is that possible?
Running an application with LSUIElement set to 1 in the plist will launch the application without a dock icon, not showing up in the command-tab switch list and without a menu.
You can switch from that mode to the "normal" mode with all three switched on via SetSystemModeUI from 10.2 onwards and via NSApplication setApplicationActivationPolicy since 10.6, but crucially there is no way back to the previous mode (go figure).
So one way around this would be to launch with LSUIElement = 1 and then activate the menu bar when the application gets the focus and deactivate it on the application losing the focus.. alas I can't find a way of doing that.
Can anybody help?
Best regards,
Frank
I too was looking for a solution, but it turned out to be quite simple:
In the project file Info.plist need to add the key
"Application is agent (UIElement)" = YES
Unfortunately, this is not possible. You can only transform the process type in one direction (from a background app to a foreground app) and not the other way.