Stacked Notifications Extra Click - wear-os

I'm developing a simple application, and my goal is to get stacked notifications working on the Android Wear watch, according to this webpage: http://developer.android.com/training/wearables/notifications/stacks.html
When there exist multiple stacked notifications, you have to click on the stack before you can swipe to the left to get access to any extra actions (e.g., a voice reply action). However, when there is only one stacked notification, I still have to click on the "stack" to get access to the extra actions. This is a very annoying and unintuitive extra click to have to do as a user, and I'm thinking I'm probably doing something wrong. Does anyone have any experience with this issue, and if so, what did you to do work around it? The code I'm using is essentially identical to the code found in the link above, except I'm only issuing one stacked notification on the watch along with the summary notification on the phone.

Related

Customize default message behavior in MS Teams

Overview:
Before I go too deep into the documentation, I wanted to ask a few basic questions.
My goal of all this is to customize the default message notifications, which appear in the lower right hand corner of the screen, specifically when chatting in MS Teams. Note I am interested only in Windows, not mobile.
Use case:
I send the GitHub Bot a bogus chat message, just to show a notification coming in for demonstration purposes:
This notification will disappear after some predetermined amount of time (around ~15s, at least on my machine)
Question(s):
Would it be possible to create a message extension of sorts, which wraps the default messaging behavior?
For example, I would want to:
Let the notification sit in the lower right hand corner until acted
upon, rather than have it disappear. Or, is this the behavior of the
OS, rather than Teams?
Change the color, and format of the message. Effectively, intercept
the message, and display it in different format, font, color, icon
etc.
I only see notifications in the lower right hand corner, if and only
if Teams is minimized, or out of view. Would it be possible, if
intercepted, to display the notification, regardless if Teams has
focus, and is in the foreground. For example, if I am in Teams, and
a notification appears (say someone sends me a message), the ‘Chat’
icon in the upper left hand corner will display an alert. I would
like to also have the notification appear in the lower right hand
corner of the screen.
Lastly, say for example Teams is in the foreground, and you receive
a notification. By default, the Teams icon in the toolbar will
flicker and update the badge number on the icon. Is there any way
for a developer to update the icon, or possibly draw additional
attention to the icon, aside from the red badge.
Note that these are all things I would like to do from a personal standpoint. The odds of another developer wanting these sort of changes are slim to none, which is why I would like to build something myself, opposed to a file feature request.
Of course, anything is possible, but I don’t want to hack something together that will break in a week. I’d rather see if I can build upon whatever API’s are out there to do this sort of thing.
Note that I'm not looking for a solution, but rather a brief yes or no for the questions above, and possibly a pointer to specific documentation that could aid in my investigation.
Thanks!
Just to circle back on this. I spoke to one of their support devs, who was extremely helpful.
I've summarized his response below for reference.
Note that the list below corresponds to the order of questions asked above:
It behaves as per OS. On Windows, notifications will show in the bottom right corner of your screen, then move to the
Action Center. On Mac OS, these show up in the top right corner of
your screen, then move to the Control Center.
You could change the notification text if you are sending it from a user app. But not all notification are shown from Teams. Font, color
and icon are displayed as per Teams theme and cannot be modified.
This is currently not possible. A Custom App inside a team has limited access (scope). For example if you have installed an app inside
a teams channel, then it has limited scope to send or receive
operations only inside that channel.
This is also not possible.
So in summary, in relation to the original posted question, it is not possible at this time to customize the default Message behavior in Teams.
Also, I was using the terms Message and Notification interchangeably, which is incorrect.
It would appear as though Notifications are really what the OS displays, and as such, defines it's default behavior. The application, in this case MS-Teams, controls the visual display characteristics of that Notification, for example color/font/icon, based on the UI theme of teams.
Conversely, Messages or Message Extensions, are quite different from Notifications.
Using Message Extension, the user can search, or initiate actions, in an external system from the compose message area, the command box, or directly from a message. You can then send the results of that interaction back to the Microsoft Teams client, typically in the form of a richly formatted card.

Docking wear app to watch face

Apologies for an 'open' question, but can anyone provider pointers on how to 'dock' my app to the Android Wear watch face?
Essentially, I want users of the application to be able to swipe left to right (or vice-versa) from the edge of the screen to open the application, compared to having to scroll the list of applications after tapping the watch face.
I've seen this implemented in another wear app, but don't know the right terminology to produce meaningful results in Google. Is it a wallpaper service, specific view type, touch listerner service etc?
Many thanks.
You can't receive touch events inside the WatchFaceService, touch delivery is disabled.
I can't say for sure how the app you saw implemented the desired behavior, but it probably did by inserting views directly into the WindowManager from a Service.
Checkout this youtube video: https://www.youtube.com/watch?v=S3vHjxonOeg
I don't know how well the Standout library does its job, but it should give you enough examples to figure out yourself, how to add views to the WindowManager.

Programmatically open Notification Center / Today view

Is there any way (that would be accepted by an AppStore review) how to open the today view of the Notification Center? I searched the docs for NSNotificationCenter but if there is a way, this seems to be the wrong place to look.
My requirement is, that I am developing a Today Extension for the Notification Center. The main application is only used to configure the settings of that extension. All content is displayed in the widget. Now I want to implement notifications: If there is new content in the widget I want to send a push notification. When the user clicks the notification in the top right corner I would like to open the Notification Center and focus my widget (if the user has many widgets, it might not be in the viewport).
I have a strong guess this is not feasible. I hope someone can prove me wrong.
You have reached a dead-end.
There is no api or event to support display of TODAY notification view.
It is left for users 'will', when he wish to navigate to TODAY view, as otherwise it can easily become a inconvenience.

Google Play Games notifications not visible

I've looked through all questions on SO about Google Play Games, but looks like I'm the only one having problems now.
Using new GPG with Games.Achievements.unlock(), the achievement notification isn't showing up. I can see that achievement is unlocked when checking in unlocked achievements list, but that badge - it just doesn't show up!
The app isn't published, but has all the achievements correctly set up in Play Store. other GPG features seem to work fine, but they usually do not show notification (like Leaderboards)
And another issue that might be actually related to this. The initial login popup, the one that allows to pick an account when you have several of them on the device - sometimes it ends up being behind the app screen. And when you quit the app it keeps sitting on the device screen until you close it by picking Cancel. Not sure, this might be a debug issue due to app being force-closed on every next installation, but still.
Any ideas? How Achievement badge can end up being invisible all the time?
You may need to try changing the popup view, depending on which implementation you have used, this is the basegameutils method:
Games.setViewForPopups(getApiClient(), getWindow().getDecorView().findViewById(android.R.id.content));
Depending on your code, you may need to use a different view.
Try this in the activity view in which you want the notifications to be seen : Games.setViewForPopups(getApiClient(), getWindow().getDecorView().findViewById(android.R.id.content));
The issue was that I was calling Games.Achievements.unlock(mGoogleApiClient, context.getResources().getString(R.string.achievement_pro)); from a helper class. The context that I passed was of MainActivity.class, however I actually intended to show the achievements being unlocked in my GameScreen.class and not the MainActivity.class since it would be in the background. GameScreen.class, in my case, is an activity that I invoke through an Intent from MainActivity.class. And I suppose, it is because of this that the context is not set properly for Games.Achievements and it could not show the pop ups in my current activity screen.
When I added that line of code in GameScreen.class, I assume that now Games class knew where it has to popup the alerts. My explanation might sound a bit fussy here but let me know if you have any issue.

How to handle first run and splashes in WP7

I have spent a bit of time rummaging through Stack Overflow to find out how to deterministically close an application based on an action. Most if not all answers say you can't or shouldn't do it. If this is so I would like to phrase my question differently and see how people are handling two issues I am having trouble with.
Just to let you guys know I am using Caliburn.Micro for this project.
Ok so the flow of my app can be broken down into two parts, the initial flow and the standard flow, these are as follows
Splash -> Welcome -> CreateAccount -> MainHub (all other functionality branches from here)
Splash -> MainHub (all other functionality branches from here)
Based on this flow, the feedback from my better (beta) testers is that they expect to exit the app on pressing the back button on the hub, which they see as the entry point. Currently as per navigation they go all the way back to the splash.
I see other apps have this functionality, but without forcing the application to close (Which I read is a no no) how are they achieving this desired functionality.
NOTE: I do not want to put in an exit button as I believe it goes against the natural flow of a WP7 application.
First of all, you cannot add a exit button. The only way to exit a application is to crash it, which will not be approved for marketplace certification.
As for your problem, you simply have to remove views from the navigation stack upon completion of a known navigation.
For this, use NavigationService.RemoveBackEntry.
You can access the NavigationService from anywhere, using this snippet:
(App.Current.RootVisual as PhoneApplicationFrame).RemoveBackEntry()
Regarding EULA / Login screens (and Splash) - don't make them into pages. If you instead make them Popup or Dialog controls you can show or hide them at any time (on first navigation; when the user hits a "protected" part of the app; after a time-out; etc.) and they don't consume a slot in the backstack.
Source: http://blogs.msdn.com/b/ptorr/archive/2010/08/01/exiting-a-windows-phone-application.aspx

Resources