SB1 - Remote apps.json file

// Expert user has replied.
A Andrea Persico 3 years ago
0 2 0

Hi all,
in the Programmer's Guide on chapter 2 I read:
The apps.js file can be located at a remote location. For example: config.apps.src = ‘http://www.example.com/config/apps.json’;

Once a remote location is set for this file, the system downloads it to a device location, configured in config.apps.file and then fetches the installed applications from this file. See Chapter 4, Configuration for more information.

 
I'm trying to achieve something similar BUT the default configuration for the SB1 is loaded (the one with the demo).
I can't find related info in Chapter 4 about the download location.
Any suggestions?
 
1) the apps.json file is triple checked and correct (really simple with 2 apps, placed in the config folder it works)
2) the remote location is available and the remote file is served by the web server.
 
Thanks in advance.
Best Regards,
Andrea Persico

Please register or login to post a reply

2 Replies

K Khai-Van Phu

Hello Andrea,

I verified if my SB1 can retrieve the apps.json file stored remotely. It does work for me.
I described below the steps I had to go thru in order to verify this.

1 - I copied the following files under the root web directory of my computer running Apache web server

c:\Apache24\htdocs\apps.json
c:\Apache24\htdocs\index.hmtl
c:\Apache24\htdocs\img\coins-icon.png
c:\Apache24\htdocs\src\asl.js

apps.json has the following content:
{
"name": "Ctrl Prix",
"url": "http://ip_add_remote_web_server/index.html",
"icon": "http://ip_add_remote_web_server/img/coins-icon.png"
}

2 - On the SB1 side, I modified /UserDrive/Config/config.js in such variable config.apps.src has value:
config.apps.src = 'http://ip_add_remote_web_server/apps.json

3 - I deleted /UserDrive/Config/apps.json on the SB1.

4 - Then I pressed Home + Scan buttons to cold boot my SB1.

5 - I can see now the result.

The icon of the app is retrieved from the web server and display correctly by the SB1.
When I tap on the icon, app "Ctrl Prix" is retrieved (index.html) remotely and rendered on the SB1's screen.

    
 
Note. Make sure to configure the firewall of you computer so the web server can accept request from external devices.

Let me know if this works for you.

Regards
Khai-Van

I Ivan Fernandes

Hello, Andrea.

Are you using login on your application? (config.login.require = true; on config.js)
I'm using a remote apps.json on my application by passing it on the apps parameter of the asl.auth method.
Something like:

asl.auth(true, {
        // other params: title, name, pin, idleTime, locale...
        apps : 'http://example.com/apps.json' // URL of the apps.json
    });

Also, make sure your URL is using the standard http port 80, because I've had issues when I tried using an URL like http://example.com:8080/apps.json.

CONTACT
Can’t find what you’re looking for?