Windows 10 IOT Javascript not working - javascript

I am implementing Twilio JS into a UWP application (their JS here)
The client looks like this:
https://gyazo.com/5c870394c88ec933281e2f3bb17fdeec
At the bottom right is the 'debug window' which shows it got a token, and that Twilio.Device is ready. This works fine on a PC, but on Windows 10 IoT it stops at Got a token. It doesn't show the device is ready. I thought it was a compatibility issue but I checked every box that has to do with this project.
My next though is, that the JavaScript or something isn't implemented on Windows 10 IoT.
It works on the desktop, but on IoT it doesn't get far.
Any help is appreciated.
Update:
I tracked down the error 0x800a139e - JavaScript runtime error: Twilio.Exception: twilio.js 1.3 requires WebRTC/ORTC browser support.
Apparently it doesnt support WebRTC?

Twilio developer evangelist here.
Twilio Client JS is built to support browsers that support WebRTC/ORTC. This means it is currently compatible with Chrome, Firefox and Edge.
The Twilio Client JS has not been built with UWP applications in mind, especially not those running on the IoT build. However, I have just found this blog post about using WebRTC in UWP applications, perhaps that can help by implementing WebRTC/ORTC within your UWP app.

If anyone had the same problem. I put the project on hold for a little, but Windows 10 IoT core (as up until this writing), does not have WebRTC or ORTC support.

Related

IoT/WinJS/VS - Failed to create the web diagnostics object

I have successfully installed Windows 10 Insider Preview and Visual Studio 2015 RC on my PC, and Windows IOT Core on my Pi.
I have created a new JavaScript Windows Universal App solution in Visual Studio, and tried to deploy as-is, i.e. the project as supplied in the template. When trying to run the program on the remote machine, in either debug or release modes, the project deploys and runs successfully, however Visual Studio advises with a modal dialog box during the deployment process:
"Failed to create the web diagnostics object. The JavaScript Console and DOM Explorer may not work. Repairing the remote debugger installation may help".
Firstly, can I expect these tools to work on the Pi for a JavaScript Windows Universal App?
Secondly, I don't know how to repair or even access the remote debugger software. It seems to run automatically (msvsmon.exe, twice). Is here something to configure properly to get it to run?
Regards,
Paul
It indicates that you don't have admin access to remote machine, which is natural assuming that you didn't have activated developer mode in BOTH machines.
otherwise, I could say that this could be a bug(but only if you can see the DOM in explorer) you can't disable DOM explorer in V.S either so if this didn't fix the issue and it's annoying, then you will have to wait for update 1 unfortunately.
The only workaround I found was to install Windows 10 on my Dev computer. It appears like this does indeed not work with Windows 8.

Twilio Client Python not Working in IOS Browser

I have created a simple twilio client application to make phone calls from Web Browser to phones. I used a sample Flask app to generate a secure Capability Token and used twilio.min.js library to handle calls from my HTML.
The functionality works fine in Computer Browsers and Android Phone Browsers, but fails in IOS browsers(checked both in Safari and Chrome). In android the page asks for permission to use mic and headphone but in IOS it doesnot even as for that. Is there anything that I am missing here? It would be really helpful if someone can throw some light into this.
The doc I referred to was : Twilio Hello Monkey Client
Twilio developer evangelist here.
Twilio Client uses WebRTC and falls back to Flash in order to make web browsers into phones. Unfortunately Safari on iOS supports neither WebRTC nor Flash so Twilio Client cannot work within any browser on iOS.
It is possible to build an iOS application to use Twilio Client just not a web application.

Remote Debugging On Android Browser

Sorry for the question.
I'm current creating Phaser games for mobile using web browsers.
I can remote debugging on my android device using Google Chrome Browser of my android device also similar to Mozilla Firefox Browser and check if any error in javascript/html/css using the desktop developer tools of the browser.
Here is what i follow to use remote debugging for chrome
https://developer.chrome.com/devtools/docs/remote-debugging
Here for Mozilla Firefox
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android
Already installed Android SDK
I'm currently developing on windows platform.
Using XAMPP
But i want to test now my app on the native browser of android phones gives me hard time to do it. and don't have any idea on how to do it.
If anyone has done it before.. Kindly please share knowledge on how you to do it and make it easy and comfortable for yourself to remote debugging native android browser.
thanks in advance
Ok, this will only work if you have a local version of the website deployed... and your phone must be connected to the same network.
For reference, I used this website: http://www.broken-links.com/2013/06/28/remote-debugging-with-weinre/
First, you'll need to install NodeJS as weinre is a NodeJS app.
After you install Node, you can use NPM to install weinre.
npm install -g weinre
Then you start weinre server on your local machine
weinre --boundHost -all-
Then paste the following code in your webpage that you want to debug. Change your_private_ip to the private IP of your local server. It probably starts with 192.168.x.x.
<script src="http://your_private_ip:8080/target/target-script-min.js#anonymous"></script>
Now on your desktop, go to http://localhost:8080/client/#anonymous to see a WebKit-style web inspector.
You should see something like this:
Now you can use the other tabs like the Console to view the javascript console, or the elements to look at their styling, etc... just like on chrome or firefox.
I don't know if you still need help, but for those who are having this trouble can try this, it worked for me:
Do the exact same thing like you were to debug from google chrome, in the "chrome://inspect/#devices" tab look for this: WebView in com.android.browser (Version/4.0 Chrome/30.0.0.0) (in my case, i'm using a huawei p7)see image
Sorry for my english

Websocket server and Mobile clients

I have a Tomcat based server which serves as a Websocket end point (used javax.websocket) for my web based JS app. I am serving out json based data (queried from my database) via the web sockets. I am not using websockets to serve out HTML/JS pages.
Now we are building a native mobile app of our JS web app. There doesnt seem to be good native support for Websockets on Android and ios.
I would like to keep the server code base common to both JS client and the mobile client.
What would be your suggestion for such a situation? Write a different server for mobile clients?
I found this http://www.elabs.se/blog/66-using-websockets-in-native-ios-and-android-apps. They suggest SocketRocket for ios and https://github.com/TooTallNate/Java-WebSocket for Android.
I have never heard of these people / companies. Not sure of their antecedents and if their apps are bug free.
Any suggestions would be welcome.
I'm not sure if this is the answer you are looking for, but I tried this once, and decided to use a webpage that uses the websocket. Each app will display a webview accessing the page. All recent iOS SDK versions support this, but only the newer (4.4+) Androids will.
If you do not want to use webviews, I recommend Tavendo Autobahn for Android. I had a problem that my server's websocket would disconnect all the time. I had to implement a reconnection routine every couple of seconds on the app.
Hope it helps :)
I'm using this library on android for websockets https://github.com/codebutler/android-websockets
Works good with Spring WebSockets.
Sorry for messy answer, I'm in hurry, write in comments if u have questions

Can one debug javascript on a samsung tablet's native browser

I am currently working on a HTML/JS application that will be embedded in an iOS and an Android app. Because the android app is not yet finished I am testing this on the chrome browser in Android. I fixed all issues there but when I open the same web app in the native browser nothing really works as expected.
So my question is : Is there a way to debug in a native browser on an android device?
In chrome this was pretty easy with remote debugging.
(Please do not advice me to use 'log' statements for debugging because that's not what I am looking for here)
And just to spill my guts : the Samsung Tablet's native browser is the only device that's causing me a headache!
Typing about:debug in the address bar of the native browser will toggle the 'Debug' options in the settings menu.
The 'Show JavaScript Console' option will allow you to see JavaScript errors in your webpage.
NB I believe the JavaScript Console will only be displayed if there is an error.
HTH
Nick.
The new Samsung Internet browser (I think you meant this browser with "Samsung Tablet's native browser") is now based on the Chromium browser and thus supports its remote debugging interface.
Enable USB debugging on your device as described here.
Then connect your device via USB (Oh, surprise!).
Visit chrome://inspect on your computers Google Chrome browser and you will be guided to create the connection:
Then you just have to click on the devices inspect link and an developer tools window will pop up.
More info like why there is an Samsung Internet Browser at all can be found here.
You can easily debug your web application with Web Inspector Remote (weinre).
Look at this post in order to find out how to install and use weinre.
I hope it will help you if this question is still actual.
If you have updated your device you can go to settings -> Debug -> 'Remote Debug Enable'
Once enabled you can debug the native browser just like you can debug chrome.
You can try vorlon solution too, it has a nice web interface & very easy to install
& It's free
But if you can't see clear console errors with volron, you probably want to use #Nick's solution, sometimes complex errors prevents even vorlon or weiner from catching them. So once you fix blocking these issues, probably volron will start catching them properly

Categories

Resources