Is there a way in MvvmCross to force re-start the app and show the MvxSplash screen - mvvmcross

Is there a way in MvvmCross to force restart the application i.e. go back to the splash screen and reset any internal mvvmcross state e.g. associated viewmodel navigation etc.

Related

Adobe AIR bring to front

I have an adobe AIR app. When I send some data with a local connection from a web page, I want the app in front of the browser and all the other windows.
I tried with both activate() and orderToFront() but I have no results.
The only script working is:
window.alwaysInFront=true;
window.alwaysInFront=false;
But this doesn't give the focus to the app. So when I click the button on the browser, I have the app on the top, but if I click on the browser the app stays on top until I click on it (giving it the focus) and than I click on the browser window again. It works fine If I click on the browser top bar.
I think that activate() would solve the problem giving the focus to the app, but doesn't work.
Here it is the code (I worked with the native window to resize, minimize and maximize the window too). The function I call from local connection is "primopiano"
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.MovieClip;
import flash.display.NativeWindow;
var window = stage.nativeWindow;
function trascina (event:MouseEvent) {
window.startMove();
}
...
function primoPiano (event) {
trace("porto in primo piano...");
//window.activate(); // doesn't work
//window.orderToFront(); // doesn't work
window.alwaysInFront=true;
window.alwaysInFront=false;
}
Did I forgot to import something or do I have to define a different window to do this?
Thanks!
Nadia
Have a look at the Documentation and API Reference
AIR provides several methods for directly changing the display order of windows. You can move a window to the front of the display order or to the back; you can move a window above another window or behind it. At the same time, the user can reorder windows by activating them.
You can keep a window in front of other windows by setting its alwaysInFront property to true. If more than one window has this setting, then the display order of these windows is sorted among each other, but they are always sorted above windows which have alwaysInFront set to false. Windows in the top-most group are also displayed above windows in other applications, even when the AIR application is not active. Because this behavior can be disruptive to a user, setting alwaysInFront to true should only be done when necessary and appropriate. Examples of justified uses include:
Temporary pop-up windows for controls such as tool tips, pop-up lists, custom menus, or combo boxes. Because these windows should close when they lose focus, the annoyance of blocking a user from viewing another window can be avoided.
Extremely urgent error messages and alerts. When an irrevocable change may occur if the user does not respond in a timely manner, it may be justified to push an alert window to the forefront. However, most errors and alerts can be handled in the normal window display order.
Short-lived toast-style windows.
Note: AIR does not enforce proper use of the alwaysInFront property. However, if your application disrupts a user’s workflow, it is likely to be consigned to that same user’s trash can.
I have tried:
window.alwaysInFront = true;
window.alwaysInFront = false;
window.activate();
You could also try with a reference to a display object on the window stage:
displayObject.stage.nativeWindow.alwaysInFront=true;
//(where displayObject is your instance name)
And works fine. I'm using Adobe AIR 4

How to force windows 8 touch keyboard to be displayed on the app screen in a winjs application?

Am working on a windows store winjs application and am trying to force display the touch keyboard on the application screen.
I couldn't find any proper solution over the net for the same.
Is there a way to force display it?(would be great if there are some work arounds)
The touch keyboard show & hide behavior is designed to be controlled by the user and should not be changed easily.
Anyway an easy workaround is to set the focus on an input control in the page programmatically. This will make the keyboard appear, but the the control will be back to the user and he will be able to hide it at any time.
Cheack this article for a more complex workaround if you need a bit more control: How do I hide virtual keyboard for select element in Win8 JavaScript app?

Disable everything else on windows phone tablet

TL;DR;
How do I disable everything on windows phone that a user can use to "get out of my app"
Long version
I'm developing a app for a table running windows phone. This tablet will be available to general public so they can choose which kind of service they want (like "open new account", "talk to the manager" and so on). Because of that I would like to disable everything on the tablet (home button, close button...) so a miss guided user wont be able to close my app.
How do I do that? (Of course I intend to provide a "Close app" button that will require a password of some kind...)
There's no way you can do what you want with Windows Phone. There is no ability to, in software, block access to the start or search buttons.
As indicated in other answers, you can override the back button but if you prevented the app from going to the home screen you would be unable to get the application certified (you could still sideload to the device, or distribute through the company store).
You may be better served considering an RT device (with Windows 8.1 in KIOSK mode) or Windows 8 Embedded Handheld (which is based on Windows Phone 8).
It is possible to change the behavior of the back button by doing the following.
Place this in your phone:PhoneApplicationPage tag ie the header of the page.
XAML
BackKeyPress="PhoneApplicationPage_BackKeyPress"
In the code behind.
C#
private void PhoneApplicationPage_BackKeyPress(object sender, CancelEventArgs e)
{
e.Cancel = true;
}
However it is not possible to capture the home key pressed and search key pressed events. You could try messing with the "Application_Deactivated" method in the App.xaml.cs so that when the application is deactivated...it is not? That could get messy and I've never done it before. Just an idea. Good luck.

Setting Flyout to Main Frame Navigation(Windows 8.1 app store)

I have created login screen using settings flyout control in Windows 8.1 store app. I need to navigate to Mainpage.xaml in case user successfully entered the login credentials.
How can handle parent Frame navigation from Settings Flyout.
Thanks in Advance.
You can hide the SettingsFlyout and Navigate to the MainPage using Frame Navigation, after the required validation.
[C#]:
new SettingsFlyout().Hide();
this.Hide();
(Window.Current.Content as Frame).Navigate(typeof(MainPage));
Guidance is not to preform navigation from a SettingsFlyout (see “Inappropriate Use of Settings” section). Generally, a Popup is a better option for a login dialog and a popup would allow you to easily navigate to the main page.

Adding widgets to my launcher screen automatically

I intent to put some widgets on my launcher screen without the need of the users to pick from the widget list. I googled and found that this operation needs binding appWidgetId to AppWidgetInfo, which is only possible with the BIND_APPWIDGET permission. i.e. this operation is only possible in system app (but my launcher is not). Is my finding correct?
But I found that in GO Launcher, all its widgets can be put on the launcher screen automatically after download and installation. GO Launcher and its widgets should not be system apps. Any idea on how GO Launcher can implement the automatic widget adding to home screen?
Try this:
Answered here
The only issue remains that the added widget doesn't respond to clicks then.
Keep a track of answers here for a solution for that:
Widgets don't respond when re-added through code