Saturday, September 29, 2018

P2P Kit is a better way to use Bluetooth in mobility.

Bluetooth is a way to exchange data with other devices wirelessly. Android and Ios provide Bluetooth API to perform several tasks such as:

1. Scan Bluetooth devices.
2. Connect and transfer data between devices.
3. Manage multiple connections etc.

In this post, I'm going to explain the power of P2pkit that is a better way to use Bluetooth in Android and Ios device. It is a Software Development Kit (SDK) which enables application developers to integrate proximity-based features into their apps.
The p2pkit discover nearby devices and estimate their range and seamlessly broadcast content to them.

P2pkit is cross-platform SDK. It's compatible with iOS, macOS, Android and supports several radio technologies (BLE, WiFi Direct). It is very lightweight and hardly consumes any battery.

Nearby devices are notified when a proximity event takes place and receive the identifier, discovery info and range estimation. Your app can respond to this event in any way it chooses. 

Example:- It can show a notification with a voucher for a coffee or the business card of the person standing in front of you.
Example:- Whether you’re on a bus or train, at a fair or at the beach, you’ll be able to discover people around you. 

There are some limitations
Proximity ranging only works in the foreground. Not all Android devices have the capability to be ranged by other peers. The rate of proximity strength update on Android is significantly slower. Upon discovery, each peer gets associated with a proximity strength value. The p2pkit will keep ranging peers and report any changes to the proximity strength.

Let create an account for use P2pkit
Before dive into its development. We have to create an account on P2pkit console to get API key. It's sign-up is totally free.

 Once you created the account, you will move on the P2p console.

After that, You have to register app that you going to user p2p kit. Just provide app name and package id to create your app on the console. 

and you will get App key.

The p2p kit team has created a well manage sample for Android and Ios. You can download and use it. Just you have to put your API key.

The sample will show circle nodes that are actually available near Bluetooth devices.

So, that 's all about the p2p kit.  By using the p2p kit, you can use it to develop a chat and near-by apps without internet connectivity.


Get it on Google Play

Java environment path in Windows, Linux and Mac - JAVA

We need to install Java and add JAVA_HOME in the Operating System user environment variable to work with software like Maven, Jenkins, React...