How to create a bluetooth connection between Android device and Google Glass? - android

I am interested in using my Android phone (running my application) to do all the heavy computing/data storage for an accompanying app running on Glass. Is there a way to make a connection over wifi or bluetooth to send/receive data between the two?

For Bluetooth, you can check out this library.
I tested it before and I'm able to connect between my phone and Glass.
Also, Google Glass GDK: How to Communicate with Android Device is helpful.
I haven't tried connecting over WiFi.

Related

Connecting an Android Device with a BLE Peripheral without using an App

I am new to Android programming and was wondering if it was possible to connect an Android device with a BLE Peripheral, without needing an App.
I am experimenting with the Node.js package "bleno" for the peripheral and connecting using an app and even a webapp are working just fine, but connecting using the standard android settings functions dont work. The device does find my peripheral after scanning but when I try to connect with it it always returns that I need an app.
Is this a problem of bleno or does this not work that way in generell?
If the peripheral has for example a HID GATT service exposed, then you can pair and connect to it through the system settings. This means BLE keyboards and mice can be used without any app.
If your peripheral only has custom services or only services the OS knows nothing about, then you will need some app to connect to it.

HTTPS connection on wi-fi enabled Android Wear without phone tethering

I can't find any documentation on Android Wear that shows how to create an app that leverages the fact that some watches (like my Samsung Galaxy Gear) can now connect directly to the internet via wi-fi when the phone is not around.
I have a few apps that generate https requests to access a REST service and I would like to know if these can be directly called from a Wear app connected to wi-fi (no phone).
Similar questions don't seem to answer this:
Direct internet connection on Android Wear?
https://stackoverflow.com/questions/26062487/android-wi-fi-direct-persistent-connection
Android: Establish "Wi-Fi Direct" connection with networked devices
My tests on a Wear emulator tethered to an internet enabled Phone emulator show:
java.net.UnknownHostException: Unable to resolve host "api.xxx.com": No address associated with hostname
But of course there's no direct wi-fi connection on the watch emulator so my next step is to try on a real watch and phone.
My suspicion is that Android Wear's data API handles this transparently so direct http requests seem impossible.
Best, thanks in advance for your help.
Even if Android 5.1.1 support Wi-Fi Feature. Android Wear on Wi-Fi: Using a smartwatch without a phone nearby
You should stick to the Data Layer API, you cannot send http request directly from watch. Fetch internet data from the phone, then transfer it to watch with Data Layer API.
You can see this Does Android Wear support directly access the Internet?
And this document Always-on and Wi-Fi with the latest Android Wear update
From the last update its possible to make http requests over wifi using android wear. You can even connect a bluetooth headphone to it to use with some streaming app.
While on wifi, if your mobile phone is connected to the internet too (dont need to be the same wifi, can be even 3g) it will act the same way it would when bluetooth connected yo our phone, but with its own internet access.
This dont mean apps will change their behavior, because most of them are coded to make the requests from your phone, but if you have an app that make direct networks requests, it will send them from your watch without advising or needing your phone.
How to do networks requests on android wear
Just use the same network requests libraries you would use on a normal Android mobile application, like volley, retrofit, okhttp. The code is exactally the same, and by the way, any Android Mobile library works with Android Wear too.

Internet connection in android wear watch?

Can you share the ways the android wear watch can connect to internet while it is not pared with mobile device.( Eg: is it possible to connect via wifi, or data connection).
It cannot and there are no Android Wear devices supporting Wi-Fi, at this time (On March 2015).
Update: Some devices (not all) should see Wi-Fi support incoming according to http://googleblog.blogspot.fr/2015/04/android-wear-wear-what-you-want-get.html

Android WiFi Peer-to-peer (P2P): how to mock the second device using a computer?

Suppose you only have one android device, but you would like to experiment with the Wi-Fi P2P API. Is it possible to use a computer to mock the other wifi device running whatever OS and application that is necessary to play the other part in the P2P communication?
I know the android emulator doesn't support wifi.

What is the difference between serial and dun bluetooth service?

I create an android simple bluetooth terminal application for communication with my old java cellphone Sony Ericsson K700.I discover services from android and find this uuid : 1101(serial service) , 1103(DUN) .I test it with AT coomands at reply ok both of them.What is the difference between serial and dun bluetooth service? Can i connect to the internet from android using my old cellphone as modem?
DUN is dial-up networking and may get you online if you know the correct connect string. When I'd tether my old T-Mobile phone, I used something like at+cgdcont=1,"IP","epc.tmobile.com". The serial service is generally for communication to an app on the phone.

Categories

Resources