Recently, i want to create an application to sync photos between iphone and desktop by using C# language. I use Manzana library to copy image from PC to iphone.
As my understanding, the image file should be put under to /private/var/mobile/Media/PhotoData/Sync folder. But this does not work, i cannot see imported file when browse iphone photos although the file is copy to the location correctly.
Then i try to update the database file /private/var/mobile/Media/PhotoData/Photos.sqlite. To add a new entry to represent the imported photo file. Then i can see photo in iphone, but without thumbnails. And i have to restart the album application (close the application and start it again) so that to see the new imported photo.
But i found other tools can sync photo to iphone and can see the change immediately without restart the album application.
I want to know how this function is implemented?
Manzana is a C# wrapper of iTunesMobileDevice.dll. the main functionality is deal with iphone file system. and this is quite a old library which is not updated for a long time. I am not sure if there are any APIs to allow user to select an folder or photo file and sync it to iphone just like we do it in itunes, so that we don't need to process the db and thumbnails.
Does anyone have such experience before?
Im using desktop Dropbox as a buffer between mobile app and desktop.
Before this, you need a DropBox registered account and install the application.
After that, simple create a new folder from desktop Dropbox, drag-and-drop all
your photos into the new folder
Then, return to your iphone and retrieve them from DropBox mobile app.
Related
I have a xamarin.forms app, I would like to allow users of app (android/ iOS/ windows) to be able to select a folder location at the start of the app and all the app related documents should be saved in that particular folder.
For now when I try to build a simple app which reads a xml file from the folder I create and display data on a list-view. I browsed through the file manager in android to see where the file is located physically on android device, but could not find any folder with app name.
In simple words I want a folder on the device to be created, which will be selected by the user. And accessible from file manager.
The reason behind this requirement is, the app is going to record a mp3 file and save a recording to a selected folder. So whenever the user wants to change his mobile he can always copy the recording to the new mobile and not loose any of the recordings.
To be able to use any of the possibilities below you will have to write platform-specific code in Xamarin.Forms and then expose some interface that you can use back in your PCL project.
Android:-
There is a post Choose File Dialog on how to create a file dialog selector (with directory changer), although not in Xamarin.
You will want to point the starting location to a shared folder of some kind.
There is a Xamarin tutorial here that walks you through how to create a simple file browser.
iOS:-
For iOS you may be interested in the iOS Document Picker View Controller, here.
There is an extensive tutorial of how to complete this using Xamarin here.
(pictures are from Xamarin website)
I want to supply a bunch of files with my Windows Phone 8.1 app which are necessary for running the application. I searched on the net and found that this page. But I don't know which place in particular is the ApplicationData.Current folder. What I want is the following:-
Can I create a folder called Resources or use the existing Assets folder in my Project tree and save the files in there.
If yes, then how can I access that folder from within my App i.e. how can I open and close files in that Directory(relative or absolute addressing format to be used)? If you can provide a one or two line code for this, it would be great.
Do I have to use the ReadTextAsync method to read the entire text of the file into a string or are there any other methods.(The System.IO.File.ReadAllText() method is not accessible when creating Windows 8.1 Phone app).
Thanks in advance.
Your App is installed on SD or Phone, depending on user Settings on the Phone. You can't normally access those files eg. by browsing files while Phone is connected to computer - the apps are Isolated.
Depending on your App:
if it's 8.1 Silverlight then you will find all the information here at MSDN.
if it's 8.1 RunTime then take a look here.
Although you can't access files inside your App from outside the App, from WP8.1 you have access (read/write) to SD Card and other KnownFolders.
EDIT - you can also access your files by using Uri schemes.
I just have a "short" Question. I did a lot of research the last few hours and found out, that a Wp7 application has access to his own directory and the IsolatedStorage. So if I want to work with a file in my application I either have to load it into the project using the Solutionexplorer in VS, or create a file manually by code, load it into the Isolated Storage and then read out of it.
So i come to the result that it isnt possible to load a specific file, which is in an unknown directory or folder and has an unknown name from my mobile Phone (or WP7 emulator) into the App directly, right? Because there is no browsing feature or something like e.g. in the ASP.NET Webform,the FileUploadControl.
Is my understanding correct or do I miss something?
you cannot access anything that is on the phone (except music and photo lib etc) other than whats included with the app and its isolated storage area.
you can't browse the local device like you can on windows. however you can download files from the net.
It seems that all wp7 apps have sandboxing. My app downloads an MP3, can I at least sync it with Zune or somehow save it to PC?
In the current version of WP7 you cannot save songs to the media library.
You can save them to IsolatedStorage, but since your goal is to transfer them off the device, your only option is to upload them to a web service. From there you can then transfer the files to a PC etc.
Thanks,
Stefan Wick - Microsoft Silverlight
Anything that you download can be saved to isolated storage, but that is unique to your application, is not synched with Zune, and cannot be accessed by other applications. You could take a look at this approach for desktop communication, but then you'd need to provide a desktop application. In which case, you might just as well download the MP3 on the desktop and let Zune sync it with your WP7 normally. If you're provided something more than just media playback, then you can just access the phone's media library from your app.
I am new to the windows phone 7 development world. I am developing an application in window phone 7. In window mobile application (smart device application) we can browse the content of the mobile device by selecting the tools -> Device Emulator Manager -> slecting the emulator & then after clicking the cradle we can browse the content of the mobile device. I want to know how to do this in windows phone 7 application ? I also want to know how to programatically access the content of the Window Phone 7 ? (for e.g I want to open the screen which we will be opened after clicking the upload button in asp.net. In that screen we can navigate between the folder structure of the computer. In such way I want to open the screen for window phone 7) Because I am developing an application in which I want the images from the existing mobile device. So I want to browse the content of the mobile device so that I can select the particular image from the existing content of the mobile device & after that I will dynamically add these images to the images folder of my application. Can you please provide me any code or link through which I can resolve the above issue? If anyone know anything that will also help me a lot. Please share anything whatever anyone knows.
Due to the security model of Windows Phone 7 and fact that applications are sandboxed means that it is not possible to create a file system browser on the device. You can only see files / the directory structure within IsolatedStorage and you must create these files yourself.
You can, however, use MediaLibrary.Pictures or the PhotoChooserTask to access the images stored on the device. These are the images youu'll see in the Pictures hub and, therefore are outside of the files you specifically put in IsolatedStorage.
You can only access the files/directories that are located in the Isolated Storage that is assigned to your application, and you can get a list of those via GetDirectoryNames (for folders) and GetFileNames (for files). You will have to implement a custom listing mechanism since there is no default storage browser component.