windows-phone-8.1

Not receiving WNS in Windows Phone 8.1

三世轮回 提交于 2019-12-11 12:13:33
问题 I'm developing an app in Windows Phone 8.1 (NOT silverlight) which uses WNS to receive raw push notification. While I run my app through Visual Studio (over a physical device, not in the emulator), I always receive push notifications (with the app in foreground, in background, with the phone locked...) so I think my code to receive push is correct. My issue is when I run my app whithout using Visual Studio. If I press the "app icon" on the device to init the app and keep it in foreground, I

Encrypt String AES Windows Phone 8.1

元气小坏坏 提交于 2019-12-11 12:08:23
问题 I'm making an app which will need to encrypt a string. I'm completely new to AES encryption. I have to code that runs on the server to encrypt. public static string Encrypt(string text, byte[] key, byte[] iv, int keysize = 128, int blocksize = 128, CipherMode cipher = CipherMode.CBC, PaddingMode padding = PaddingMode.PKCS7) { AesCryptoServiceProvider aes = new AesCryptoServiceProvider(); aes.BlockSize = blocksize; aes.KeySize = keysize; aes.Mode = cipher; aes.Padding = padding; byte[] src =

Windows Phone 8.1: Scan Barcodes using Camera

泪湿孤枕 提交于 2019-12-11 11:43:36
问题 I want to scan/read barcodes using camera in Windows Phone 8.1 by BarcodeScanner class of the SDK: http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.pointofservice.barcodescanner.aspx Is there any example available? How can I use this? Edit: It seems PointOfService namespace is for Windows but Windows Phone. Is there any similar library available? 来源: https://stackoverflow.com/questions/27331451/windows-phone-8-1-scan-barcodes-using-camera

Windows Phone 8.1 - Write text over WriteableBitmap

丶灬走出姿态 提交于 2019-12-11 11:42:59
问题 In an app that I'm making I need to write text over a WriteableBitmap. In Windows Phone Silverlight I know how to do it: I only need to call writeableBitmap.Render() method, that's all! The problema is that my app needs to be built with Windows Runtime, and that method doesn't exist. My first approach was to write a method that performs drawing of numbers (I only need to draw numbers) over the WriteableBitmap, but, with this method, numbers appear a Little "robotic", they are all square and

Titanium Studio with Windows Phone Plugin: Titanium SDK does not support the Windows platform

被刻印的时光 ゝ 提交于 2019-12-11 11:41:25
问题 I want to do Windows Phone development with Titanium Studio. I followed https://wiki.appcelerator.org/display/guides2/Getting+Started+with+the+Windows+Phone+SDK#GettingStartedwiththeWindowsPhoneSDK-UsingStudio(Preview) in order to get the Windows plugin. After a required restart of the software, the Windows option apears in the Deployment Targets when creating a new project. Unfortunately, for all Titanium SDK Versions I have installed, 3.5.1.GA, 3.5.0.GA, 3.4.0.GA, 3.3.0.GA, I am getting an

Cyclic tile template Windows Phone 8.1

血红的双手。 提交于 2019-12-11 11:30:13
问题 I am trying to create cyclic tile template using this code TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true); var tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Image); var tileImage = tileXml.GetElementsByTagName(“image”)[0] as XmlElement; tileImage.SetAttribute(“src”, “ms-appx:///Assets/image1.jpg”); var tileNotification = new TileNotification(tileXml); TileUpdateManager.CreateTileUpdaterForApplication().Update

Text formatting in TextBlock Windows Phone 8.1

て烟熏妆下的殇ゞ 提交于 2019-12-11 11:29:01
问题 I have a list of strings in my ViewModel with the following format: This is an <b>example.<b> I want to have some kind of text control in my view that will display the formatted text via DataBinding *, like this: This is an example. I don't find any built-in control that can behave like this. Does anyone know how to deal with it? 回答1: You can use Run: <TextBlock FontSize="30"> <Run>This is an</Run> <Run FontWeight="Bold" Text=" example"/> </TextBlock> For this you will have to parse your

Access to Internet in Background

折月煮酒 提交于 2019-12-11 11:10:17
问题 I'm using C# and Windows Phone 8.1 as Universal App. I used background task by this article: http://www.romasz.net/how-to-add-a-backgroundtask/ I want when my application is in background, open a site and grab html source. I've used this code (in the background project): public async void Run(IBackgroundTaskInstance taskInstance) { Debug.WriteLine("Background started\nRetrieving data"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri("http://mysite")); HttpWebResponse

System.TypeLoadException Could not find Windows Runtime type 'Windows.Foundation' exception

拥有回忆 提交于 2019-12-11 11:03:09
问题 In my Windows Phone 8.1 app I'm creating a CustomPage and then navigating to it, all in code behind. My CustomPage class is: using Windows.UI.Xaml.Controls; namespace TestApp { public class CustomPage : Page { public CustomPage() { this.BuildPage(); } private void BuildPage() { var panel = new StackPanel(); panel.Children.Add(new TextBlock { Text = "Hello World" }); this.Content = panel; } } } And then in my MainPage.xaml.cs I'm doing this: CustomPage myNewPage = new CustomPage(); Frame

How to prevent “You have already authorized this app” message on Facebook connect in WP8.1?

萝らか妹 提交于 2019-12-11 10:49:51
问题 I'm learning to integrate facebook login in WP8.1. My problem is that I need facebook to ask me for my credentials every time I press the connect button but it does not do that, it remembers the last log in and prompts "You have already authorized my_app_name". How do I go around this? Is there anyway I can prevent facebook to remember the last login? I've followed THIS tutorial, just fyi Any help would be really appreciated. Thanks. 回答1: I figured out the solution to this. When the user taps