Codova integration with Evothings Studio

Ask, and ye shall receive.
scottmahr
Posts: 14
Joined: 00:36, 17 Apr 2015

Codova integration with Evothings Studio

Postby scottmahr » 21:14, 22 Jul 2015

First off, I realize there is a very similar topic that was recently posted. I studied it, but I found the initial question very confusing.

I am trying to build a cordova app to replace the evothings client app becuase I need to use a plugin not included in the evothings client. When I put all of the www files into the corova app www folder it works fine. When I modify this line in the config.xml file

Code: Select all

<content src="http://192.168.0.3:4042" />

Everything appears to load, but then I get this error
LOG: [ERR] Uncaught ReferenceError: cordova is not defined [js/libs/easyble.js: 21]

and my bluetooth doesn't work.

For this test, the www folder is completely empty. When I look in the platforms\android\platform_www folder, I see the cordova.js file. It seems like when pointing to evothings studio, it isn't loading the cordova.js file.

I also use the evothings client with an external link that I have hosted on heroku. This works great. I tried putting it in the content src, all the UI loads correctly, but it still doesn't load cordova.js.

What am I missing here?

Thanks,

Scott

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Codova integration with Evothings Studio

Postby micke » 09:32, 23 Jul 2015

Hi Scott,

Here are a couple of things to try out.

Does the app work as expected when built as a stand-alone Cordova app? (That is, referring to index.html in the content tag.)

Is cordova.js included in index.html?

Are the plugins needed added to the Cordova project? Note that for recent versions of Cordova the whilelist plugin is needed.

Does the project run in Evothings Client app? (Perhaps you are using custom plugins, but EasyBLE should run in Evothings Client.)

Here is a tutorial that may be of help:

http://evothings.com/hands-on-guide-to- ... g-cordova/

One thing to note is that index.html and all the files in the the Cordova project www folder work both for building a stand-alone Cordova app (specifying index.html in the content tag in config.xml) and for running the app using Evothings Workbench (by specifying the connect address in the content tag). Just drag the index.html from the www folder into the Workbench and click Run.

Just wanted to clarify this for everyone reading this thread. No need to keep duplicate folders. A Cordova project is compatible with Evothings Workbench, and all the Evothings example apps can be dropped into a newly created Cordova project.

Let me know how it goes, and I can assist further.

Best regards, Mikael

scottmahr
Posts: 14
Joined: 00:36, 17 Apr 2015

Re: Codova integration with Evothings Studio

Postby scottmahr » 07:37, 24 Jul 2015

micke wrote:Does the app work as expected when built as a stand-alone Cordova app? (That is, referring to index.html in the content tag.)

Yes, I point the config file to index.html, put all my code into the www folder into the root cordova app, build it and load the apk, it works great.

micke wrote:Is cordova.js included in index.html?

Yep, first script tag in index.html

Code: Select all

<script src="cordova.js"></script>


micke wrote:Are the plugins needed added to the Cordova project? Note that for recent versions of Cordova the whilelist plugin is needed.

I think so, I added com.evothings.ble, device, and a couple of others. I am using cordova 3.5.1. Are there any others that are strictly required?

micke wrote:Does the project run in Evothings Client app? (Perhaps you are using custom plugins, but EasyBLE should run in Evothings Client.)

Yep, I have been running it from the evothings client app as I have developed it. It works to point the client to the workbench, it also works to point the client to a web server hosting everything.

When I change the config file to point to the workbench, I get the page that says "connected, click the run button in evothings workbench", which seems right. When I click run, everything loads, but I get this error message from the evothings workbench tools page:

Code: Select all

LOG: [ERR] Uncaught ReferenceError: cordova is not defined [js/libs/easyble.js: 21]

It seems to me that the cordova js file isn't being loaded.

In looking into it a little more, I notice that

Code: Select all

document.addEventListener('deviceready'

never seems to fire when running through my cordova app, but it does fire when running through the evothings client app.

Any ideas on what I should try next?

Thnaks,

Scott

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Codova integration with Evothings Studio

Postby Fredrik » 11:43, 24 Jul 2015

Could be that there's some problem initializing cordova itself, or one of the plugins. See what you can find with "adb logcat".

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Codova integration with Evothings Studio

Postby micke » 16:18, 25 Jul 2015

Yes, as Fredrik says, it is great if you can have a look at the output from adb logcat. It might be that there is a JavaScript error that is not shown in the workbench log window, but is reported in logcat.

If problems persist, I suggest creating a small bare-bones Cordova project and try hooking that up to Evothings Workbench.

If that works, try adding the files from an example app, such as TI SensorTag Accelerometer, to the project, and see what happens.

If that works, try adding in your own code (perhaps step-by-step to see when it goes wrong).

Another approach is to comment out code in your existing project, and see if the project runs as expected with most of the code commented out.

The reference to easyble.js: 21 is a bit weird, because there is no reference to "cordova" on that line, at least not in the version on GitHub: https://github.com/evothings/evothings- ... ble.js#L21

This seems to be a tricky bug to track down, let us know how it goes.

Best, Mikael

scottmahr
Posts: 14
Joined: 00:36, 17 Apr 2015

Re: Codova integration with Evothings Studio

Postby scottmahr » 18:38, 27 Jul 2015

The line that is causing the error in easyble.js is

Code: Select all

var base64 = cordova.require('cordova/base64');


I got adb logcat to save to a file. There doesn't seem to be anything that looks bad in there. Is there anything I should be looking for specifically?

I started using the "Cordova Accelerometer" to test with since that seems to be the simplest demo that still uses device features. It works great in the evothings client, but when I load it in my bare bones cordova app the page shows up, but no overlay, and no errors. When I click on the button I get this:

Code: Select all

LOG: [ERR] Uncaught TypeError: Cannot call method 'confirm' of undefined [index.html: 157]

Which comes from the line:

Code: Select all

navigator.notification.confirm(
         'Use vibration when the image hits an edge?',
          function(buttonIndex) {
             shouldVibrate = (1 == buttonIndex) ? true : false
          },
         'Vibration Setting',
         ['Yes','No']
      )


How else do I try to figure this out?

Would it be possible for you load up a github of a very bare bones cordova project that works for you with the Cordova Accelerometer?

Thanks,

Scott

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Codova integration with Evothings Studio

Postby Fredrik » 19:41, 27 Jul 2015

Search the adb logcat output for anything containing "cordova".

scottmahr
Posts: 14
Joined: 00:36, 17 Apr 2015

Re: Codova integration with Evothings Studio

Postby scottmahr » 19:54, 27 Jul 2015

Yep, did that, I didn't notice anything interesting. Here is every line that has cordova in it.

Code: Select all

I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): CordovaActivity.onCreate()
D/CordovaWebView(32670): CordovaWebView is running on device made by: samsung
D/CordovaActivity(32670): CordovaActivity.init()
D/CordovaWebView(32670): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): Resuming the App
D/CordovaActivity(32670): CB-3064: The errorUrl is null
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog(32670): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity(32670): onMessage(spinner,stop)
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaWebView(32670): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView(32670): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity(32670): Paused the application!
D/CordovaWebView(32670): Handle the pause
D/CordovaActivity(32670): CordovaActivity.onDestroy()
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): CordovaActivity.onCreate()
D/CordovaWebView(32670): CordovaWebView is running on device made by: samsung
D/CordovaActivity(32670): CordovaActivity.init()
D/CordovaWebView(32670): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): Resuming the App
D/CordovaActivity(32670): CB-3064: The errorUrl is null
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog(32670): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity(32670): onMessage(spinner,stop)
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebView(32670): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView(32670): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity(32670): Paused the application!
D/CordovaWebView(32670): Handle the pause
D/CordovaActivity(32670): CordovaActivity.onDestroy()
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog( 1508): Changing log level to DEBUG(3)
D/CordovaActivity( 1508): CordovaActivity.init()
D/CordovaWebView( 1508): CordovaWebView is running on device made by: samsung
D/CordovaWebView( 1508): >>> loadUrl(file:///android_asset/www/index.html)
D/CordovaWebView( 1508): >>> loadUrlNow()
D/CordovaActivity( 1508): Resuming the App
D/CordovaWebViewClient( 1508): onPageStarted(file:///android_asset/www/index.html)
D/CordovaActivity( 1508): onMessage(onPageStarted,file:///android_asset/www/index.html)
W/com.unarin.cordova.beacon( 1508): Cannot listen to Bluetooth service: null
D/com.unarin.cordova.beacon( 1508): Bind to IBeacon service
D/com.unarin.cordova.beacon( 1508): [DOM] registerDelegateCallbackId()
D/com.unarin.cordova.beacon( 1508): Registering delegate callback ID: LocationManager84833228
D/CordovaNetworkManager( 1508): Connection Type: wifi
D/CordovaNetworkManager( 1508): Connection Extra Info: "Ruckus1"
D/com.unarin.cordova.beacon( 1508): [DOM] _onDelegateCallback() "OK"
D/CordovaActivity( 1508): onMessage(spinner,stop)
D/CordovaNetworkManager( 1508): Connection Type: wifi
D/CordovaNetworkManager( 1508): Connection Extra Info: "Ruckus1"
D/CordovaActivity( 1508): onMessage(networkconnection,wifi)
D/CordovaWebViewClient( 1508): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity( 1508): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/com.unarin.cordova.beacon( 1508): Connected to IBeacon service
D/CordovaWebViewClient( 1508): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity( 1508): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaBridge( 1508): Ignoring retrieveJsMessages() from previous page load.
D/CordovaWebViewClient( 1508): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity( 1508): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog( 1508): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient( 1508): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 1508): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog( 1508): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/com.unarin.cordova.beacon( 1508): [DOM] registerDelegateCallbackId()
D/com.unarin.cordova.beacon( 1508): Registering delegate callback ID: LocationManager757138367
D/CordovaActivity( 1508): onMessage(spinner,stop)
D/CordovaNetworkManager( 1508): Connection Type: wifi
D/CordovaNetworkManager( 1508): Connection Extra Info: "Ruckus1"
D/CordovaWebViewClient( 1508): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 1508): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/com.unarin.cordova.beacon( 1508): [DOM] _onDelegateCallback() "OK"
W/PluginManager( 1508): THREAD WARNING: exec() call to Accelerometer.start blocked the main thread for 30ms. Plugin should use CordovaInterface.getThreadPool().
W/com.unarin.cordova.beacon( 1508): WARNING did not receive delegate ready callback from DOM after 30 seconds!
D/CordovaLog( 1508): : Line 1 : WARNING did not receive delegate ready callback from DOM after 30 seconds!
D/CordovaWebView( 1508): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView( 1508): The URL at item 0 is: file:///android_asset/www/index.html
D/CordovaWebViewClient( 1508): onPageStarted(file:///android_asset/www/index.html)
D/CordovaActivity( 1508): onMessage(onPageStarted,file:///android_asset/www/index.html)
D/CordovaBridge( 1508): Ignoring retrieveJsMessages() from previous page load.
D/CordovaWebViewClient( 1508): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity( 1508): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/com.unarin.cordova.beacon( 1508): [DOM] registerDelegateCallbackId()
D/com.unarin.cordova.beacon( 1508): Registering delegate callback ID: LocationManager1888966308
D/CordovaActivity( 1508): onMessage(spinner,stop)
D/CordovaNetworkManager( 1508): Connection Type: wifi
D/CordovaNetworkManager( 1508): Connection Extra Info: "Ruckus1"
D/com.unarin.cordova.beacon( 1508): [DOM] _onDelegateCallback() "OK"
D/CordovaWebView( 1508): The current URL is: file:///android_asset/www/index.html
D/CordovaWebView( 1508): The URL at item 0 is: file:///android_asset/www/index.html
D/CordovaActivity( 1508): Paused the application!
D/CordovaWebView( 1508): Handle the pause
D/CordovaActivity( 1508): CordovaActivity.onDestroy()
D/CordovaWebView( 1508): >>> loadUrlNow()
D/com.unarin.cordova.beacon( 1508): Unbind from IBeacon service
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): CordovaActivity.onCreate()
D/CordovaWebView(32670): CordovaWebView is running on device made by: samsung
D/CordovaActivity(32670): CordovaActivity.init()
D/CordovaWebView(32670): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): Resuming the App
D/CordovaActivity(32670): CB-3064: The errorUrl is null
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog(32670): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity(32670): onMessage(spinner,stop)
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaWebView(32670): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView(32670): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity(32670): Paused the application!
D/CordovaWebView(32670): Handle the pause
D/CordovaActivity(32670): CordovaActivity.onDestroy()
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): CordovaActivity.onCreate()
D/CordovaWebView(32670): CordovaWebView is running on device made by: samsung
D/CordovaActivity(32670): CordovaActivity.init()
D/CordovaWebView(32670): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog(32670): Changing log level to DEBUG(3)
I/CordovaLog(32670): Found start page location: http://192.168.0.3:4042
D/CordovaActivity(32670): Resuming the App
D/CordovaActivity(32670): CB-3064: The errorUrl is null
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog(32670): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity(32670): onMessage(spinner,stop)
D/CordovaWebViewClient(32670): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog(32670): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient(32670): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity(32670): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaWebView(32670): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView(32670): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity(32670): Paused the application!
D/CordovaWebView(32670): Handle the pause
D/CordovaActivity(32670): CordovaActivity.onDestroy()
D/CordovaWebView(32670): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): CordovaActivity.onCreate()
D/CordovaWebView( 3037): CordovaWebView is running on device made by: samsung
D/CordovaActivity( 3037): CordovaActivity.init()
D/CordovaWebView( 3037): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): Resuming the App
D/CordovaActivity( 3037): CB-3064: The errorUrl is null
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog( 3037): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity( 3037): onMessage(spinner,stop)
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog( 3037): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaWebView( 3037): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView( 3037): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity( 3037): Paused the application!
D/CordovaWebView( 3037): Handle the pause
D/CordovaActivity( 3037): CordovaActivity.onDestroy()
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): CordovaActivity.onCreate()
D/CordovaWebView( 3037): CordovaWebView is running on device made by: samsung
D/CordovaActivity( 3037): CordovaActivity.init()
D/CordovaWebView( 3037): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): Resuming the App
D/CordovaActivity( 3037): CB-3064: The errorUrl is null
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog( 3037): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity( 3037): onMessage(spinner,stop)
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog( 3037): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaWebView( 3037): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView( 3037): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity( 3037): Paused the application!
D/CordovaWebView( 3037): Handle the pause
D/CordovaActivity( 3037): CordovaActivity.onDestroy()
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): CordovaActivity.onCreate()
D/CordovaWebView( 3037): CordovaWebView is running on device made by: samsung
D/CordovaActivity( 3037): CordovaActivity.init()
D/CordovaWebView( 3037): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): Resuming the App
D/CordovaActivity( 3037): CB-3064: The errorUrl is null
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog( 3037): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity( 3037): onMessage(spinner,stop)
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog( 3037): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)
D/CordovaWebView( 3037): The current URL is: http://192.168.0.3:4042/index.html
D/CordovaWebView( 3037): The URL at item 0 is: http://192.168.0.3:4042/index.html
D/CordovaActivity( 3037): Paused the application!
D/CordovaWebView( 3037): Handle the pause
D/CordovaActivity( 3037): CordovaActivity.onDestroy()
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): CordovaActivity.onCreate()
D/CordovaWebView( 3037): CordovaWebView is running on device made by: samsung
D/CordovaActivity( 3037): CordovaActivity.init()
D/CordovaWebView( 3037): >>> loadUrl(http://192.168.0.3:4042)
D/CordovaWebView( 3037): >>> loadUrlNow()
I/CordovaLog( 3037): Changing log level to DEBUG(3)
I/CordovaLog( 3037): Found start page location: http://192.168.0.3:4042
D/CordovaActivity( 3037): Resuming the App
D/CordovaActivity( 3037): CB-3064: The errorUrl is null
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/)
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/)
D/CordovaLog( 3037): http://192.168.0.3:4042/: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaActivity( 3037): onMessage(spinner,stop)
D/CordovaWebViewClient( 3037): onPageStarted(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageStarted,http://192.168.0.3:4042/index.html)
D/CordovaLog( 3037): http://192.168.0.3:4042/index.html: Line 0 : ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
D/CordovaWebViewClient( 3037): onPageFinished(http://192.168.0.3:4042/index.html)
D/CordovaActivity( 3037): onMessage(onPageFinished,http://192.168.0.3:4042/index.html)

scottmahr
Posts: 14
Joined: 00:36, 17 Apr 2015

Re: Codova integration with Evothings Studio

Postby scottmahr » 22:18, 27 Jul 2015

I just did the whole process on another computer that was totally fresh, same issue.

When I point the app to another source for the index.html file how does it know where to go to include the cordova.js file?

When I connect to the workbench from the client, I can execute "cordova" and it says

Code: Select all

RES: [object Object]


When I do the same things from my own cordova project connected to the workbench I get

Code: Select all

RES: [ERR] ReferenceError: cordova is not defined


Can someone give me a little better idea of how the cordova.js file is handled in all of this?

Do I need to have the socket plugins for this to work?

Thanks,

Scott

scottmahr
Posts: 14
Joined: 00:36, 17 Apr 2015

Re: Codova integration with Evothings Studio

Postby scottmahr » 18:35, 05 Aug 2015

Just curious, has anyone else gotten a custom cordova app to talk with the evothings studio and auto update?

Thanks,

Scott


Return to “Questions and answers”

Who is online

Users browsing this forum: Google [Bot] and 7 guests