How to listen playback/audio state change in UWP app - audio

I am developing on a UWP app which need to listen playback/audio state change. such as: can know when other app start/stop to play a audio.
On Windows, I see there is an API "Windows.Media.Audio.AudioStateMonitor", but it only listen sound level change of app's own audio play.
https://learn.microsoft.com/en-us/uwp/api/windows.media.audio.audiostatemonitor?view=winrt-22621
On Android, there is an API that fully meet my requirement. AudioManager#registerAudioPlaybackCallback()
I want to query, is there any API on Windows that can listen playback/audio state change of whole Windows system. Like Android's AudioManager#registerAudioPlaybackCallback()

UWP runs in a sandbox and has no permission to access other app. UWP does not have related API support for this.
It is possible to use the Windows Core Audio API
IAudioMeterInformation::GetPeakValue to query whether the sound is playing.
Since UWP cannot directly use Win32 API, you need to write a project that uses Win32 API first, then package this project with the UWP project and realize the communication between the two project.
You can use IAudioMeterInformation this code in WPF, then use Windows Application Packaging Project to package WPF and UWP project. You can refer to this blog: UWP with Desktop Extension.

Related

How to create a browser instance (pupeeteer) with firebase and use it in my app (node.js)?

I created a firebase project. This communicates with a mobile application (node.js). As part of this project I want to use pupeeteer.
I have no problem launching functions using pupeeteer in firebase.
The problem is that I want to make the user perform actions. So I have to display the web page (pupeeteer) in the application via a browser generated by the server (with a firebase function?)?
However I have no idea how to launch a browser instance in the background and close it at the end of processing?
Can you help me ? Is this the right solution?
I want to use this :
This library does 2 things:
Download the chromium binaries and launch a Chromium process.
Connect to this process with Websocket and send json commands to control the browser.
Due to limitations on mobile platforms (iOS and Android), it is not possible to launch an external Chromium process on iOS and Android. So, step 1) does not work on mobile.
You can still use puppeteer-dart on Flutter either with:
Flutter on Desktop (macOS, windows, Linux)
Flutter on mobile BUT with the actual Chrome instance running on a server and accessed from the mobile app using puppeteer.connect
The pub.dev website reports that this library works with Android and iOS. The supported platform list is detected automatically and can't be manually modified to express the current limitations

Developing NEST Universal App for Windows 10

Are there any hidden restrictions/costs for developing a NEST application for the Windows platform? I've noticed an iOS and Andriod SDK is available, but presumably the Javascript alternative should suffice?
Does the NEST camera support an open standard for integrating streaming video into a Windows application?
The API is web based and does not put any limitations on being built on Windows, there just isn't a Windows based SDK.
The Nest Cams currently do not support streaming of any type via the API.

Can I embed a windows store app inside a classic windows application?

I would like to embed a universal windows app into a classic windows application on windows 10. Is this possible?
The short answer is no. However... depending on what you're trying to do, the information below may help you.
If you just want to get the look and feel of a desktop application, you should be aware that Windows 10 apps (unlike Windows 8 apps) run in non-fullscreen mode by default, and can be resized. Desktop apps in Windows 10 have top-right icons (min/max/resize) that look similar to how UWP apps look in the title bar and top-right icons.
If you're creating a UWP app with XAML, you won't be able to embed it in a desktop application. However, if you're building a Windows 10 app using HTML5 and JavaScript, you could repackage it inside a browser control embedded in a desktop application.
If you're creating a game using a 3rd-party tool such as Unity, you can export it as a Windows desktop application just as easily as exporting to a UWP app for Windows 10. Unity can be used for non-game apps as well, so you could export it to a desktop application today, and still have the option of publish a UWP of the same game/app.
If you were thinking of accessing the full Windows SDK from you UWP app, you won't be able to do so, as you will be restricted by the UWP sandbox. But Windows 10 has made many improvements in helping you get access to many advanced features, e.g. accessing certain locations in the file system, so you may be able to get by with all that UWP has to offer.
If you want to avoid the Windows Store, you may sideload your app, as suggested by an earlier comment.
Hope that helps! :)

Apportable: is using windows azure mobile services possible?

I am trying to build my ios application for android. Is there any chance to use windows azure mobile services framework in native objective-c code? Or should I use java and call my azure mobile services table items from it ? Thank you in advance.
If there's an Android version of azure, you could use BridgeKit to bridge the android library to objective c APIs.
http://docs.apportable.com/using-java
There are native Azure Mobile Services SDKs for all major mobile platforms (iOS / Objective-C, Android / Java, Windows Phone, etc). There are excellent tutorials available on the Azure website:
iOS: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-ios-get-started/
Android: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-get-started/
If you are looking for cross-platform development you could leverage Xamarin (C#), Sencha or PhoneGap which all have samples at the above site as well.
If you want to serve multiple platforms a better approach would be to create a service layer which works against your Mobile Service (f.e. build with ASP.NET Web API). This service layer would be called from your clients. The big advantage is that you don't have to write code multiple times and changes can be done at a central point. If you concentrate on RESTful services nearly every platform can call it.
Currently that seems to be a lot of overhead with an already finished iOS implementation, but imagine the situation when you want to support other platforms, such as Windows 8 or Windows Phone 8. At this point you have the same problems again.

Is it possible to run an Appcelerator Titanium applicatin in web browser like Flex?

Is it possible to share code between mobile and web versions of an application created with Appcelerator Titanium? I want to create a mobile application but I also want my users accessing the app using desktop Internet browser, like Flex application can be run in Flash Player or AIR. Is it possible to share code between mobile and web versions of the app?
Thanks,
Michal
There is a beta or pre release version of a web sdk that will support that functionality. Will try and track down the link, certain it can be found on the Appcelerator developer blog

Resources