Captive AIR application causes default web browser to launch when AIR app launched from OS icon - windows

I have used NSIS to create an installer for an AIR application everything installs properly. As part of the installation I create a custom protocol like "MyVeryOwnApp://" so that if the user clicks an icon on a specific website it will launch the application.
The installer also creates a start menu and desktop icon. When installing on a "clean" machine, Windows 10, no other apps installed, everything works as it should.
On other Windows 10 computers including all of the development machines, when the application is launched the default web browser is also launched. This also occurs when launching the application from the Flash Builder 4.6 IDE.
I need to find out the cause so that I can either keep it from happening when I deploy the application, or at a minimum be able to explain to users what the issues are.

I have resolved the problem.
The cause was there was mxml code left over to set the browser focus into the main module. It looked like;
<utils:JavaScript>
<![CDATA[
function setBrowserFocus()
{
Main.focus();
}
]]>
</utils:JavaScript>
This evidently caused AIR to instantiate a new instance of the default browser.
I removed the code as it is no longer needed.

Related

How to wrap web app to windows 10 desktop app?

I have a web application (accessed by clients using standard browser) which is available on custom individual url for each client and I would like to "generate" a "custom desktop application" (probably zip file with some exe file and some xml config file - where exe runs webview with url from xml) which can be installed on clients computer (Windows 10 support only is ok). This application when launched will open frameless window (no menu, no url bar etc) of a custom size with webview opening the defined https url (url will contain secret login hash for user / or session must be kept even after computer restart etc ..). This app should run only online (no offline mode needed).
The goal is to take one simple specific proces (entering simple data) from a complex web application and make this simple process easilly accessible for users (just click icon and enter data, submit to server, close, no login ever needed).
I have no experience developing for Windows 10, but I expect there must be some easy "universal app" solution as probably more developers are solving the same problem. What are the most (time) effective, but standard and safe possibilities?
I found a nice tutorial: https://www.todesktop.com/guides/nativefier. This tool is based on Node.js, which works fine on macOS, Windows, or Linux.
First, install Node.js on your computer. Then, run
npm i nativefier -g
to install nativefier. You can wrap your web app into native app simply by running
nativefier "your-url" --name "Application Name"
You can read the post for further information, like code signing your application, generating native installers, etc.

Notifications not working on Windows 10 - Electron JS

I was learning Electron and made a basic electron app and packaged it for windows. The app was not showing notifications so I followed the instructions here
On Windows 10, a shortcut to your app with an Application User Model ID must be installed to the Start Menu. This can be overkill during development, so adding node_modules\electron\dist\electron.exe to your Start Menu also does the trick. Navigate to the file in Explorer, right-click and 'Pin to Start Menu'. You will then need to add the line app.setAppUserModelId(process.execPath) to your main process to see notifications.
I did as suggested here and the notifications started working. They were still working after packaging the app. So I wanted to check whether after a user uses an installer to install this app, the notifications would still work.
I don't have any experience with packaging software, and I used InstallForge to make an installer. Turns out, after installing the app using the installer, the app still works but notifications don't, even after pinning the exe to start.
I tried copying the build folder (direct build, not the installer one) to another location and trying the same thing and it still works. This also works if I copy the installation folder to another location. But it does not work from inside Program Files(x86)\myapp\appname\build\myapp.exe so I am assuming this must be something about permissions, but I do not understand exactly what is happening. I have't checked the app yet on Linux so I don't know if I would face similar problems there as well.
Any pointers would be great, Thank you.

Using an enterprise app for Single App Mode with Profile Manager in Mavericks Server (MDM)

I have a bunch of iPads that are all supervised, and that are enrolled into a MDM server (Mavericks Server). I've added the app to the specific device group, but when I go to the profile settings and Single App Mode the only apps I can select are the builtin ones.
Is there no way to use a third party (enterprise) app as the app for Single App Mode?
EDIT: If you use Apple Configurator and add the app there you can set Single App Mode to use that app, I would imagine that would be possible when doing the same in Apple's Profile Manager, but it doesn't seem to be working here.
EDIT2: Looking at Apple's documentation it does indeed seem to be possible to select a third party app for single app mode using their Profile Manager, so why isn't the app showing in the list for me?
http://images.apple.com/education/docs/assessment_with_ipad_mar2013_v2.pdf
Go to the Device Group, after installing the app (that you want to show in Single App Mode dropdown and lock it to) do "Update Info" (small icon in bottom-middle-left of screen) on all the devices in that group. Wait a bit, then go to Single App Mode screen again, the app should start appearing.Works for me. The "Update Info" thing also works for Single Device as well and you can lock to any new app installed from Profile Manger, doesn't matter if the app was installed while supervising through Configurator or not.
So interestingly enough in the new update for Server (3.1.1) this seems to be working. The Enterprise app is now listed in the dropdown box.
However there also is about 10 empty items in the box with no text description. So it's clearly still a bit buggy.

Building an Application like Chrome App Launcher

How would one go about building an Application like the Google Chrome App launcher like the one they released for windows, it seems like a simple application that just appears over its taskbar icon, however I wanted to know more about what could be used to make such an app.
Chrome and its app launcher are all open source, so you can have a look. However there is probably a lot of Chromium knowledge required to be able to navigate the code.
Some details:
the launcher is native c++
it runs in the same process as the Chrome browser
there is no practical way to get the location of the taskbar button, so it is faked using the cursor.
Some trivia:
the app launcher is called the app list internally
the launcher was originally implemented on ChromeOS, and was first ported to work on Windows. That was simple. It was later ported to Mac OS X (just released!) which was more complicated

WP7 app won't launch from app list

I have a simple Windows Phone 7 application which is working perfectly when started from Visual Studio. However, if I deactivate the app (press Windows button or back button from the application's MainPage) and then click the app's icon to relaunch, the screen will flash and return to the list/home screen. I assumed this was an issue with the emulator but when I got a developer device I have the same issue.
Note that reactivating without a complete tombstone works (pressing Windows button from the app and then back).
I have no idea what causes this or how to proceed with debugging. Hopefully someone else has experienced this and knows a fix.
Turns out there is a bug, i found the solution here http://forums.create.msdn.com/forums/p/67522/416995.aspx
In short, it turns out that the Microsoft.Xna.Framework.Media.MediaLibrary class (which I am using to display pictures on applications main page) is not properly initialized when the user has not opened a media hub prior to you calling it. So picture collection properties are null or empty. The solution is to add a call to MediaPlayer.Queue.ToString(), it will force the initialization of the native media library allowing you to invoke the MediaLibrary later on.
Sounds like an unhandled error on startup is causing the app to crash.
Trap/log/handle/display any unhandled exceptions. Also check what you're doing on startup.
IF you are saving something (to Isolated Storage) after first run and then opening it on subsequent launches then that's where I'd look first.
If it works when launched from Visual Studio then this will probably be due to the way you are rebuilding/redeploying the app before launching it in that case.

Resources