SystemMediaTransportControls track name click event - windows-runtime

I'm using SystemMediaTransportControls to control audio playback throughout my Windows Phone 8.1 Universal App.
The controls seem to have a one specific behaviour - the track name and artist act as a clickable button and clicking on it fires the OnLaunched event for the app.
Is there any way to either change the behaviour of this button or at least detect if the OnLaunched event is fired due to user clicking on this button?
Specifically, I need to direct the user to the currently playing album's page in the app when she clicks on this button.

The current behavior is that it launches/reactivates the app associated with the background audio playback. The same behavior applies to the Windows Store Music app.
Here's what I think you could try:
If your app has multiple album pages for currently playing audio, then you might consider subscribing to foreground messages from the background task. You can use "BackgroundMediaPlayer.SendMessageToForeground" to send messages to the foreground and navigate appropriately. Try making the call in the OnLaunched event before the Windows is activated. You should also be able to get currently playing audio information and use that accordingly.
Take a look at the Background Audio for Windows Phone 8.1 sample for more details on how to use background audio. Then you should try what I mentioned to see if that works for you.
Hope this helps.

Related

Windows Phone music player app plays songs from phone library

Im learning windows phone 8 development recently. And started developing music player that plays from phone library. I used MediaLibrary API to get all songs,albums and its working fine now.
What is the problme now is i've assigned MediaPlayer_MediaStateChanged,and MediaPlayer_ActiveSongChanged to mediaplayer object. It triggers when i change the songs that are displayed in longListSelector. That events are not firing when i press next or prev button that i get when I press volume button.
Hope You understood what is the problem.
I tried using backgroundPlayerAgent and got to know that doesn support MediaLibrary.
And I saw this question also. But i saw few apps that are able to listen to those prev/next button events. If you know what am i missing please help?? Is there any other third party libraries available?? I've searched lot in web but i dint get any usefull information. SO posting this question thinking that i might get some information
Go to Settings > Music
Search for Filter audio files
set audio files By Size....
You will get all songs then

Manipulation events are not fired on page with a listview

Now I'm developing windows phone 8.1 app with WinRT
I'm trying to support swipe-right-to-go-back gesture in my app.
I try to capture the manipulation events on my page. My page's root is a grid and have a ListView inside. I used the UIElement.AddHandler method with "handledEventsToo=true" to add the event handlers. But when I touch the screen, only the ManipulationStarting event is fired, other events seems to be eat by listview.
Could anyone tell me about the manipulation event behavior or other methods to implement this feature? Thanks!!
You won't normally capture events on LisView, beacause it has a ScrollViewer which intercepts them.
There is a way to do it - you will have to disable ScrollViewer and then perfrom some actions when the events are fired and perform scrolling manually. This answer will guide you.
In case someone encounters this page, I spent the better part of a week figuring out why manipulation events were only firing half the time on my UWP charts using the winRT xaml toolkit.
You may need to check that the background is not null on whatever element has the event handler attached. Templated controls are not necessarily hit test visible unless they have one. Otherwise, the input can go right through to the element behind it.
https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/events-and-routed-events-overview

Allow my app to be opened with camera button

I'm working on a WP8 app that will utilize the camera for a feature. I've read that, as of GDR2, you can now change which app opens with the camera button, but:
it appears that an app needs to be specially written to be used like
this; not every photo or camera app can be configured to launch when
you press the Camera button.
Question: What do I need to do in my app for it to become an available option in the "Pressing the camera button opens: " drop down when navigating to Settings -> Applications -> photos + camera?
Additionally, part 2 of this question would be (if part 1 is possible), when the application is launching, can I determine if the user opened it via the camera button (so that I could go straight to my camera feature)?
I've seen this article but it only describes how to use and handle the shutter button, it doesn't mention how to allow this button to open the app.
Has anyone been able to accomplish this?
This thread (http://forums.wpcentral.com/windows-phone-8/234751-changing-default-camera-app.html) seems to suggest that only manufacturers can create apps that can do this. Not sure if it's definite, but I've never heard of a 3rd party camera app that can do more than register as a lens.

Determine if user opened an application by tapping currently playing song in system menu

In Windows Phone 8 it's possible to enter applications that use BackgroundAudio service by tapping a name of currently playing audio in systemwide accessible menu.
Can I somehow detect this specific entrance point inside my application? Pic related :)

Adobe Flash Player Settings not show Remember button

I have an Adobe Flash Player Application, when the page loads it shows a popup ( the Adobe flash player settings ), but in that popup it doesn't show the Remember checkbox.
Please help.
There are two different kind of popup:
The first one is displayed when then application try to access a webcam or a microphone. This one does not display a remember option. That the one you see in your application;
The second one is displayed programmatically by performing a call to Security.showSettings()
It is good practice to open the security panel before trying to access any of the webcams / cameras / microphones of the user anyway.
In case you don't develop this application but still want to display the popup with the remember option, you can do so by right-clicking on it and select Settings.... The privacy tab should be the second one.