Is there any way to scan ibeacons or other bluetooth 4.0 devices with javascript on ios devices?
I can get data on Chrome Desktop edition with chrome.bluetooth but i couldnt find a way to scan ble devices on browser.
I dont want to use phonegap or other frameworks. Also is there a list that ios safari supported hardware outputs? I can get accelerometer, gyro and compass but i couldnt get other datas.
Thanks
Related
We have recently released our mobile friendly version of our #Angular (javascript) app. We used google chrome dev-tools to develop and test our UI, we also used different devices to end-to-end test. We had some difficulty to reproduce some of the device specific issues in Chrome dev-tools.
So, now we are looking for a mobile browser Emulator, any recommendation of any product out there that could helps us? If we can debug in the emulator that would be awesome.
The devices that we are supporting is Apple and Google devices (mobile and tablets). Our developers are using Windows for development.
A colleague of mine refereed me to use browserstack
Genymotion, for android emulator https://www.genymotion.com/fun-zone/
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 worked successfully with Web MIDI API and Chrome 52 on my Mac laptop - for example recognizing connected MIDI instruments. But Web MIDI API does not seem to work or recognize connected instruments when I use Chrome 52 in my Samsung Galaxy S5 running Android 5.0.1. I've tried, for example, Web MIDI API tests online like this one, unsuccessfully (all of which work fine on the laptop).
Native apps do recognize my MIDI devices just find in my Galaxy phone - they are connected via a working USB OTG cable. But Chrome (or Opera) are not. Any help will be appreciated. I've tried Chrome Dev and Chrome Beta, same result. I wonder if the problem is the phone, or perhaps the Android version?
UPDATE: I have also tried with an Android tablet of different brand and Android 6.0 (Marshmallow). The result is the same: navigator.requestMIDIAccess() is successful (it invokes the success callback with the midiAccess object as expected), but midiAccess has no inputs or outputs, even though a device is connected. The same tablet recognizes the device when using a native app.
UPDATE 2: Success! The problem was the electronic piano I was using to test. For some reason my laptop Chrome did find my Yamaha piano, but Android Chrome did not (they are the same version of chrome). I moved to another keyboard (a newer Roland piano) and now both Android Chrome and MacOS Chrome now detect it.
You must testing your devices for knowing is reading for USB Host. You can use application like that for testing : app test USB Host
If your device don't USB Host ready you can activate that with root mode.
The problem was the electronic piano I was using to test. For some reason my laptop Chrome did find my Yamaha piano, but Android Chrome did not (they are the same version of chrome). I used a different, newer keyboard (a newer Roland piano) and now both Android Chrome and MacOS Chrome now detect it.
new iOS 6 feature is, that you can debug html and javascript running on device or simulator in desktop safari. I suppose, that this feature is based on Webkit Remote Debugging Protocol.
How can I connect to webkit running on iPhone without desktop Safari?
I can do this for mobile Chrome running on Android using websockets, but how can I do that for iOS devices?
The ios-webkit-debug-proxy project (from Google!) does this.
You want to look at this code https://github.com/leftlogic/remote-debug/tree/master/safari - although it fails when it actually comes to RPC calls that use __rpc_forwardSocketData.
If you've got any ideas why several of us are interested!
You need to open up the iPhone Simulator and browse to a website.
Then open Safari and choose "Develop" from the menubar. There is a the option called "iPhone Simulator".
If you hover over this you can see all of the open websites of the simulator.
This gives you the same inspector Safari uses. You can even see hovered elements in the iPhone Simulator.
How do you debug javascript in Xcode?
One thing that I can do is open the page in OS X Chrome browser, but naturally this will not work for application flow involving native code. Is there a smart Xcode trick that I am missing.
With the release of iOS 6, Apple released remote Web Inspector for their Mobile Safari in conjunction with Mac Safari 6, and this is huge. Basically you have all the features and power of Web Inspector in regular Safari, for your mobile apps, including Phonegap apps. I've used weinre and this makes it obsolete for newer versions of iOS (but not for old versions of iOS, non-iOS devices such as android, or if you're on Windows).
Here's how it works (requires a Mac, either xCode 4.5+ running an iOS 6+ simulator or an iOS 6+ device, and Safari 6+ on your Mac):
in your ios simulator or ios device,open settings --> Safari --> Advanced --> Web Inspector --> (turn On) . (this is on by default in the simulator, but its worth checking)
In Safari, after you've started your phoneGap/cordova app and its loaded & running, access iPhone Simulator or your device from the Develop menu. You can enable Develop menu in Safari's Advanced Preferences, if its not already.
More discussion at the bottom of:
http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers
(also, if you read about a "secret private interface" somewhere, this doesn't work anymore.)
Try using weinre it is a really good tool to debug javascript applications on mobile devices.
http://people.apache.org/~pmuellr/weinre/docs/latest/
Although you will still not be able to debug the script step-by-step as it gives on desktop but gives lot more detail than xcode (~ for javascript).