I am trying to install my Metro Application.
So, my question is:
Can I move sample pictures for my Application to KnownFolders.Pictures and Videos during installation ?
And, how can I create installation file for my application?
Thank you
With the installation mechanism for Windows Store apps in Windows 8, there is no need to write a setup or installation program. That will all be managed through the Windows Store once your app is published.
Since you can't write a setup program, to accomplish a similar goal, you can put some functionality in the app to execute when it's first run, then save a setting to indicate you've already performed the first run operations.
This would be where you would put your code for moving sample pictures.
However, your app will also need the appropriate permissions to access the KnownFolders location programmatically - check out this article for details. http://msdn.microsoft.com/en-us/library/windows/apps/Hh967755.aspx
It's also a good best practice to ask the user if it's OK to copy sample pictures to their Pictures library.
Related
I am new to the world of Windows Mobile app development and C++. I have created CAB file to install my Window Mobile application on device. However at the time of installation I should be able to check if application is already installed. If yes, stop the application if it is in running state, then un-install it before proceeding with current installation.
I suppose this would be done with the help of Setup.dll file. I need help to get above mentioned scenario working. All posts related to Setup.dll that I came across only speak about its basic creation as shown here https://msdn.microsoft.com/en-us/library/aa924308.aspx?f=255&MSPPError=-2147217396
You need to follow the ce_setup skeleton and implement the default ce_setup functions.
In the codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) function implement your 'un-install'.
For example create a function that checks if a process is running and kill it. Remove App Counter for the application. Etc., etc. This function can nearly use everything you can use normally. Possibly start with an application that does the un-install and then use the same code in setup.dll.
Finally you need to add the setup.dll to your cab.
I need to write an application that can detect if the "Bing - Get me there" application is installed on the current phone and if so, launch it.
Is this possible? The app would need to do this for other external applications as well, so a generic method or interface for this would be helpful.
Applications run in a sandbox on Windows Phone and there is no way to tell if other applications are installed unless you are writing both of them and you use a method to announce to other applications that you are installed and they know how to read that announcement.
2 approaches to such announcements would be:
Have both (all) apps synchronise with a web server and report which devices they have been installed on. The apps can the query which other apps have been installed on that device.
Have all apps write a file to a location where all apps can access. The only place to do this is the PicturesLibrary so you have to embed the identifier in the name of the image or in its contents and be able to query all images to identify the other installed apps. The user could manually delete any images you create in this way though.
Beware, neither method can tell if the other app has subsequently been uninstalled though so this is far from foolproof.
As far as I know, there's no way to do that.
Applications on Windows Phone run in complete isolation, and can not act with other applications, other than some highly specialized apps (i.e. for playing media).
I'm creating a multiplayer game for windows phone 7. How can I run multiple instances of the emulator in order to debug it?
You can indeed run multiple instances of the Windows Phone 7 emulator at the same time, and even debug them simultaneously, as I show in my blog post.
Open the folder [Your Drive Letter]:\ProgramData\Microsoft\Phone Tools\CoreCon\10.0\addons
Locate the file ImageConfig.en-US.xsl
Take a copy of it, leaving it in the same directory, and name it something like ImageConfig.en-US 2nd Instance.xsl
Open the copy in a text editor.
Locate the element DEVICE and change it's Name attribute, also assign a new GUID value to ID.
Scroll down the file to locate the part that says PROPERTY ID=”VMID”:
Put a new Guid inside that element – make sure though that you use capital letters rather than lower case.
Save the file
Re open the XAP deployment tool, or Visual Studio, if you already have them open, and you’ll see your new Emulator instances.
See the blog post for more details, and screenshots to clarify some of the steps
You can only run one instance of the Windows Phone 7 emulator at a time on a single machine - that's set by default, and if you don't want to mess with custom configurations. When you deploy from Visual Studio, the same instance is shared between the running instances of the development environment.
However, you can create additional instances of the WP emulator if you follow the instructions in this article. Make sure you backup the config files before editing them.
I had the same problem, trying to test my multiplayer game, and i eventually bought a WP7 device (HTC HD7) on ebay, unlocked it for development purposes, and used it and the emulator for testing.
Since I have experience with the android environment, I can say that denying the possibility of multiple emulator instances really damage the development efforts. Hope Microsoft will change this.
BTW, i'm using the Skiller SDK for the multiplayer and social side of my game (Their official WP7 SDK will be avialable in a few days, and you can download it from http://dev.skiller-games.com). I totally recommend it.
Good Luck.
While I realize Adobe discourages use of the application directory for reading/writing, I have been able to successfully write data there on OSX, so long as the user selected the file.
However, this same application is giving me trouble in Windows 7. Even a browseForSave() doesn't seem to allow the FileStream to write to the file.
Is there a workaround for this?
Or at least can anyone confirm that it DOES work for them? If you know a way to accomplish this, example code would be appreciated. I've tried a few different methods to no avail. This is for an internal development tool, and for our purposes it makes more sense to have the file in the application directory rather than app storage at the moment.
Windows 7 manages an application's access to it's own data. Put simply, it won't let you. As such AIR currently prevents you from doing it on any system for consistency's sake. See the linked thread for suggested alternatives from Adobe's Chris Campbell.
While this is a really cheesy work around, you can copy the file from app storage to the app directory after writing to the file. You would still have to write the file in the applicaiton storage directory though.
var theFile:File = new File(File.applicationStorageDirectory.nativePath).resolvePath('myfile.xml');
var theCopy:File = new File(File.applicationDirectory.nativePath).resolvePath(theFile.name);
theFile.copyTo(theCopy,true);
Then you can delete the storage file if you wish.
theFile.deleteFile();
I need to offer the opportunity to install a personalized Adobe Air application from a website. Every user should be able to download an individual version of the app out of their user profile. Therefore i need to pass an id (e.g. the user id) to the installer which should be available at the first startup of the app, so that i can store it into a file or a sqlite database. I know that this could also be done straight out of the app through a login or by entering a username, but this is not an alternative. The app needs to the be personalized at the time the install process is started.
So far i have only little knowledge about developing applications with Adobe Air. I am just wondering if what i want to do is even possible.
Looks like it: http://cookbooks.adobe.com/post_How_do_I_use_command_line_arguments_with_my_AIR_ap-8003.html
Just found a tutorial on how to do what i described above. To pass parameters from the installer to the application itself through the browser invoke event, you just have to modify the installer, if you are using the default sample installer which comes with the Adobe Air SDK.
http://www.davidtucker.net/2008/01/10/air-tip-5-passing-arguments-to-an-application-on-install/#