Universal volume control navigation WP8 - c#

How do we control the navigation to a page from UVC? I want it to navigate to the "Now playing page" in the app when tapped, both when the app is closed and app is in the background. "BackgroundAudioPlayer" is used for playing the songs.

The only solution I came to is - writing the current song to the Now playing item in Music & video hub as mentioned in this post - Detect application launch from Universal Volume Control
The value given into the MediaHistoryItem.PlayerContext will be obtained as the NavigationContext.QueryString in the OnNavigatedTo event. Using this value, navigate to the required page.

Related

Navigate to another page and then resume app

I'm developing a UWP app for both mobile and PCs.
I need to ask for a passcode every time the app start, also when resumed after suspension.
When the app is resumed I navigate to a pin check page, then, if the passcode is correct I navigate to the page which was shown before suspending.
The problem is that I have a page with a textbox and other control, how can I resume the text in TextBox?
When I resume the app without using pin page, I have no problem because the content of the page is totally resumed.
Thanks
The problem is that I have a page with a textbox and other control, how can I resume the text in TextBox?
You can use UIElement.CacheMode property and Frame.CacheSize property to cache the content of the page. You can refer to my another case UWP page state manage.
Or if you're using some templates for example template 10 to develop your app, you can use its own cache method, you can refer to Docs | Navigation Cache.

Universal Windows 8.1 App Page Change

I am trying to change pages when a text block is selected but I don't know how to get my app to go to the next page.
Figured out the answer to my question. In order to navigate between pages, you need to make the following call when the event you want the transition to happens:
this.Frame.Navigate(typeof(/*name of page you want to transition to*/));

How to make Video resume playing in Windows Phone 8 App XAML and C#

I have a windows phone app that plays videos from a url on a video details page, I now have another page that users can navigate to from a click event to add comments to the selected video. But I discovered that, when users navigate to the comments page to post comments and click the phone's back button, the video does not continue to play, it just goes blank. I want to make the video playing to pause when users navigate to the comments page and resume, when the phone's back button is clicked. I am using Microsoft Media Player framework, and xaml and c#
You need to store the Media Player's Position property in a variable, then check if it's already stored, and if so, use the page's OnNavigatedTo event to set the MediaPlayer back to the position and call Play();

Remove Page Transition

I want to remove Page transitions completely from the page. I tried to search for this, but all I got was about Windows Phone 8 which doesn't work in WP8.1 environment.
I know with the help of this page that I can add Transitions in the UI components and tried to put it for Page too, but it doesn't work at all. I get to see default page transition animation and the custom animation both.
So is there a way to remove or change page transition animation in Windows Phone 8.1?

How to access ringtones

My app that I am currently working on, requires me to make a button that makes the user choose the ringtone to use for the push notification. Now I can't for the life of me get documentation on how my app can show the native ringtone list after tapping on that button ?
Will take any advice/ link/ already posted question.
As far as I know, you can not change the ringtone for notifications from inside an app - nor can you query all available ringtones of the phone from within an app. The user need to go to the settings and change the ringtone there.

Categories