windows-phone

Opening a PDF file in Windows Phone

旧街凉风 提交于 2020-01-11 06:34:56
问题 I'm developing an app for Windows Phone 7 and I'm using a Phonegap template for it. Everything looks perfect, but now I’m stuck trying to open a PDF file in the browser. I tried the following but that doesn’t work because the url of the PDF exceeds the 2048 character limit (it’s a data url). This code runs after the deviceReady event was fired. var ref = window.open('http://www.google.com', '_blank', 'location=no'); ref.addEventListener('loadstart', function () { alert(event.url); }); Now, I

Windows Phone WebBrowser set cookies

点点圈 提交于 2020-01-10 05:43:06
问题 I am using HttpWebRequest for REST services which uses some basic authentication that relies on JSESSIONID cookie. I need to pass that cookie to WebBrowser control to reuse that session, but didn't find any usable solution that would allow me to pass that cookie in the Browser's cookie store. Is there any way? The only way that I can think of now is to use Naviagate(url, null, MANUALLY_CONSTRUCTED_HEADER) which is kind of brute-force. Yes, and really have to use WebBrowser for this kind of

Error when Play file .mp3 (StorageFile ) with BackgroundMediaPlayer in isolated storage windows phone 8.1 rt

人走茶凉 提交于 2020-01-07 07:49:07
问题 I use Windows Phone 8.1 Runtime I get my song in isolated storage My code : storageFile is song in isolated storage IRandomAccessStream stream = await storagefile.OpenAsync(FileAccessMode.Read); BackgroundMediaPlayer.Current.SetStreamSource(stream); BackgroundMediaPlayer.Current.Play(); When I play it,but it not work , like photo (try emulator and device lumina 520) http://photoshare7.com/image/f5a _message: Unable to cast object of type 'Windows.Media.Playback.MediaPlayer ' to type 'Windows

Edit the DefineConstants in csproj file

删除回忆录丶 提交于 2020-01-06 17:58:27
问题 I have csproj with the following tag: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>Bin\Debug</OutputPath> <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;SUPPORTS_ICLOUD</DefineConstants> <NoStdLib>true</NoStdLib> <NoConfig>true</NoConfig> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> Here if you see that i have added

windows phone 8 Cordova - placing a file in a different path

流过昼夜 提交于 2020-01-06 17:42:28
问题 I am very new to VisualStudio and porting a cordova/phonegap application from android to windows phone 8. So I created a new project using createTemplates.bat and imported it in my VS2012 Express. The core result is one www folder containing img/css/js and index.html ; it works fine and I manage to launch it and deploy on my device. Because the application is quite big, I want to create a new sub-folder call subfold (under img), and placing picture.jpg in there so in solutionExplorer I have

Namespace missing in Windows Phone 8.1 runtime app project

北慕城南 提交于 2020-01-06 14:33:32
问题 I am writing a Windows Phone 8.1 runtime app. The InkPresenter class which was available in Windows Phone 8 is not there in 8.1. Now, 8.1 should be backward compatible with 8 and that all the apps that used the InkPresenter class in Windows Phone 8 can run on 8.1 too. So my guess(and I can be wrong in assuming this) is that the Inkpresenter class should be there in Windows Phone 8.1 too but might be under a different namespace. Otherwise, how could the apps of Windows Phone 8 using the

Convert ImageSource to Base64String - WP8

只愿长相守 提交于 2020-01-06 14:16:49
问题 am working on WP8application, I have few images in location Resources\Graphics\ i am trying to display images from these folder, but its not picking the path. Here is my code : <img src=\"/Resources;component/Graphics/"+ImageName).Append("\" ") this is in my string which i am using in my WebBrowserControl. WebBrowserControl.NavigateToString(html); // here html is a string which has all the html code in it. But its not display the images. So i want to convert the ImageSource -- Resources

How to append new javascript to current HTML WebBrowser Control

有些话、适合烂在心里 提交于 2020-01-06 03:46:06
问题 I am trying to insert my own javascript to present HTML(index.html - present in IsolatedStorage) at runtime. To get call from javascript to c# webBrowser_ScriptNotify . How I will achieve this, here is my attempts to achieve this. string script = " <script type=\"text/javascript\"> function scriptNotify() { window.external.notify(\"runtime\");}</script>"; byte[] param = GetBytes(script); webBrowser.Navigate(new Uri("/index.html", UriKind.Relative), param,"Content-Type: application/x-www-form

Is there something like AlarmManager(Android) in WindowsPhone7 mango, which will launch the app when the alarm goes off?

混江龙づ霸主 提交于 2020-01-06 03:20:25
问题 Is there something like AlarmManager(Android) in WindowsPhone7 mango, which will launch the app when the alarm goes off ? Like in android we have http://developer.android.com/reference/android/app/AlarmManager.html But in WindowsPhone7 we have this http://msdn.microsoft.com/en-us/library/hh202965(v=vs.92).aspx 回答1: The only way for an application to be started in Windows Phone 7 is in response to a user action. These include: - launching from the application list - launching from a live tile

Share data between Windows Phone apps

杀马特。学长 韩版系。学妹 提交于 2020-01-06 02:26:10
问题 I'm looking for the most simple and elegant way to share data between two separate Windows Phone Apps. For example, I have two apps: Input.app - An app with an input field and a "Save"-button Read.app - An app with a label and a "Read"-button. The use case will be as follows: The user opens the Input.app , enters something in the input field and presses the "Save"-button. The user closes Input.app . The user opens Read.app and presses the "Read"-button. The label will get filled with the data