Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:45:42+00:00 2026-06-18T12:45:42+00:00

I have a Windows Store App that creates a secondary tile. When the tile

  • 0

I have a Windows Store App that creates a secondary tile. When the tile is clicked, I want the app to perform, what is effectively, an off-line function (that is, I don’t want to go back into the app, but want the app to do something and then exit). So in this case I want to launch the e-mail client, for exampe. Here’s where I am so far:

app.addEventListener("activated", function (args) {
    if (args.detail.kind === activation.ActivationKind.launch) {

        if (args.detail.arguments !== "") {
            // Activation arguments are present that 
            // were declared when the secondary tile was pinned to Start.
            args.setPromise(WinJS.UI.processAll().done(function () {
                var emailaddress = args.detail.arguments;
                var promise = Email.SendNewMail.sendEmail(emailaddress);
                //promise.complete();
                return;
            }));

        } else if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
            // TODO: This application has been newly launched. Initialize
            // your application here.
        } else {
            // TODO: This application has been reactivated from suspension.
            // Restore application state here.
        }
...

Email function here:

    sendEmail: function sendEmail(addess, subject, body) {
        var mailto = new Windows.Foundation.Uri("mailto:?to=" + addess + "&subject=" + subject + "&body=" + body);
        return Windows.System.Launcher.launchUriAsync(mailto);
    }

The error I currently get is “Object has disconnected from its client” – which I assume is caused by the program exiting before the promise completes. How can this kind of behaviour be achieved in WInRT?

UPDATE:

I’ve had feedback from MS on this, and their response if that whether or not this is possible, it is definitely unsupported because exiting an app programatically breaches certification requirement 3.6.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:45:43+00:00Added an answer on June 18, 2026 at 12:45 pm

    It does not seem that the Secondary Tiles are intended to launch third party applications:

    Secondary tiles enable users to promote specific content and deep links—a reference to a specific location inside of the pinning app—from Windows Store app apps [sic] onto the Start screen.

    Source: http://msdn.microsoft.com/en-us/library/windows/apps/hh465372.aspx

    I have tried a number of ways to correct your issue though and there seems to be a timing issue in play here. When not debugging, your above code (with or without a Promise completion function call like then or done) fails every time for me, no matter if you put your code in the ready, loaded, or activated event.

    In my testing however, I was able to get this to work without the error by wrapping your launch function in a couple of different ways:

    1. With a timeout using setTimeout with a timeout of anything above 1 second
    2. With a Message Dialog using Windows.UI.Popups.MessageDialog

    Both of which ending in your promise completion callback, with a call to window.close(); to exit the application.

    Example using Eight.js for the messaging route: (seems the cleanest available solution, but obviously doesn’t perform the launch in the background and isn’t the most user friendly):

    Eight.Message.confirmAsync("Send the email?", function (doSend) {
        if (!doSend) return;
    
        Email.SendNewEmail.sendEmail(emailaddress).done(function (e) {
            window.close();
        });
    });
    

    Note: I think either solution is hacky though, and I’m sure you’d agree. Neither one actually does the launch in the background. I can’t find any documentation anywhere to support being able to do this without launching your application. To me this seems like a bug and I would try to open a technical support incident for a cleaner solution if you can. If not you might try the Windows Store Apps forums where some actual Microsoft people dwell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# app that creates a settings file for itself to store
I have an ASP.NET MVC 4 app that i want to deploy to Windows
I have create a Windows Store app which successfully updates its tile (live tile).
I have a Windows desktop app that I want to make available on the
I have a great idea for a windows store app. I'd like to make
I am new to Windows 8 App Store development and have bumped into something
I have created a Windows 8 Store App using C# / XAML. My interface
I have been developing a windows store app, where I need something like Periodically
We have an MSI installer for a .Net WinForms app for Windows XP that
I want to play songs in my windows-store app. the thing is, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.