FIles sharing through wifi in windows phone 8 - windows-phone-8

I want to make an application which can send files through wifi.Can any tech gig please help me ?

You cannot make direct access to the contents of the Smartphone via WiF. I know this is one of the security features of the OS.
But you can make the sharing of content through a transient storage in the cloud.

Related

Accessing OneDrive as a StorageFolder from the local storage

I have been developing one Windows Store app for Win 8.1. Is there a way to access the user's OneDrive which is already synced on the hard drive? I need to access it as a StorageFolder. Similarly to KnownFolders and all the libraries. The reason behind that is that I am doing something like a gallery app that displays thumbnails of videos and pictures. When the users decides the app shows the media in full size and if it is a video, it is played. The app counts on the fact that OneDrive automatically syncs all the data, so it does need to be retrieved via the Live SDK API. If I use REST, it will be just too slow. Do you know if there is a way to achieve the mentioned approach effectively or maybe some alternative?
I have been researching extensively, but with no avail.
Thank you!
All the best,
Rosko
As Nate mentioned, you gain access to the folder through the FolderPicker API. There's no direct way to obtain the StorageFolder for that location.
Once you get that StorageFolder and enumerate contents, the extra piece you want to know about is the StorageFile.isAvailable API, as well as StorageFile.getThumbnailAsync/getScaledImageAsThumbnailAsync. The isAvailable flag is what tells you whether a file has actually been downloaded/synced, because the user might have indicated "online only" for any files.
I write about this a bit in Chapter 11 of my free ebook Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition (page 575, pages 593-597), including a table about how OneDrive availability works with metered networks. This includes using thumbnails.
There's also a talk from //build 2013 on this, "What New in Working with Files" by Marc Wautier, http://channel9.msdn.com/events/Build/2013/2-119. Should answer your OneDrive questions.

Deleting messages from IM apps

I want to do an windows phone app which deletes all conversations from Y!M messenger, Whatsapp and SMS/MMS from Message Inbox. Is there a library from sdk or some API to help me to do something like this?
You can't intercept calls, sms, and access the isolated storage folder of another app, other than yours. The reason is security.
You will not be able to do this. The WP8 platform does not allow communication between applications. Each application runs in its own sandbox, so the applications are isolated from each other. See this from msdn:
Windows Phone apps run in a sandboxed process. This means that they
are isolated from each other, and will interact with phone features in
a strictly structured way. If an app needs to save data or
configuration information, it will do so using isolated storage, which
is designed to be protected from access by other apps. Apps can only
communicate with each other through controlled mechanisms. For more
information about isolated storage, see Data for Windows Phone.

How to make settings persist after uninstall on Windows Phone 8?

I need to make a certain setting stay on the device even when the app itself has been uninstalled. For iOS we are using user's keychain to store this information. Is it possible on WP8 somehow?
If you want to keep, let's say user settings after an app is uninstalled, I highly doubt that this is possible on Windows Phone. First of all it would create a lot of orphan files on the phone that you would not be able to get rid of. One of the services on Windows Phone is Package Manager. This manager is in charge of installing/uninstalling apps, keeping track of what is pinned to the start screen and other metadata about an app and any extensibility points like Share..., etc. If you uninstall an app this manager should clean everything related to you app, even your user settings in any file or IsolatedStorage that you create.
iPhone and Android give you an ability to use some sort of file manager to explore your phone. As far as I can remember you could use Putty to connect to your phone to see the folders and stuff. In Windows Phone you cannot go this far. There are some tools like Windows Phone Power Tools that you can use to check the installed apps, but that's about it.
Apps and all their related data are stored in sandboxed folders. When an app is uninstalled this whole folder is deleted. As such this means that all saved data is removed.
There are two, probably non-ideal, workarounds.
You could create an image saved in the users photo library. You could embed the identifier in the image or it's name but the user has control of these images and may delete it. You also can't programmatically delete such files so you may end up with lots on the device. Having lots of "rogue" files on a device is also likely to cause a user to tidy them up (delete them).
You could store a record of the setting, linked to the device on a web server. This has the downside of needing to maintain the server and handling data sync and offline scenarios.

HTML5 App Storage Windows Phone 8

I want to develop an html5 app for both windows 8 and windows phone 8.
What is the best storage technique, I thought about the following options:
Local Storage
IndexDB
Please tell me what storage mechanism to use? Can I use IndexDB in windows phone 8 (unable to find any article talking about it with WP8) ? Any idea of quota limit?
P.S. If you want to suggest any other storage technique then it is also fine.
DETAILS
IndexDB seems to be a good option, but
this link, confused me by talking about quota and saying
Indexed Database, each app has a quota of 250MB. Among all apps on the device, the limit is 4% of the disk size or 20GB, whichever is smaller. For hard drives that are less than 30GB, the limit among all apps on the device is 375MB. Because of the overall quota among all apps, test your app to ensure it functions properly when it can store very little or even no data because other apps consume the overall quota.
Though in the end the article talks about creating contact app and uses IndexDB to store contact info.
Use Phonegap. It has a local storage class you can make use of.
The localStorage on windows phone is not the best one. Sometimes it didn't work.
I use the dataBase and it's work like a charm. Here is the link http://docs.phonegap.com/en/2.8.0/cordova_storage_storage.md.html#Storage
And then you can request it to get information. It's very helpfull and I think It could be a good starting point for you

Create a background service in Windows Store Application

I'm new in development Windows Store applications but I have some experience in Android.
Is there any analog of Android service in Windows Store Apps?
I need some service to run on a background, for example, service that writes to file some information when application is not active.
I read about BackgroundTasks but it's not what I'm looking for.
Windows Runtime was designed for maximum battery life so there are not any Windows Store "service" applications. The closest thing would be Background Tasks, which you have said will not work for you.
From the MSDN Blog article Being Productive When Your App Is Off Screen:
The Windows Runtime does provide facilities for doing things in the background, such as:
Background file download or upload
Background audio
Sharing
Device data sync
Live tiles
Scheduled notifications
Background tasks (mentioned above)
I would suggest taking a look at the above article and see if any of the listed things will work for you.