SBJS Android Compile

Everything else that doesn't fall into one of the other categories.
matty47
Posts: 11
Joined: Mon Mar 24, 2014 9:06 am

SBJS Android Compile

Post by matty47 »

I am having trouble getting apps made with SBJS to work on my Android phone. I tried the shadow example. It works well in browser or SB webview. I tried to create an Android app (with debugger) and added the data directory as the resource directory. App compiled OK and installed on my phine - however when run I just get a debug window with no content and a background. I don't get the "3D stuff". Probably something I am not doing properly but I don't know what. Any help greatly appreciated.
Fred
Site Admin
Posts: 1860
Joined: Mon Feb 24, 2014 10:51 am

Re: SBJS Android Compile

Post by Fred »

The best to debug android app is to use the 'Inspect' function of Chrome browser. You will be able to connect remotely to your app (if you are connected with USB)
matty47
Posts: 11
Joined: Mon Mar 24, 2014 9:06 am

Re: SBJS Android Compile

Post by matty47 »

Eventually I was able to setup and connect Chrome to my mobile phone to debug the app. There were a couple of errors. Two were
"Failed to load resource:net:ERR_CONNECTION_REFUSED" with the first being localhost sbbjs/babylon.custom.js:1 and the second localhost favicon.png:1. The third error was an "Error Script Error relating to dojo.js but looking at it was probably to do with not being able to access the other two.
Interestingly if I create an android app without debugging (either standard SB example or a Babylon example) the phone says I am unable to install the apk and gives no other option - so I must be missing something there. If I include the debugging the phone allows an install and SB example works but the Babylon examples still don't work.
I reverted back to SB3.02 as I thought maybe the Android SDK in SB3.2 may be too high for my phone.
Phone is a Nokia G60 Android version 14. Developing on Win11 64bit.
Fred
Site Admin
Posts: 1860
Joined: Mon Feb 24, 2014 10:51 am

Re: SBJS Android Compile

Post by Fred »

Without debugger, you need to sign your APK to install it
Post Reply