Can we pair two smart watches without a phone? - android

As far as I know, wear smartwatches are designed to be companion devices that stay connected to your smartphone. Without a phone around, though, they aren't entirely useless.They'll still function as watches, for one, giving you the time and the date.
But I am not sure if there are any changes to this in any of the latest updates. So I want to know if it is possible to pair two smart watches and send messages using messageapi without the help of a smartphone.Just curious to know ?
Ideally, I want two watches to interact using messageapi to send messages. Is it possible to do without a smartphone?

Well, if talking about pairing two watches with each other, you definitely CAN NOT do this.
But, if you want to extend the abilities of an android smartwatch, you may add some features based on WiFi connection. Since a watch can be connected to a WiFi network, you're able to send messages and do some other stuff with it.
Also you should check up the Together feature, but as I may say, it's built on the interaction of two handhelds, but not wearables.

Related

How can I bridge phone calls to VoIP?

I want to have one stationary device like an android phone that can use a standard local SIM card and forward all calls to a second device over some kind of VoIP protocol. When someone calls the phone number of the stationary device, I want my second device to ring and handle the call through something like linphone, element, or whatever. Ideally, it should be possible from the second device to initiate a call from the stationary device's phone number as well. Bridging SMS too would be nice, but I already have a solution for this on android.
There are many use cases like
when traveling abroad, being able to bring the latter device and receive/make calls via the stationary device at home
forwarding multiple phone numbers to a single device and e.g. switching off the work number when away from work
having privacy when the location of SIM cards is logged, by making calls over wifi from somewhere else than the stationary device
when traveling somewhere with bad mobile coverage but available wifi, without having to think about how the second device handles it
Are there any existing projects for doing this?
If not, then what would be necessary to make something myself? Is the best solution something like connected an android device by bluetooth to something running asterisk like was discussed here? Or has something changed in the past 11 years, maybe the existence of some working linux phones makes this possible on a dedicated purism or pinephone device?
I think you can achieve this with Brekeke SIP Server. I am using their solution to achieve something similar to what you want to do.
there are multiple ways to achieve it technically, but the most practical solution to your use case will be to use a VOIP Gateway device.
Actually we can not use a mobile phone as gateway between SIM and VOIP calls.
so you can buy a voip gateway example GOIP (single SIM) and put your sim, connect to your home internet and configure. your phones softphone (eg linphone) will be able to directly register on it and you will be able to make/receive calls and sms.
there will be a new problem as mobile OS platforms are more and more restrictive about power, your sip client will not be able to receive calls while in background for that you will need push, so you can use twillio's mobile sdk to make a client that works fine then forward your calls to twillio from gateway. since there is no number or telecom services involved, cost on twillio should be minimal.
A more common way to do this is with an operator service, rather than implementing it yourself.
The operator is able to see the routing to your number and simultaneously call multiple numbers you have set up. Different operators will have different names and details so you would need to speak to your local operator.
For example BT in the UK (who I have no affiliation to - just an example) provide a service called 'Follow ME': https://support.ringcentral.co.uk/s/article/9010?language=en_GB
If you do want to do it yourself than an open source PBC like Asterisk is indeed a good starting point.

Sharing Data between Smart Devices without wifi

I have heard of communication between two android devices using that touch method or however that works. I understand that communication over WiFi is not a problem. I need to know if it is possible to create an app that would run on multiple devices but in the end would compile data collected on each device into one main database all done without WiFi. It just sounds like a hogwash idea in my mind but is this possible?
There is app call SuperBeam.You'll need SuperBeam installed on both devices and then you'll need to pair the devices using any of a number of methods, including QR Codes, NFC, or by typing a manual code.
https://www.youtube.com/watch?v=hGAAE7qru6g
youtube link if you want to see how to use SuperBeam app
Correction:I tought this app don't use wifi but i guess this app for devices aren't connect to the same Wifi

Android Awareness of remote Bluetoth-Request with disabled BluetoothAdapter

I'd like to use android's bluetooth for some kind of sensing devices. But I don't want to connect to these devices. As far as I know Devices won't react to scanning when their own bluetooth is disabled. But is there any way to get my app noticed when such a scan has been performed by a remote device, even when my app is running with bluetooth turned off?
I don't want to force toggling bluetooth on, but I need to get some kind of Action started in other devices running the same app. So I'm wondering if some there is any description/data field that can be sent with a bluetooth scan, so if scan is rejected the app has the opportunity to read that data just to know there was this specific call?
I need to leverage context-awareness within my system as to users, not knowing each other, still can interchange content (if they agree). But I need to find some ways of sensing while I also don't want to have all sensors activated all the time.
Hope you can give me a hint, or tell me that this is simply not possible, which would also help me not spending any more time on that.
Thanks.

Is there a way for automatic/programatic pairing of 2 bluetooth devices in android?

I am developing an application which connects devices over bluetooth and exchanges messages. It works fine for paired devices, but I would also like it to automatically pair devices that are not paired. Like for example it could store and use the same PIN for pairing requests, I just dont know how to manage this request programatically in my applciation, how to automatically set and send the PIN when you get a pairing request and how to initiate such a request with the predefined PIN code.
Any snippets or thoughts would be highly appreciated! :)
EDIT:
I know its risky, I am developing this app for emergency situations only where no other means but bluetooth is available. Also is there maybe a way of premature pairing with devices without even connecting to them? Like lets say there is a list of MAC Addresses of those devices and I can use them to generate a bond with that devices so that they appear paired on my device?
You can't do this. To do what you want to do would create a huge security risk. Think about it, my device just comes anywhere in bluetooth range of yours and now I can send you anything I want without you knowing? You can't really do this and I highly recommend not trying to subvert it.
Reflecting the setPin method allowed me to send the pin automatically to the other device. I had to implement it in a broadcast receiver that is listening for pairing requests. Although I cant get rid of the dialog it just stucks there on the screen and I dont know how to close it (programatically) and continue the bonding procedure since this dialog is called from inside connect() which is a blocking method. I am not giving up on it yet though :)
With Bluetooth version 2.1 and above there is a method of pairing called the 'just works' association model. This is the lowest security method of pairing and has no protection against man-in-the-middle attacks.
However, this will provide a secure, encrypted link without the need to exchange pin numbers or verify device ID.
The API on different platforms may differ but the underlying HCI messages require that you indicate that your device (or one of the devices) has the following IO capabilities:
No Keyboard, No Display.
As you might have guessed, this is a mode for very
simple devices that use Bluetooth, such as a speaker or headphones.
If you can find the API to configure that, then the 'just works' association mode of Secure Simple Pairing will be used for pairing.
The next step is to store the link keys e.g. bonding. Many devices e.g. mobile phones, will still create a dialogue box to the user to ask if they want to 'remember this device', as user authorisation is specified by the BT specifications... but that's another problem.

Manually pairing Bluetooth Decives in Android?

I was reading this
http://developer.android.com/guide/topics/wireless/bluetooth.html#QueryingPairedDevices
which is allot of help on how to pair,connect to a bluetooth device.
I have a situation where I have several BT devices that are in Non-Discover mode always. I know the MAC and the PIN of these devices. IS there a way in Android Dev to manually add devices to the PAIRED list so i can just use the connect as a client.
I understand this maual is written allot for V3. i think i will need to do this on 2.0 ; 2.1- has anybody done this before?
Basically these devices I want to connect to are power saving modules I used pre built BT modules to monitor daylight, another one humidity, etc.. every 3hrs or when interrupted and runs of a single battery for months. So turning off divcory on server saves immense power and prevents other people trying to connect and waste battery.
Not sure what you mean by "manually": Do you mean "manually" as in GUI/user interaction, or "manually" as "I do it in my own application code"?
Some suggestions though:
If you can make your BT devices discoverable at all, you could do it this way:
Make your BT device discoverable
Let Android search for and find the device and then initiate a connection
Android will ask for the PIN for pairing with the device; enter the PIN.
Once pairing was successful, Android stores the pairing information for future use, so that you can
Make your BT device invisible again.
From then on your app should be able to connect to the BT device at any time without further pairing operations.
If the said is not an option for you, maybe you want to go another way:
In current Android versions there are different API routines implemented which are neither documented nor exposed in the normal SDK. A hack kind of solution may be to use some of these "hidden" ("#hide"...) APIs, either via reflection or via modification of your SDK installation.
But be aware that this is always a hack and it may work on a specific device with a specific version of Android and is likely to break your app on another device and/or any other Android version.
Having said that, here comes some reference:
Example of how to access "hidden" bluetooth API.
Then, have a look at the source code for android.bluetooth.BluetoothDevice, e.g. here.
In there, public boolean createBond(){...} may do what you want.

Categories

Resources