Can band start a WP application or is a background task able to handle band notifications? - windows-10-mobile

assume I have a tile on my Microsoft Band (2) and want to record the current HB when the user presses my tile (or a button on a screen).
Just something like cortana does - trigger anything on the band - cortana is started on the device handling the request.
I found nothing about such a scenario in the (poor) SDK documentation.
Is such a solution possible - or do I always have to have my app in foreground on the phone (WP10)?

In order to be notified of Tile events (such as button presses), your application must (1) be running in the foreground or background, (2) have an outstanding connection to the Band, and (3) be subscribed to those specific events. There is currently no way (on Windows) to otherwise notify an application of input from the Band.

Related

User status detection in chat application

I am developing one chat application,How its possible to detect user interaction with PC to display status like away or online as we can see in application like skype? If this is specific to only browser tab then we can easily done it with
jquery mouse listener but how its possible at windows level?

Windows interactive notifications

So I want to know how a quickreply toast can be sent to the right person and when you click on it, it goes to the specific person.
Example 1:
Person A texts me, I pull down on the interactive notification and type my response and it gets processed by the background process. How does the applications know that my response goes to Person A. is there an attribute in the XML of the toast that can be a variable, like the phone number?
Example 2:
Person A posts a picture on my facebook, I click on the notification and it takes me to the page on facebook. Again is there an XML variable with a URL of it or something?
You can download this Microsoft Windows UWP sample, where you can see what code they use to manage notifications.
I think that you need Toast notifications:
Toast notifications are small pop ups that appear on the screen for few seconds. They convey messages and can be customized to even play different sounds. New to Windows 10 are actionable toasts where a user has a choice to interact with the notifications by use of a button, for example.

Reacting to UserAction in AudioPlayerAgent when app is suspended

I have an audio player that uses BackgroundAudioPlayer together with AudioPlayerAgent. Everything is working fine, except there's one use case I don't know how to handle.
If I play an audio track in my application and then the user switches to another application, the audio track continues to play in the background as it should - but I guess my application has now been swapped to memory and is suspended.
My question is: if the user now starts to play music in another app, I do get the AudioPlayerAgent.UserAction.Stop action as a callback to my AudioAgent. But can I do anything about this now from my app's point of view? I mean, I would like to save the position of the audio playback where the user was in my app, but my app has been suspended, right?
When my app is in the foreground and the audio stops, I do get the BackgroundAudioPlayer.Instance.PlayerState.Stopped event. It's here that I normally save the position of the playback. But if the user switches to another app to play music, I don't get this event.
So I am just wondering how to handle this kind of case. Is there anything I can do to improve the user experience?
The only way is to save that Position to Isolated Storage in the agent code.
See this very useful article of Paul about how to use Background audio agent and the way to communicate between UI and agent side

How to work with background application?

I have created an app that triggers video at particular time similar to alarm, but the problem I am facing is that when I am out of application & have set the timings the video doesn't show up(i.e. similar to alarm I should get notification out side my app). Please help me out with the same. Would be very grateful for any helpful suggestion.
When an application is not running, you cannot predict what time its background process will execute, so there is no way that you can set an alarm with any degree of precision smaller than perhaps an hour. The only way to have timing close to accurate would be with a push notification from a server. Even then, the notification you receive will not be able to open and play video on its own. You could create a push/toast notification that originates at a server, sends the user a toast, the user taps it, and that opens the app to play the video. You can't do it without user intervention.
See this link for an overview, including the constraints on background agents: http://msdn.microsoft.com/en-us/library/hh202942(v=VS.92).aspx
You cannot open an app and play a video from a background agent. You can show a toast notification that would allow the user to open the app. You can use a Scheduled Agent or PeriodicTask.You can then use the ShellToast to show a toast notification so the user can open the app. Once the app is open you can start the video.

Animate application icon in windows phone

I have tried googling for this and came up empty. What I want is a tutorial or example code of how to change my icon on the windows phone like the people application or SMS. For example when you get a new SMS message it puts a number next to the face in the icon. Is there any way for me to do that in my app?
You need to send a Tile Push Notification.
This allows you to update the image, text and (optionally) a number.
Push notifications shoudl be triggered from a remote [web] service.
You can also have the tile update periodically using a ShellTileSchedule.
You can update your application's Tile using Push Notifications from a web service registered with a Microsoft Push Notification Service. However, this isn't absolutely necessary. You can even update your tiles without push notifications, by setting a ShellTileSchedule. The minimum update interval is 1 hour, however.
See here.

Resources