Downloading file from web in wp7 application [duplicate] - windows-phone-7

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Launching other applications in Windows phone 7 Programatically
I have created an application in which I download Images/Files and other docs from web for my application but I need them to open using their default file launchers like pdf should be opened via adobe pdf viewer.
Currently I have acheived this using external web browser using webbrowsertask. I want it to happen within the app using webclient or webbrowser control. I tried these two methods, they worked correctly for images and text files but failed for pdf. Is there any other method?
Windows 8 has a native function which launches the default file handler. Is there something similar in WP7?

The link provided by Patrick say everything. You can't download and open files other than images and music files. Files like PDF/DOC need to be opened via webbrowsertask, so the file will fall into correct application's IsolatedStorage (for PDFs - Acrobat Reader). If you download the file, it will fall under your app's IsolatedStorage and Acrobat will not have access to that file.

Related

How to open files without using default App in Electron?

I know Electron's API openPath to open file by default app. For example, png file will be opened by Photos application if I set Photos as my default app to open png file in Windows.
But my goal is to let user chooses different apps to open file instead of default app every time.
This function is similar to open with when you right click the file and then choose another app to open it in Windows.
"open with" screenshot
So, is there any way to achieve my goal by using Electron'S API or any workaround?

Xamarin - How do i display a pdf file from ftp server in forms

I have to display a pdf file from FTP server in Xamarin on iOS and Android.
Not able to display the downloaded file, I am okay to display it within the App or OS default viewer.
the most easy way is to save this file to your device local storgae and use Xamarin Web View to display it.
it is very easy , you can find step by step on this article:
https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/controls/display-pdf/

Is it possible to drag-and-drop files between File Explorer and Windows Store apps in Windows 10?

I am currently evaluating building an app that uses the Windows Store architecture (formerly known as Metro). This app will target not just Windows Phone devices, but also Windows 10 desktop.
One function of the app would be to drag-and-drop files onto the app from File Explorer. An example scenario would be to click-and-hold on a JPEG image and drag it into the app, which would then process the file. This would provide the user with another option instead of going through file dialogs.
I can find plenty of resources about using drag-and-drop inside Windows Store apps, but it seems there's no information about drag-and-drop from a "normal" Windows desktop app, such as File Explorer.
With Windows 10, Store apps are promoted to proper windows, rather than fullscreen apps, so this functionality seems to be a bit more useful in this environment.
This comment seems to suggest that it isn't supported, but is dated two years ago and refers to Windows 8. Is this still the case with Windows 10?
Here is video tutorial and simple example on GitHub.

.jpg to .pdf conversion in windows phone 8 app

I have started creating windows phone 8 app and captured an image (.jpg) file, now I want to convert this .jpg file in to .pdf file.
Is there any way to do this ?
Please help me.
Thanks,
As you know that windows app support winrt .winmd files only and normal dll doesnt work in window apps. So you would need the pdf sdk for rendering a pdf and add image to it. In Aspnet application Itextsharp dll is free sdk to support it but there are lot of paid sdk available Component One.But there are free sdks like SilverPdf, itextsharp custom. or try to create new one Or you can extend to Web api service by using service (post api) with image encoded in byte array and in serverside using free tools like the itextsharp you can generate it as pdf and return it to windows app.

Launching other applications in Windows phone 7 Programatically

I am downloading a file from Internet, and I am saving this in IsolatedStorage. and Now I want to Open that file, ie if it is excel we should open a file with excel if excel is installed, or otherwise prompt the user to choose the application to open that file as like in PC windows os, How can we do this.. give me some Idea..
As general rule, there is no way to do what you are describing. The exception to this is for media, for which you can integrate with the Music and Video hub. This would allow you to, for instance, download a movie and then play it in the same way as if it was part of the zune collection, even though it's in IsolatedStorage.
If you want to download office files from the internet you can simply link to them directly by opening them in a WebBrowserTask. The user would then be able to open the file in the relevant office program. So, if you did the follwoing, the file would be opened in Excel:
var wbt = new WebBrowserTask();
wbt.URL = "http://example.com/file.xlsx";
wbt.Show();
This would not allow you to store the file in IsolatedStorage and that may or may not be an issue for you.
Windows Phone applications run in isolation and with very few exceptions cannot interact with other programs. So there's not a way for you to present a program chooser to allow the user to choose another application to launch.
I am pretty sure there are system launchers for different applications. For example, the YouTube application can be launched programatically the way I showed here - basically it is similar to the way Matt showed. Ultimately, each app is launched via a UIX reference (catched here), but there is no public endpoint to open a res URL.

Resources