Associate file extension with app in wp7.1 - windows-phone-7

Is it possible to associate a particular file extension with my app in wp7.1?
I would like to allow the users of my app to email files of a particular type to each other and then when they click on the attached email file it would launch my app so it could process the file and add it to isolated storage.

No, it's not. You need a "special permission" from Microsoft to do it, that's how Adobe was allowed to do it.
But there's no part of the official released SDK that allows for it.

Related

How to red an external file during the installation of an .appxbundle

I want to distribute my UWP app using side-loading.
I have created the .appxbundle using Visual Studio, and also EV code-signed it.
So, when the user clicks on the .appxbundle file, my app is properly installed and the user can start working with it!
In this way, I can place such .appxbundle on my website, and the users can download and install it. Marvelous.
Now, I would like to customize each download, by adding a file with some tracking information to attribute a download e.g. to a specific ad campaign that I am running.
So my server can generate a ZIP file containing the .appxbundle and a little .txt file containing the tracking info (I need to generate a separate file because the signed .appxbundle takes too long - several minutes - to regenerate each time).
The user then unzips the ZIP file, clicks on the .appxbundle and installs the app.
The tricky part is that, during the installation of the app, I would like to copy the .txt file into the LocalState folder of the app that is being installed.
Is it possible?
How can I do that?
Thanks!
If your users are going to install the app by clicking a ms-appinstaller:// link, you can attach extra data using the activationUri.
This can be a custom URL scheme that you register for your app with any url parameters. The appinstaller will call this url once the app is installed.
We use this to pass login information to the app, like this:
ms-appinstaller:?source=https://localhost:8000/myApp.appinstaller&activationUri=my-app-track-install:?campaign=billboards
If your app registers for the my-app-track-install url scheme in the Appxmanifest, then from the apps perspective the first launch is then a url activation with the url you added as activationUri. In your case you would track the install, and then proceed to launch the app normally.
You can find more info on this in the example and remark for this (semi-related) api-documentation:
https://learn.microsoft.com/en-us/uwp/api/windows.applicationmodel.package.getappinstallerinfo?view=winrt-19041

Associate App with Messages Extension

I created a Messages Extension in Xcode 8 using the appropriate template, that seems to be working fine and when I run the extension, it's installed in the Messages app and I can use it without any issues.
My problem is that I wanted to create an actual app to be associated with this extension (so that the user would be able to search the extension through the Messages Store or install the actual app through the App Store). I gave it a matching bundle identifier (my extension is com.XXX.testmessage.MessagesExtension, so for the app I set com.XXX.testmessage), but when I run the app, it doesn't install the extension.
Is it possible to do that? And if so, what am I missing?
In XCode8, open your existing app. Then you need to add a new target to your app (File->New->Target->iOS->Sticker Pack Extension (or an iMessage Extension if you want a custom messages experience)). It will then create a folder visible in Project Navigator. The name of the folder depends on the name you gave to the extension. In that folder you will find a Stickers.xcassets where you can drop your stickers.

How to done file manipulations in WP7

I am developing a windows phone application. In this app I am downloading some files and stored them in isolated storage. I need to open these files. For that I tried different methods, but I can't.
The same question is asked here.
The answer says I cannot open a file from isolatedstorage. But I am trying the same in the Mail Client in my Windows Phone (hotmail client). I sent some .doc, .ppt, .pdf, .xls to my email and tried to open these attached files in my phone through mail client. I can open the files in my phone. I need to do the same in my application also. How can I do this in my app?
You will not be able to open these types of files from the isolated storage. There is no way for third-party applications to launch the external application required for viewing these file types. The Mail Client is a native application that runs outside the protected sandbox which third party apps are subjected to.
One solution you can utilize though is to upload the file to an external server and launch it using the WebBrowserTask class. I am not going to give the code required to upload the file, as that will depend on your environment, but once uploaded, here is how you can launch it:
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.URL = "http://www.foo.com/bar.pdf";
webBrowserTask.Show();
I should mention that this will only work for an external file. It will not work if you try to reference a file in isolated storage. You will need to upload the file somewhere.

Mac App Store Sandboxing - Writing a new file?

I've been playing around with an app I want to submit to the Mac App Store, and part of the functionality is simply grabbing a file the user chose by dragging or opening, and saving a modified of it to the same directory as the original file (but with a different file name).
I don't want to use a 'Save' dialog box, as that destroys the utility of the application I'm building, but it looks like that might be the only way the app would be allowed—under sandboxing requirements—to write a file to an arbitrary location (arbitrary, in this case, being in the same folder as the existing file) on the disk as a new file.
Is there any way I can approach this without disabling sandboxing? Also, if I submit the app without entitlements/sandboxing turned on today, will it be approved by Apple (supposing it passes all the other requirements), or are they already turning down non-sandboxed apps?
For your first question, no, I don't believe there is any way to write to a file the user didn't specify, unless it's either in your app's container, or (as of 10.7.3) in a directory you have a security-scoped URL for. See the documentation here. If the user specifies a file, I doubt you get permissions to the enclosing folder, but it's worth a shot.
Answering your second question, as of today, Friday April 27th, 2012, the App Store does not require sandboxing. The latest deadline given was June 1, 2012.

Where is the correct place to store a Mac application's database?

I'm building an application that I hope to submit to the Mac App Store. The app has an SQL database that stores all of the items that the user has created.
Does anyone know where I should be storing this to comply with Apple's guidelines? Should it go in Application Support, the Documents folder, the Library or somewhere else??
Generally, you shouldn't automatically create file in the user home directory, except in ~/Library/Application Support/<Application>. So either let the user choose where to store the information (if it is document centric), or store it in Application Support.
See the question: What location do OSX/Cocoa applications generally use to store data files?

Resources