Skip to content

Using in Cordova and Custom URL Plugin #11

Description

@npateman

Hi there,

I've created a new Hybrid application in Visual Studio 2013 and copied the demo project over so that I can see the demo just fine in the emulator. I would like to add another cordova plugin so that I can launch the application from a browser link, the plugin I have used is this one,

http://plugreg.com/plugin/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin

And I've added the following code to the bottom of app.js,

function handleOpenURL(url) {
    setTimeout(function () {
        alert("received url: " + url);
    }, 0);
}

I've also added the following scripts to the head tag of index.html (just under styles.css),

<script src="cordova.js"></script>
<script src="scripts/platformOverrides.js"></script>
<script src="scripts/index.js"></script>

So the actual problem is this

1: If the app is not running and I launch it from an URL it doesn't initialise correctly and I get a blank screen.
2. If the app is already running in the state as in step 1. and I launch it from an URL it works correctly and I get my alert, plus the page renders

I'm not sure what's causing this but it's the second template engine I've tried that's done this.

If anyone here has VS 2013 and the latest Hybrid App CTP, I also have a sample project. Any ideas how to diagnose / fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions