Simple/Best way to load Web App as Windows Desktop Application? - windows

Hello basically I have a web app built using html5/php, etc. Its a music player, similar to spotify and pandora. I want to distribute the web app for as a desktop application so people can run it straight from their desktop without opening a browser. I would not like a browser like system, just have the web view loaded (similar to just loading a webview in iOS) (no tabs no url bar, etc)
I heard of Prism but that is discontinued and I can't find a download link anywhere.
Is there anything you suggest?
For Mac Os X, i found FluidApp, which seems to work great as it builds a stand alone app.
For iOS I can simply load the web app via a webview and it works great, just what i needed.
For android i basically load a webview as well.
Windows just got me stump into loading the webapp via a standalone desktop app.
So if anyone could help me out, it will be greatly appreciated!

I myself was looking for an all around solution for awhile. I tried everything from TideSDK, AppJS, Appcelerator Titanium, native code in VB.NET, XCode, Python, C++, Electron, node-webkit, etc: Basically you name it I've tried it.
Note Electron is nice, but it only runs on 64bit processors. So node-webkit is good if you want to run your app on 32bit processors.
So I decided to build my own open source solution called WebDGap.
Currently WebDGap runs on Windows, Linux, Mac OS X, Google Chrome and as a web application!
Watch the How To Video to learn, well how to use the app obviously.
Here's a screenshot.
Mac user's can merge your exported app into 1 .app mac file. This can be done with Automator (and a little shell scripting).
There's also a coding playground I made for mobile users that has this feature built in called kodeWeave.
Here's a Tic-Tac-Toe game I'm going to export as a Mac App:
Now the web app is running as a native Mac application!

A simple VB.NET application should do the trick. Just create a new Windows Froms project, double click on the form, mark everything an paste this:
Public Class Form1
'############## Settings ##############'
'Change to your URL
Dim url As String = "http://google.de"
'Change to the text the window title should have
Dim title As String = "Your Title here"
'Change to the windows size you wish to use
Dim window_size As Size = New Size(800, 600)
' ^X^, ^Y^
'########### End of Settings ##########'
Dim WithEvents WebBrowser1 As New WebBrowser
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Text = title
Me.Size = window_size
Me.Controls.Add(WebBrowser1)
WebBrowser1.Dock = DockStyle.Fill
WebBrowser1.Navigate(url)
End Sub
Private Sub WebBrowser1_Navigated(sender As Object, e As WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
Dim elements As HtmlElementCollection
elements = WebBrowser1.Document.GetElementsByTagName("img")
For Each element As HtmlElement In elements
element.SetAttribute("border", "0")
Next
End Sub
End Class
Edit the settings and press F5 to run. Voila, you should see you WebApp in a Desktop Application.

Google chrome has a 'save shortcut' in the options menu. Menu>tools>create shortcut... I think. (Posting from mobile)
When you open the shortcut, it will open it in it's own window. like an standalone app. Hope this helps.
Edit: prism was from mozilla. I'm sure there is a similar function in firefox.

Related

Deep linking and shortcuts in Genexus (android)

I have a question about deep linking in genexus.
I have a site that calls a url. This url should be handled by an app installed on your phone. The procedure works correctly using the deep link.
The problem arises if the starting site is opened from a shortcut placed on the desktop. In this case the deep link of the app no ​​longer works.
I think the problem is related to this
Deep link in android app
and that the shortcut counts as an android app thus preventing me from calling another app.
But in the past this link worked as long as the app was told beforehand to always handle the link.
Is there anything I can do in Genexus to use the deep link even starting from a desktop shortcut?
The DeepLink external object helps you manually manage deep linking on your applications. This external object must be used only in the Smart Devices Main object.
Suppose that our website handles URIs such https://www.mystore.com/viewproduct?1
Event DeepLink.Handle( &URL, &IsHandled )
Composite
if &URL.ToLower().StartsWith("https://www.mystore.com/")
and &URL.Contains("viewproduct")
&Index = &URL.indexof( "?" )+1
&Query = &URL.Substring( &Index)
&ProductId = &Query.Trim().ToNumeric()
&IsHandled = True
SDViewProduct(&ProductId)
endIf
EndComposite
EndEvent
For more details: DeepLink external object

Mac OS X: interacting with an application programmatically

I am working on a project where I need to call methods on an existing application (my own) and use some of its functionality. For e.g. my application ThunderBolt runs on Mac OS X 10.10. It also provides a dictionary of events that can be called externally through Apple Script or some other way that I don't know yet.
My question is what are the different (and better) ways of interacting with an application programmatically on Mac OSX? If I use something like the following code in Apple Script Editor:
tell application "ThunderBolt"
set open_file to (choose file with prompt "Choose the file you wish to parse")
set theContents to read open_file as data
set retPict to (image convert theContents)
end tell
then it is going to launch ThunderBolt with a splash screen and then call "image convert". This can be done via NSAppleScript but still it would launch the application and call methods/events on it.
Is it possible to somehow create an instance of (or get a pointer to) one of the class inside the application and use that? Something similar to COM or automation on a Windows system?
If you're working on OS X 10.10, you might consider taking a look at JavaScript for Automation (JXA).
With it you can apparently build methods into your app that can be invoked from client scripts written in JS (although I'm not yet familiar with the particulars of how to handle implementation of such a thing on the app side). But many of the apps that ship as part of OS X Yosemite have such APIs built in (e.g. iTunes and Finder).
Here's a great tutorial on JXA written by Alex Guyot: http://www.macstories.net/tutorials/getting-started-with-javascript-for-automation-on-yosemite/
The JXA-Cookbook repo also appears to be a nice resource: https://github.com/dtinth/JXA-Cookbook/wiki
Here's a brief example - this script makes iTunes go back one track. Try it while iTunes is playing (by putting the text into Script Editor, with the language option set to JavaScript, and hitting the Run button):
iTunes = Application('iTunes')
state = iTunes.playerState()
// Console msgs show up in the Messages tab of the bottom view:
console.log("playerState: " + state)
iTunes.backTrack()
Alternatively, you can place the code into a .js file and run it on the command line:
$ osascript itunes-backTrack.js
playerState: playing
The way you specify the 'tell application' is the best way, in my opinion.
What do you do with your app that needs to be called? Maybe some of the functionalities can be done with Applescript? It would simplify things a lot.

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

How do I open a Windows Store Applicaton in Windows 8

So I am used to programming windows forms applications. In desktop application I can open them by doing:
Dim p As New System.Diagnostics.Process
p.StartInfo.FileName = "notebook.exe"
p.Start()
If I want to open something like the weather app for Windows Store then this method does not work. Can someone direct me to resources on how I would accomplish this?
I'm not getting the point, you want to open metro application from other metro application? or from desktop application a metro application or a desktop application from metro application?
Take a look at IApplicationActivationManager::ActivateInstance. http://msdn.microsoft.com/en-us/library/windows/desktop/hh706902.aspx
if your goal is to support automatic testing then check this blog entry http://blogs.msdn.com/b/windowsappdev/archive/2012/09/04/automating-the-testing-of-windows-8-apps.aspx
Check if this answers your question # http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/79092f3f-917d-41e5-a67f-c25e851bbb14/how-to-start-and-end-metro-applications-from-c-code

Windows Phone - Call default web browser

I am trying to develop Windows Phone App, I would like to know that how can I call the default web browser with a specific URL(e.g. http://www.google.com) when I launch the program?
Thanks
When you're launching "the program" as you say (Internet Explorer) you use the following code:
WebBrowserTask browser = new WebBrowserTask();
browser.URL = new Uri("http://www.google.com", UriKind.Absolute);
browser.Show();
The WebBrowser task is inside the Microsoft.Phone.Tasks namespace, the documentaion of which is here: Microsoft.Phone.Tasks.WebBrowserTask
You should also know that the "default" browser is always Internet Explorer, because right now there is no way for users to define an alternative browser as their "default".
Edit:
After reading your question more closely, I can tell there is a little bit of ambiguity. If you want to launch the browser immediately when your app launches, you should know the following:
This kind of application will fail Microsoft's marketplace validation (check the Application Certification Requirements for Windows Phone
Even if it didn't fail the certification, it would be a kind of strange application... not one that is of very much use to your users.
If, however you intend to launch the phone's browser when the user clicks a button, then the above code I posted will work just like you want it to, just make sure to include this line at the top of the code file that it's in:
using Microsoft.Phone.Tasks;
Hope that helps!

Resources