windows-phone-8.1

Windows Phone 8.1 background task closes before completion

妖精的绣舞 提交于 2019-12-07 08:10:35
问题 My background task takes a long time to complete, and the OS is just killing it. I'm trying to sync my contacts online, here's what I'm doing: Get all contacts from phonebook (takes ~1 second) Upload them to a server (~2 seconds) Retrieve all contacts from server (~2-3 seconds) Delete all contacts from ContactStore(ContactStore.DeleteAsync sometimes takes 1 minute to complete) Create a ContactStore and import all contacts )(~1-2 minutes for 1000 contacts) I have ~100 contacts and it's working

Check internet Connection on phone

a 夏天 提交于 2019-12-07 07:43:07
问题 I wanted to check whether my phone can connect to Internet or not. I have seen several questions already. One of those is Question . It says to use NetworkInterface.GetIsNetworkAvailable() this and i tried it. I have disconnected my PC from internet and Also turned off the DataConnection of the emulator but NetworkInterface.GetIsNetworkAvailable() this always returning true. But simultaneouly i also check for NetworkInterfaceType.None and interestingly it is coming null. Can anybody explain

WindowPhone FlipView System.ArgumentException

爷,独闯天下 提交于 2019-12-07 07:24:24
I have a problem with using FlipView in my WindowsPhone app. I have a Page with FlipView, which has ItemsSource that binds to ItemsGroup and SelectedItem that binds to CurrentItem. DataTemplate of FlipView includes WebView which has attached property Html that binds to Html of CurrentItem. Everything goes well, but the app crashes with System.ArgumentException from time to time and I have no idea what's wrong. XAML: <Page x:Class="UkraineNews.ItemPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http:/

How to get Contact's Nickname Windows Phone 8.1

核能气质少年 提交于 2019-12-07 07:14:24
Using Windows.ApplicationModel.Contacts.ContactManager and ContactStore I can read all or search for contacts (People) with FindContactAsync(...). On some records I have only Nickname field set under Name (in People/phonebook) group. They are returned when I search for their Nickname but all Name related fields from Contact instance are string empty. I couldn't find any nickname field on that type either. Is there any way to get the contact Nickname on Windows Phone 8.1 (NOT Silverlight)? I was working on a Windows Phone 8.1 Runtime app recently and also came upon this same issue. It seems

Windows Phone 8.1 Two Column Gridview Within Pivot

*爱你&永不变心* 提交于 2019-12-07 06:09:24
问题 I am having trouble displaying a two column gridview in a Windows Phone 8.1 application. This is my intended result: After reviewing other SO questions dealing with similar issues, I produced the following code: <Canvas> <Grid Tapped="Grid_Tapped"> <Grid.RowDefinitions> <RowDefinition Height="93*"/> <RowDefinition Height="35*"/> </Grid.RowDefinitions> <Pivot Name="centerPivot" Margin="0,109,0,0" Grid.Row="0" Grid.RowSpan="2" Canvas.ZIndex="2" Tapped="centerPivot_Tapped"> <PivotItem Name=

Alarm code in Windows Phone 8.1

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:06:26
I have code the app with future Reminder by Toast notification , i can remind every times by BackgroundTask But i want to reminder at one time in every day like : 4.00 PM every day I search and get info about Alarm and Reminder are out of Windows Phone 8.1 So have another way ? Sorry my bad English You can use a scheduled toast notification to fire a toast at a specific time. This doesn't require the app be running when the toast fires, only when the toast is scheduled. You will need to schedule individual toasts for each day as there is no automatic repetition. If the user is likely to run

How to add capabilities to Coded UI Test (Windows Phone 8.1) project (In C#)

两盒软妹~` 提交于 2019-12-07 05:59:41
问题 I've a TestMethod in CodedUITest class that uses HttpClient for fetching data from a local server, [TestMethod] public void CodedUITestMethod() { string ServiceURI = "http://localhost:34562/GetTestResult"; HttpClient httpClient = new HttpClient(); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, ServiceURI); HttpResponseMessage response = httpClient.SendAsync(request).Result; } However, it always throws exception at last line, like: {System.UnauthorizedAccessException: Use

CameraPreviewImageSource empty preview frame

£可爱£侵袭症+ 提交于 2019-12-07 04:56:29
I made cut and paste of the code below about how to use CameraPreviewImageSource and access to preview buffer frames, but do not work and it seems the frame buffer size is 0x0 reading the value of IImageSize parameter of OnPreviewFrameAvailable event. How to get preview buffer of MediaCapture - Universal app protected override void OnNavigatedTo(NavigationEventArgs e) { InitializeAsync(); } public async void InitializeAsync() { _cameraPreviewImageSource = new CameraPreviewImageSource(); await _cameraPreviewImageSource.InitializeAsync(string.Empty); var properties = await

Receive WNS push notfication on Windows phone silverlight 8.1

为君一笑 提交于 2019-12-07 04:37:55
问题 I have windows phone 8.1 silverlight application where I want to receive Notfications using the new framework, WNS. I have in the package.appxmanifest: <identity name="4657xxxxxxx" publisher="CN=xxxxx" version="1.0.0.0"/> and added it to the Mobile Service Hub. For this I have removed old references to MPNS usings, and added the following for WNS: using Windows.UI.Notifications; using Windows.Networking.PushNotifications; using Windows.UI.StartScreen; This resulted in a new way of getting the

Force pivot item to preload before it's shown

我与影子孤独终老i 提交于 2019-12-07 04:20:29
问题 I have a Pivot with several PivotItems, one of which contains a canvas that places its items in dynamic locations (depending on the data). I get the data, and I can place the items in their place before the user can choose this item (this isn't the first pivot). However, only when I select the PivotItem, the canvas renders itself, so you can see it flicker before it's shown as it should. Is there a way to force the canvas to render before it's shown, so everything's prepared by the time the