I am testing this simple piece of code coupled to an equally simple node.js server script:
<script>
var connection = new WebSocket('ws://materiali.c-s-m.it:9090');
connection.onmessage = function (message) {
alert(message.data);
console.log("Got message", message.data);
};
</script>
to the objective of inserting it into a phonegap app. When I connect to it by a standard browser it works with Chrome on Windows and on the Windows phone and Android (it shows the pop-up and the access is registered on the server log), but not on the iPhone both with Safari, Chrome and the PhoneGap app.
I have divergent information about WebRTC support on the browsers. Some founts report its support by WebKit integrally, others not at all.
What is the real situation, how may have it working on the iPhone and more importantly on the PhoneGap app for all the platforms?
By installing Crosswalk by Cordova the service now works both on WindowsPhone and Android by means of the PhoneGap developer app. Unfortunately it does not work on iOS.
Related
I'm trying to use the new navigator.bluetooth Web Bluetooth APIs to connect to an older Bluetooth device, however using the requestDevice({acceptAllDevices: true}) method seems to not working.
According to the docs, it should show all of the bluetooth devices without any filters, but the Chrome beta on Android is not picking up any devices whatsoever, as seen in the picture.
I'm using the Web Bluetooth Terminal with the modified mentioned method above, and getting zero luck in listing any devices.
My device is not BLE, and I'm trying to use the SerialPort "SPP" profile similar to this question, which I believe has the UUID of 0x1101 or 00001101-0000-1000-8000-00805f9b34fb.
How do I list the nearby or paired Bluetooth devices on Chrome mobile for Android?(Additional Info: Chrome 56 on Android 6.0, the Bluetooth device is a HC-05 module - tested and confirmed working correctly with a dozen of Android Bluetooth terminal apps.)
Web Bluetooth supports only Bluetooth Low Energy devices for now. You won't be able to connect to Bluetooth Classic devices with this Web API.
I have a cordova/phonegap app that is supposed to connect itself to a websocket server. It works fine on ios & android 4.4 but not on my Samsung Galaxy Tab 2 running android 4.2.
I know that the webview in 4.2 doesn't have a native implementation of WebSockets but I loaded a phonegap plugin for this. The plugin loads successfully and I waited for the deviceready event before attempting a connection. When I try the example provided by the plugin, the onerror event is trigered but I have no additionnal details.
Running the app using Google Chrome on the same device works, so I exclude a network issue. The application has the INTERNET permission. I'm a little out of clues at this point, any ideas are welcome :-)
Ok, after taking a look at the adb log as #Nicholas suggested (thanks!) I had an exec() call to unknown plugin. Somewhat following this answer solved the problem.
My android phone and my IIS are both connected to the same network. I wonder are there any ways that let me wirelessly debug javascript app which is running on android's chrome ?
Have you tried using Weinre? http://people.apache.org/~pmuellr/weinre/docs/latest/
There is also the option to use PhoneGap's working version of it for quickly trying out: http://debug.phonegap.com/
I am developing a Web Application (not Android Native App) for mobile browser. How do you launch the Android Native camera using a web application on the android browser?
I am currently referring to the following camera tutorial. It works on desktop browser but not on Chrome mobile browsers because only Opera Mobile 12.0 supports getUserMedia.
http://webcache.googleusercontent.com/search?q=cache:http://davidwalsh.name/browser-camera
http://caniuse.com/stream
I guess it is possible because if I access Facebook through my android browser (Not Facebook App), I can launch the phone native camera. Any help with the syntax to launch the android phone camera using HTML and Javascript will be great?
You can create an intent:// URL that will trigger the native camera app. But that just launches this native app. There is no back channel that returns the taken picture to your web app.
I'm evaluating SignalR technology for use in our new product (mobile web application for the broad audience, among other things it needs a real-time chat on some pages).
I've followed the guide to create a very basic chat demo.
Then I deployed the demo on my IIS, and started chatting to myself.
All clients were on the same WiFi network.
Desktop browsers worked more or less OK.
However, Safari on iOS 4.2, and IE on WP7.10 - they both sucked.
Sometimes nothing happened when I pressed the "post" button.
Sometimes outgoing messages were sent OK to the desktop firefox, however there was no incoming messages.
Maybe I'm missing something obvious? Maybe I need jquery mobile instead of the normal one? Maybe I should just tune the IIS/web.config/whatever, and the SignalR will flourish and start to work flawlessly even through the crappy mobile internet?
Or does it mean that since it doesn't work even while on WiFi within a single hop from the web server, I should throw SignalR away and just write some JavaScript to poll a JSON endpoint for new messages?
Thanks in advance!
I have been developing an app with phonegap (that means that uses the Safari browser) and SignalR for Android and IPhone. The major issue I had was with iOS 6.x because SignalR did not connect with default config. I have found a workaround for that and I had explained it here. Let me know if you find it useful.
This code will simulate a connect, check for messages, disconnect and wait 5 secs to solve the iOS issue.
In js add
$.connection.hub.start({ transport: 'longPolling' }).done(function (myHubConnection) { });
and in Application_Start() add
GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(1);
Microsoft.AspNet.SignalR.Transports.LongPollingTransport.LongPollDelay = 5000;
RouteTable.Routes.MapHubs();
Not all mobile browsers (e.g. android, opera mini) support websockets. You'll find a nice chart of supporting browsers at http://www.hanselman.com/blog/YourUsersDontCareIfYouUseWebSockets.aspx