I am building a wp7 app. I am using IsolatedStorage. Sometimes, for testing purposes, I'd like to erase everything my app has put into IsolatedStorage. Is there a way to do this for the emulator, or must I do it programmatically?
You'll lose all isolated storage for all apps by restarting the emulator.
Alternatively, you could uninstall the app from the emulator via tap and hold on the app list.
If you did want to do this programatically the code is very simple:
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
store.Remove();
}
Related
I am working on a Windows 8.1 store game.
There is no specific need for the game to be a windows store app but I use it for development since I already had code for windows store and didn't bother to migrate the input and game loop code to a traditional desktop app.
The issue I am having now is that the Pointer(which can be a mouse/touch/pen) is bound to the screen's resolution.
I didn't find any way to work around it or to set the mouse cursor so I can't create a first person shooter like aimer or pointer.
I know it is possible to do so in a traditional win32 desktop app but I wonder if this limitation is only for Windows Store apps or will I encounter the same limitation in a traditional desktop app that runs on Windows 8.1?
In other words is this limitation a Windows 8.1 thing? Or a Windows store app thing?
Is there a way to create a FPS like mouse/aimer in a windows 8.1 store app?
You can remove the app window bounds limitations and it is possibly even easier than in a Win32 app. The only thing you need to do is this:
Window.Current.CoreWindow.PointerCursor = null;
From now on handle this event to get the delta values when the mouse moves:
MouseDevice.GetForCurrentView().MouseMoved
I use it here.
How can I add media files to library folders of WP emulator so that I can list them in my program?
The Windows Phone 8.1 SDK allows you to use a folder on your dev machine to simulate an SD card for the emulator. If you put a bunch of media files in that folder before "inserting" it into the emulator, they will get picked up and added to the appropriate libraries.
Note that it can take a few seconds for media indexer to wake up and go through the content but you can easily check on its progress in the appropriate built-in app (eg. Music or Photos).
You can find this feature in the emulator's Additional Tools window:
you need to use SaveSong from MediaLibrary
have a look at this
One of the new features of the Windows Phone 8 SDK is the ability to save(add) songs to the phone's MediaLibrary.
Try this out for Songs.
for photos
Try this
I am developing an Hybrid Mobile app using Windows Phone 7 sdk and phonegap. Using Cordova local storage I am storing value. The stored value does not persist If I close the app and launch again in windows phone emulator. Anybody used local storage or alternative persistant storage in windows phone shares idea would be great.
window.localStorage.test = "Some test data";
console.log(window.localStorage.test) //It prints result but does not persist
I believe the correct syntax is:
window.localStorage.setItem("test", "Some test data");
console.log(window.localStorage.getItem("test"));
Assigning properties appears to work simply because javascript allows you to attach new properties to objects.
Original Answer Are you closing the emulator between executions? The emulator clears its user state when you close it.
I saw using IPhone or Android, it is possible to add a website to the desktop or start screen and this will make this website work as a native app which will open without the browser frame.
Is that possible using Windows Phone and how?
No.
You can pin a website to your howe screen but htis will open in Interenet Explorer when launched
I have read that data stored in Isolated Storage in wp7 is permanent.But I am a little confused about the term 'permanent'. I don't have wp7 device so I can't check this on a real device. I tried the emulator and everything is working fine until I close my emulator. I want to know if the same problem exists on the real device when the application is closed or the device is switched off.
On the device, the IsolatedStorage will keep your data, until you uninstall/delete the application. When you use an emulator, the "installed app" remains only until you close the emulator. Closing your emulator is equivalent to deleting your application.
In device Isolated Storage data is stored till the application is Uninstalled.
Whether it may IsolatedStorage data or Application Settings.
When you are using windows phone instead of emulator IS is persistent. But in emulator the story is different refer this question Automatic login process in Windows Phone 7.1 application