What happens after resuming from a tombstoned state? - windows-phone-8

When the user resumes an app that was tombstoned, does it start on the main app page and you have to handle with saved states to check where was the user and send him there again, or does it open directly the page where the user was and all you have to do is to restore your variables and date from the saved state?

Tombstoned
A tombstoned app has been terminated, but the operating system preserves information about its navigation state and also preserves the state dictionaries the app populated during Deactivated. The device will maintain tombstoning information for up to five apps at a time. If an app is tombstoned and the user navigates back to the application, it will be relaunched and the application can use the preserved data to restore state.
More info in the official documentation.
So, the navigation is kept, but you need to restore the state. You can always test this - in project properties, go to debug and select
Tombstone upon deactivation while debugging
So when you deactivate the app while debugging, it will actually go to tombstoned state and you can test it properly.

Related

How do I start a DevTools user flow recording from a dynamic URL?

Google recently released their DevTools user flow recorder and it seems like an interesting and easy-to-use tool. One limitation I'm running into is that replaying a recording will always bring you to the page you initiated the recording on. For example, if I create and save a recording on this array processing question then navigate to this git question, running the recording on the latter will redirect me back to the former. I would like to be able to make a recording, then kick it off from whatever page I'm currently viewing. So far, I've tried both removing the URL from the initial step and replacing the initial URL with a JS IIFE that gets the current URL; neither of these have worked.

Web App script fails to launch by other users

My question is not about Docs only, but about Drive. I developed a web app, published for executing by users accessing the app, with access for everyone. and when I follow the given link by myself, I see pop-up for granting the access to my app. And after it my script starts for me.
But if I try to choose another account (for testing purposes) when the app asks me for granting access, I do the same, there appears "Authorization successful" for a moment, pop-up closes, but immediately appears again, and asks for permissions, and so on again and again like in a loop. When I check account settings I see that the app has access, but it doesn't start.
Remarkably, that while developing, I tried to launch it many times by different accounts and it worked fine then.
When I use incognito tab, it asks me to login, and having it done, I succeed to start the app. But when I try to start with usual browser tab a pop-up is appears and asks to review permissions. Clicking "review permission" it asks me to login offering my default account (which I use to develop and which launching process is ok), and choose another.
It is a bug, see here
The behavior is well known and is already been worked on.
I recommend you to give it a "star" to increase visibility and hopefully speed up the process.
In the meantime, the only workaround is either not to be signed in with multiple accounts simultaneously or to use incognito mode.

save state chrome extension with event pages

I have a Chrome extension I am working on that queries a remote server and shows a desktop notification when it changes. I am using an event page which will frequently go to sleep so I use a Google Alarm to have it do a check every 5 minutes. I save the last state out into a variable and compare it to current state to determine if a desktop notification should be displayed. I'm finding this last state variable is frequently going undefined when chrome is not in the foreground or under other conditions. I have a few variables this may be happening to as well.
How do I prevent this from happening?

Windows .net Google.Apis hangs on the call to InsertMediaUpload.Upload -- there is no timeout

I am using GoogleApis to upload documents to Google Drive using the InsertMediaUpload class from the FilesResource namespace and the Upload method. It is working well for me with the following exception:
After calling InsertMediaUpload, a browser window appears asking the user to log into their Google (usually Gmail) account. If the user simply closes the browser window instead of clicking on "Accept" or "Cancel" then the current process appears to be hung. I suppose there should a timeout of a minute or two so that if the user opts to not log in the current windows application will not simply hang and stop working indefinitely.
There is no need for sample code here. What should happen when the user simply closes the browser window instead of clicking cancel if they are no longer interested in uploading a document? Crashing (or hanging) the current process should not be a possibility, but that is what occurs. One would hope closing the browser window would have the same effect as clicking the cancel button -- just another way of opting out of an upload to Google Drive, right?
Thanks in advance for any help with this.
You're not supposed to get authentication message from InsertMediaUpload class. You should handle authentication by yourself. Authentication browser window you get is for your development convenience, not for production code. Please take a look at .net quickstart. In this quickstart, you'll see GetAuthorization method which handles authentication. Modify this method on your needs and you'll get what you want.

WinJs Settings panel close

I can use the SettingsFlyout afterhide event to know when one of my settings pages closes, but how can I detect when the overall Settings page closes. i.e. the user goes back to the app.
It depends on how the user returns to the app. If they click outside of the settings UI while your settings page is displayed, then the afterhide event will fire. But if the user is displaying the main settings page, that's UI that is controlled by the OS, and isn't really part of your app, per se. For example, the user could open the settings UI to change the system volume, or make changes to network settings. In those circumstances, it wouldn't really be appropriate for your app to receive notifications.
So I don't think there is an event to subscribe to for the main settings pane closing. As such, you should subscribe to afterhide on each of your settings pages to ensure that you can capture any changes appropriately.
Hope that helps.
For more info on Windows Store app development, register for Generation App.