Collin Willson Collin Willson - 1 month ago 13
Javascript Question

Take users to a link on uninstall chrome packaged app

I am developing a chrome packaged app and am trying to set the url for uninstalling the app. I have so far, I have this line on my Background Javascript (or main) for the app:

chrome.runtime.setUninstallURL(goo.gl/forms/qo8OF2w9pLLyHloa2)


But when uninstalled this does nothing? Any help would be loved! Here is my script and it's entirety as well.

chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('popup.html', {
'outerBounds': {
'width': 640,
'height': 692
},
"resizable": false,
"frame": {
color: "#ffffff"
},
});
});
chrome.runtime.onUpdateAvailable.addListener(function(details) {
console.log("updating to version " + details.version);
chrome.runtime.reload();
});

chrome.runtime.requestUpdateCheck(function(status) {
if (status == "update_available") {
chrome.runtime.reload();
} else if (status == "no_update") {
console.log("no update found");
}
});

chrome.runtime.setUninstallURL(goo.gl/forms/qo8OF2w9pLLyHloa2)


Here is my manifest too

{
"name": "Meme Music Board",
"short_name": "Meme Music Board",
"description": "All of your meme songs in one song board. 100+ Songs! You deserve it ;)",
"version":"2.6.4",
"manifest_version": 2,
"author": "Banana Man Development",
"offline_enabled": true,
"app": {
"background": {
"scripts": ["background.js"]
}
},
"icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }
}

Answer

In the documentation it states that

This URL must have an http: or https: scheme.

Try adding http:// to the front of your url and you should be good to go.

Also make sure to put the url in single quotes, that's what the method requires.