Rahul
Rahul

Reputation: 1627

Install firefox os apps available on Marketplace using App Manager

I am trying to install App using App Manager in Firefox OS device. But my problem is I am unable to push any of the apps which are published on MarketPlace. It show that

The webapp manifest isn't a valid JSON file: SyntaxError: JSON.parse:
unexpected character at line 1 column 1 of the JSON data at: 
https://marketplace.firefox.com/app/pacman-canvas can't be opened

So can anyone suggest some way to push the app to my device using App Manager only?

Upvotes: 2

Views: 21010

Answers (2)

Jan Jongboom
Jan Jongboom

Reputation: 27323

It's pretty easy. On the Marketplace page (in Firefox desktop) open the marketplace page for the app. Then open Devtools and select the Debugger. In the debugger, break in file iframe-installer.html, on this line:

installPackage(e);

Now click the 'Free' button, the debugger will break on this line. In the console you now type:

e.data.data.product.manifest_url

This will give you a URL. If the URL is located at someone else's webserver (like Pacman), e.g. http://pacman.platzh1rsch.ch/pacman-canvas.webapp, you can (in the App Manager) click 'Add hosted app' and paste the URL. However you will need internet on the phone the first time you use the app (because its hosted app).

If the URL is a Mozilla URL (https://marketplace.firefox.com/app/etc.), you can open the link in your browser. Open the file. You now have a JSON file in which you need to look for the package_path key. F.e. for Recorder it's

"package_path": "https://marketplace.firefox.com/downloads/file/258677/recorder-1.1.zip"

You can now download this ZIP file, unzip it in a folder, and add the folder as a Packaged app.

Upvotes: 2

Jason Weathersby
Jason Weathersby

Reputation: 1081

For apps in the marketplace, you best solution for getting them on the phone is to just use the marketplace app. That said if you own the app in the marketplace you should be able to look at the manifest url of the app using the edit listing marketplace button. If this is a hosted app you can you use this manifest url in the add hosted app entry box within the app manager to add it and then push it to phone. On another note you can debug the system apps by using the procedure described here: https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Debugging_Certified_Apps

Upvotes: 0

Related Questions