I have a universal windows store project. I want to access shared files which are accessible by both windows 8.1 and wp 8.1.
StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile sampleFile = await storageFolder.GetFileAsync("text.txt");
I tried this but its not working. Location is wrong. Any idea what is the location of shared files ?
I think the term you're looking for is "roaming" rather than "shared".
If you want to share user data between the same app running on both Windows and Windows Phone then put the data in the ApplicationData.RoamingFolder. LocalFolder files are local to the current system. RoamingFolder files will roam across systems, including between the same app on Windows and Windows Phone.
See Guidelines for roaming app data and Accessing app data with the Windows Runtime
The "Shared" project is a compile time concept. Files in that project are merged with the platform specific projects at compile time. When building, Visual Studio uses all of the files from the target platform project plus all of the files in the Shared project and treats them as a single project. Content files in the Shared project will be included in the appx for both platforms and are available at runtime via the ms-appx: protocol or the Package.InstalledLocation folder.
Related
I am developing windows phone 8.1 runtime application, I need to store mp3 files in local folder of app, to avoid access to user.
But to do this Is there any size restrictions or file count restriction to store files on local storage.
any suggestion is appreciated.
Thanks
Create App pakages option is disabled..
Cuz i have to upload my app package so as to publish it.. so am stuck with it.
i Have also logind with my developer microsoft account to0.
Edit:
actually in Visual Studio 2013,
in PROJECT > STORE> (all the options available are disabled)... so this the problem.
If your app is Windows Phone 8.1 App, you can create appx package using project -> store in vs.
But if your app is Windows Phone 8 App or Windows Phone Silverlight 8.1 App, you don't need to create appx file, the only file you need is xap file in Bin/Release(or Debug) folder. When you publish it, just upload your xap file is OK.
Happened the same to me, and (after 20 minutes of VS restarts), I realized the Project needs to be selected instead of the Solution at the Solution Explorer.
This way all Store options are enabled again.
Im trying to deploy XAP files to my Lumia 620. They work if i download them from the store but when i try and load another XAP from somewhere else, e.g. TimeMe or from Windows Phone Hub, the phone fails to show them. Any idea why?
The Windows Phone 8 OS architecture doesn't allow installation of non store applications, to support this they have restricted the loading of XAP files from other download sources.
In some countries Window Phone store comes with a option for installation from SD Card option, under this option you will be able to view XAP files on your storage media of phone, if you select that XAP file the store application will check for that application in the Windows Store and if it is a free app it will get installed otherwise it will ask to buy for a license of the app to install it.
The Windows Phone hub is for enterprise environment, where a company distributes its LOB apps to its employees, if you are able to access company hub app than you must be able to download and install the app. Even in this case the process is automated as in case of Windows Store and nowhere you will manually unpack the final XAP file.
Windows Phone will not let you install XAP files that are not certified in the WP Store. The only way you'll be able to install XAP files yourself is to either:
Download and install a WP Store signed XAP file. You can do this by going to an app's page on your computer, downloading the XAP file, transferring it to your SD card, and installing it through the Store app.
Download and install a unsigned XAP file that hasn't been through the WP Store yet. You can install these XAP files on a developer unlocked phone using the Application Deployment program included with the WP8 SDK.
The app TimeMe that you included as an example is an unsigned XAP file. You can "sideload" this app through the Application Deployment program.
I'd like to explore the system files of some apps I've installed, but the program files aren't accessible when you plug in Windows Phone 8 via USB. I only see music, videos, ringtones, that kind of stuff.
Is there a way to view and edit the contents of the program files?
i am building a windows 8 store application that will connect to some backend feed. I have all the code in place - but i need to create a package for our test environment and for the production environment. They will obviously use different URLs.
In a normal windows forms/console application i would have one version of the binaries and two app.config files which would host the URLs. As Windows 8 is created as a pacakge - is there any way to have such a config that is not included inside of the package but stored separately and installed during setup? For now the app will not go to the windows store but will be delivered manually to a few devices.
Thanks in advance.
There is no app.config file associated with a Windows Store style app. You could however add an XML file to your app package and access that at runtime with conditional compilation and the ms-appx protocol. But, you would be without all the nice utility functions associated with an app.config.