Thursday, 28 April 2016

How to Use All Chat Service from Your Desktop

Leave a Comment
If you want all in one app that manages your all chat messenger services. You wait is over. In this post, we talked about an application for PC that puts all your chat services in single place.

Franz is a free messaging app / former Emperor of Austria and combines chat & messaging services into one application. He currently supports SlackWhatsAppWeChatHipChatFacebook MessengerTelegramGoogle HangoutsGroupMeSkype and many more. You can download Franz for Mac, Windows & Linux.

This app perfectly works on Windows PC and Mac. Currently, I use this app on my Mac
Franz for Mac puts all your chat services in a single placeFranz allows you to add each service many times.

Check this geek toooUltraSound - New Sharing way in Android

You can add your multiple WhatsApp account and Facebook Messenger account in this app. This makes Franz the perfect tool to manage multiple business and private accounts at the same time.

One service, unlimited accounts


Franz allows you to add each service many times. This makes Franz the perfect tool to manage multiple business and private accounts at the same time. You could even use five different Facebook Messenger accounts at once, if some inexplicable reason urges you to do so.

How they handle your personal messages & chats?

Franz does not read anything you type, send or receive. That's between you and your messenger service. His only interest is to successfully deliver your messages. No nosing – all hail postal secrecy!

Do you know : How to Make Your Facebook Profile Video Picture

Whatsapp in Franz App

Whatsapp in Franz App

Facebook Messenger in Franz App


The design of this app is clear and amazing. Currently, this all in one chat service supports 14 messaging services. This app saves your time and you don’t need to open your browser for using  chat services. If you are using Franz app on the computer.
Current version: 2.0 (0.9.10 beta) — other platforms and systems

Note :

Try this app on your computer and give your review about this app in comments.


Read More

Monday, 25 April 2016

UltraSound - New Sharing way in Android

Leave a Comment
There are many options available in the android phone for sharing links between two devices like Whatsapp, Shareit, Facebook and lots more.

But all these apps uses Internet, WiFi , Bluetooth and working Internet connection. In this post, we talk about a new app, that doesn’t need these type of medium for sharing links between two android mobile devices.

How does ultrasound work for sharing in Android ?

The human ear can pick up frequencies in the range of about 20Hz to 20KHz. Any frequencies above or below this range cannot be heard by the vast majority of people (think – dog whistles). Most consumer media devices (ie. our smartphones) are designed to transmit audio in this frequency range. In fact, the maximum output sampling rate of many devices is 44.1kHz, which means the peak frequency can be theoretically as high as half of that or 22.05kHz. In other words, barely outside of our hearing range.

In the real world, many people can’t hear frequencies as high as 20KHz (hence why many children can hear some sounds their parents cannot) and the frequency output of the device’s speaker doesn’t hit the theoretical maximum. But this ends up working out in our favor as we can beam data between 17kHz and 18kHz and most people won’t be able to hear it at all. This is what researchers at Azoft R&D theorized and they developed a mobile application for iOS demonstrating its use.

How to use Radon for ultrasound sharing?

Radon uses Ultrasound tech for sharing links between two android mobile devices. Radon puts a new twist on it by using sound waves that the human ear can’t hear.

Simply open the app and you can send or receive links without having to manually pair devices, copy down text, or scan QR codes. It’s probably not something you’ll want to use every day, but it’s handy if you need to send links to everyone in your meeting all at once.
Radon uses a combination of Bluetooth, Wi-Fi, and near-ultrasonic audio, found in Google’s Nearby API to make this happen. While it can’t handle files like photos and video, it’s great for quickly sharing small amounts of data, particularly when used with a bunch of people at the same time. – and it’s faster than messaging.

Well, this is a great app for sending links in between meeting, party, and group. You don’t need to pair with other devices for sharing links. Believe me it faster than messaging.
Read More

Google Nearby Connections API for Android

Leave a Comment
The Nearby Connections API enables your app to easily discover other devices on a local network, connect, and exchange messages in real-time. You can use the Nearby Connections API to give your apps the following capabilities:



  • Collaborative whiteboard: Jot ideas down with nearby participants on a shared virtual whiteboard.
  • Local multiplayer gaming: Set up a multiplayer game and invite other users on the local network to join it. Your app can also allow a player to start an in-game mission when enough nearby participants join.
  • Multi-screen gaming: Use a phone or tablet as a game controller to play games displayed on a nearby large-screen Android device, such as Android TV. Your app can also enable players to see a customized game screen on their personal devices while all nearby participants see a shared common view on a large-screen Android device.

The API is located in the com.google.android.gms.nearby.connection package, and lets you build apps that can join multiple nearby Android devices together on the same local network. One device advertises on the network as the host, while other devices act as clients and send connection requests to the host.

Before you begin

Before you start to code using the Nearby Connections API:


Once the system connects the GoogleApiClient, your game can use the Nearby Connections API.

Initializing your Google API client for nearby connections

To access the Nearby Connections API, you first need to initialize the Google Play services API client. Use the builder to add the Nearby Connections API.

The following example shows you how to initialize the Nearby Connections API in the onCreate() method of your activity:
import com.google.android.gms.nearby.Nearby;
import com.google.android.gms.nearby.connection.AppIdentifier;
import com.google.android.gms.nearby.connection.AppMetadata;
import com.google.android.gms.nearby.connection.Connections;
import com.google.android.gms.nearby.connection.ConnectionsStatusCodes;

public class MainActivity extends Activity implements
        GoogleApiClient.ConnectionCallbacks,
        GoogleApiClient.OnConnectionFailedListener,
        View.OnClickListener,
        Connections.ConnectionRequestListener,
        Connections.MessageListener,
        Connections.EndpointDiscoveryListener {

   // Identify if the device is the host
   private boolean mIsHost = false;

   

   @Override
    protected void onCreate(Bundle savedInstanceState) {
        

        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .addApi(Nearby.CONNECTIONS_API)
                .build();
    }
}

Note:
If you are using Google+ sign-in with your project or any other API that requires authentication you may want to use a separate Google API Client for Nearby Connections. This API does not require the user to authenticate so it can be used even when the user does not want to sign in or sign-in has failed.

To use the Nearby Connections API, your client must first establish a connection to the Nearby Connections API service. You can disconnect the client once your game no longer needs access to this service. Connect the GoogleApiClient in your activity’s onStart() and disconnect it in onStop():
@Override
public void onStart() {
    super.onStart();
    mGoogleApiClient.connect();
}

@Override
public void onStop() {
    super.onStop();
    if (mGoogleApiClient != null && mGoogleApiClient.isConnected()) {
        mGoogleApiClient.disconnect();
    }
}

Validating network connectivity

Before using the Nearby Connections API, you should check to ensure the devices are connected to a network. If they are not connected, prompt players to connect to a network.

Note:
For devices to discover each other, they must be connected to the same network with multicast enabled. By default, most home routers have this setting enabled. If you experience connectivity issues while using this API, please consult your router device manufacturer documentation for more information on how to enable this setting.

To detect the network state, first add the following permission to your manifest:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
The following example shows you how to determine whether a device is connected to a network:
private static int[] NETWORK_TYPES = {ConnectivityManager.TYPE_WIFI,
    ConnectivityManager.TYPE_ETHERNET};

private boolean isConnectedToNetwork() {
    ConnectivityManager connManager =
        (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
    for (int networkType : NETWORK_TYPES) {
        NetworkInfo info = connManager.getNetworkInfo(networkType);
        if (info != null && info.isConnectedOrConnecting()) {
            return true;
        }
    }
    return false;
}
Call this method before you start to advertise your device or set your device to discovery mode as described in the sections below.

Note:
If your Android device is acting as a WiFi hotspot for other devices, the hotspot device cannot advertise or discover Nearby Connections at the same time. However, other devices that are connected to this type of WiFi network can advertise and discover other devices on the network.

Advertising your device

To establish a connection between two or more devices, one device must advertise its service and one or more devices must request to connect to it. The advertising device is the 'host' in a multiplayer game, while the connecting device is the client.

To enable your app to advertise itself with the Nearby Connections API, add the following to your manifest:
<application>
  <!-- Required for Nearby Connections API -->
  <meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
            android:value="@string/service_id" />
  <activity>
      ...
  </activity>
</application>
The service_id value allows client devices to discover the advertising device. The value must uniquely identify your app. As a best practice, use the package name of your app (for example, com.google.example.mygame.service).
The following example shows you how to declare the service_id value in the strings.xml file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    ...
    <!--
        This is the service identifier for Nearby Connections. Do NOT copy and paste this value
        into your own application.  Instead, choose a unique identifier that is appropriate for
        your application.
    -->
    <string name="service_id"><!-- your service ID goes here, e.g. com.google.example.mygame.service --></string>
    ...
</resources>
When a player starts the game and chooses to host, call Connections.startAdvertising() to advertise the device. When you pass in null for the name parameter, the API constructs a default name based on the device model (for example, “LGE Nexus 5”). The AppMetadata parameter allows Google apps to prompt a player to install your application if they don't currently have it installed.

The following example shows you how you can advertise the host player’s device:
private void startAdvertising() {
    if (!isConnectedToNetwork()) {
        // Implement logic when device is not connected to a network
    }

    // Identify that this device is the host
    mIsHost = true;

    // Advertising with an AppIdentifer lets other devices on the
    // network discover this application and prompt the user to
    // install the application.
    List<AppIdentifier> appIdentifierList = new ArrayList<>();
    appIdentifierList.add(new AppIdentifier(getPackageName()));
    AppMetadata appMetadata = new AppMetadata(appIdentifierList);

    // The advertising timeout is set to run indefinitely
    // Positive values represent timeout in milliseconds
    long NO_TIMEOUT = 0L;

    String name = null;
    Nearby.Connections.startAdvertising(mGoogleApiClient, name, appMetadata, NO_TIMEOUT,
            this).setResultCallback(new ResultCallback<Connections.StartAdvertisingResult>() {
        @Override
        public void onResult(Connections.StartAdvertisingResult result) {
            if (result.getStatus().isSuccess()) {
                // Device is advertising
            } else {
                int statusCode = result.getStatus().getStatusCode();
                // Advertising failed - see statusCode for more details
            }
        }
    });
  }

Discovering Nearby Devices

The discovery process allows a device, on the same Wi-Fi network, to find other devices advertising Nearby connections for a specific service ID. The service ID parameter you pass into Connections.startDiscovery() should match the value provided in the manifest of the advertising app. The following example shows how to initiate the discovery process in your app:
private void startDiscovery() {
    if (!isConnectedToNetwork()) {
        // Implement logic when device is not connected to a network
    }
    String serviceId = getString(R.string.service_id);

    // Set an appropriate timeout length in milliseconds
    long DISCOVER_TIMEOUT = 1000L;

    // Discover nearby apps that are advertising with the required service ID.
    Nearby.Connections.startDiscovery(mGoogleApiClient, serviceId, DISCOVER_TIMEOUT, this)
            .setResultCallback(new ResultCallback<Status>() {
                @Override
                public void onResult(Status status) {
                    if (status.isSuccess()) {
                        // Device is discovering
                    } else {
                        int statusCode = result.getStatus().getStatusCode();
                        // Advertising failed - see statusCode for more details
                }
            });
}

Managing Nearby Connections

Your app must implement logic for connecting client devices to host devices. This section explains how to complete a connection and identify connected devices. There are two ways that the Nearby Connections API identifies devices:

  • Device ID: Identifies the device uniquely and remains the same even when the device is rebooted.
  • Endpoint ID: Identifies the device locally to a GoogleApiClient instance.

The endpoint ID is required to establish connections and send messages. When a user disconnects from the app, the system may assign a new endpoint ID upon reconnection. However, you can use the device ID for cases such as:
  • Identifying the user and restoring their appropriate data.
  • Reconnecting to a host that the client has previously connected to during discovery (for example, reconnecting to your Android TV to continue any saved progress the following day).
  • Trying to reconnect to a host after losing connectivity with it (for example, returning to an app activity after receiving a phone call).

Completing a connection

Once your app discovers another app that is advertising the requested service ID, you can initiate a connection between the devices. The following example shows you how to handle discovery of a device:
@Override
public void onEndpointFound(final String endpointId, String deviceId,
                            String serviceId, final String endpointName) {
  // This device is discovering endpoints and has located an advertiser.
  // Write your logic to initiate a connection with the device at
  // the endpoint ID
}

Note:
The onEndpointFound() method may be called multiple times if there are multiple devices advertising on the same network. In your app, you can implement a button that presents the user with a list of hosts where they can choose who to connect to.

For apps such as multiplayer games, it is suitable to present a list of hosts to connect to. Alternatively, you could also choose to immediately connect the player, such as when a device connects to Android TV.

Once the user initiates a connection attempt in your app, you can establish the connection as shown in the following example:
private void connectTo(String endpointId, final String endpointName) {
  // Send a connection request to a remote endpoint. By passing 'null' for
  // the name, the Nearby Connections API will construct a default name
  // based on device model such as 'LGE Nexus 5'.
  String myName = null;
  byte[] myPayload = null;
  Nearby.Connections.sendConnectionRequest(mGoogleApiClient, myName,
    remoteEndpointId, myPayload, new Connections.ConnectionResponseCallback() {
      @Override
      public void onConnectionResponse(String remoteEndpointId, Status status,
                                       byte[] bytes) {
        if (status.isSuccess()) {
          // Successful connection
        } else {
          // Failed connection
        }
      }
    }, this);
}
On the host side, you need to handle connection requests from connecting devices. To track messages and send messages to connected devices, store the device endpoint IDs in a data construct of your choosing. Override the onConnectionRequest() method in your activity to handle the requests. The following code snippet shows how you might handle connection requests from devices:
@Override
public void onConnectionRequest(final String remoteEndpointId, String remoteDeviceId,
                                String remoteEndpointName, byte[] payload) {
  if (mIsHost) {
    byte[] myPayload = null;
    // Automatically accept all requests
    Nearby.Connections.acceptConnectionRequest(mGoogleApiClient, remoteEndpointId,
                    myPayload, this).setResultCallback(new ResultCallback<Status>() {
      @Override
        public void onResult(Status status) {
          if (status.isSuccess()) {
            Toast.makeText(mContext, "Connected to " + remoteEndpointName,
                           Toast.LENGTH_SHORT).show();
            } else {
              Toast.makeText(mContext, "Failed to connect to: " + remoteEndpointName,
                             Toast.LENGTH_SHORT).show();
            }
          }
        });
  } else {
    // Clients should not be advertising and will reject all connection requests.
    Nearby.Connections.rejectConnectionRequest(mGoogleApiClient, remoteEndpointId);
  }
}
In the example above, all connections are automatically accepted. Depending on your app setup, you may wish to limit the amount of connections if you have a max user limit. To prevent subsequent connection attempts from devices, call rejectConnectionRequest(). Once the main app activity is running , you can stop advertising your device by calling stopAdvertising().

Note:
The stopAdvertising() method does not prevent an app from sending or receiving messages to and from remote endpoints. In addition, the host device can still receive connection requests from client devices if the client device has stored the host endpoint ID.

Handling lost connections

During the nearby device discovery process, users may encounter disruptions in their network connection. For example, a user might move out of range of the WiFi network. If your app presents a list of hosts to the user, you can override the onEndpointLost() method to simply remove that user from the list when the system detects a lost connection.

Keeping the device screen awake

Because input events are not explicitly required, connected devices may enter sleep mode. As a best practice, call the following code in your activity to keep the device awake:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
For more information, see Keeping the Device Awake.

Identifying a client device

When a device is connected to the host, it may send messages to other client devices. There are cases where you need to know the endpoint or device ID of the target device. For example, if device X is sending an instruction to device Y, the app would send the message from device X to the host and pass device X’s endpoint ID so that device Y will know where the instruction originated. Use getLocalEndpointId() or getLocalDeviceId() to retrieve this data.

Disconnecting nearby connections

Whenever a user quits the app, call disconnectFromEndpoint(). Your app can also use this method to force a user to quit. The following snippet shows how to disconnect a connection:
Nearby.Connections.disconnectFromEndpoint(mGoogleApiClient, remoteEndpointId);
To stop advertising and disconnect all remote endpoints, call stopAllEndpoints(). You can also call this method from a client device to stop discovery or disconnect from the host. The following snippet shows how to call stopAllEndpoints():
Nearby.Connections.stopAllEndpoints(mGoogleApiClient);
When the Google API client is disconnected on a device, calling disconnectFromEndpoint() or stopAllEndpoints() triggers the onDisconnected() callback method on the device it was connected to. Override this method to gracefully handle disconnection scenarios.

Reconnecting nearby connections

Users can lose connectivity for many reasons (for example network interruptions, or walking outside of the WiFi network range). Depending on your app design, you may want to reconnect a disconnected user while the activity is still ongoing, or pause and restart the activity when the user attempts to reconnect.

To enable your app to reconnect devices, store the device ID and endpoint ID for each user. When storing user data such as a position or score, identify the user by device ID so that the data can be restored after a disconnection even if the endpoint ID changes.

If the host is still advertising, the user can reconnect using the service ID. However, if you disable advertising in your app while the activity is ongoing, you should implement logic to store the endpoint ID so that you can call sendConnectionRequest() to reconnect the user.

Send messages

Once connections are established between devices, they can send and receive messages to update app state and transfer input, data, or events from one device to another. Hosts can send messages to any number of clients, and clients can send messages to the host. If a client needs to communicate with other clients, your app can send a message to the host to relay the information to the recipient client.

Warning: Messages sent through the Nearby Connections API are not encrypted. Do not send sensitive data through this API.

Sending a message

To send a message, call sendReliableMessage() and pass in the appropriate endpoint ID. The payload parameter is a byte array of up to Connections.MAX_RELIABLE_MESSAGE_LEN bytes long that holds your message data. Reliable messages are guaranteed to be received in the order they were sent, and the system retries sending the message until the connection ends.
The following code snippet shows how you can send reliable messages from one device to another:
Nearby.Connections.sendReliableMessage(mGoogleApiClient, remoteEndpointId, payload);
You can also send messages of up to Connections.MAX_UNRELIABLE_MESSAGE_LEN bytes long by calling sendUnreliableMessage(). This method allows the system to deliver messages quickly, but the messages may be lost or sent out of order. Unreliable messaging is suitable if you want to show an opposing player’s character position on a map, or for frequent and less important game notifications.

Receiving a message

After a message is sent, the system receives the message through onMessageReceived(). Based on the requirements of your app, you can override this method to update information such as player scores, on-screen drawings, or the current player's turn.

The following code snippet shows how to override this method to handle received messages:
@Override
public void onMessageReceived(String endpointId, byte[] payload, boolean isReliable) {
    // Implement parsing logic to process message
}

Download Sample Project

Read More

Tuesday, 19 April 2016

Understand : What is WhatsApp Encryption

Leave a Comment
Some days agone, WhatsApp introduced the long hoped-for end-to-end encryption to all users. we detected the method has been going on for a while now , with Android-to-Android messages encrypted; currently the encryption feature has reached almost each WhatsApp user out there, no matter their mobile platform though one has to be running the most recent version of WhatsApp to be enjoying its advantages. WhatsApp has stated that out-of-date versions of its consumer can expire over time, so which means that, in due course, nearly everybody are going to be running a version supporting end-to-end encryption.



A number of existing chat applications offer end-to-end encrypted communications, as well as Threema, Signal and Wickr. so it was quite weird to listen to that WhatsApp (probably the most popular IM app) still hadn’t implemented it yet till recently.
To some individuals this might all sound like jargon.

  1. What's this encryption?, 
  2. Why implement it? 
  3. Why use it? 
  4. Is it that essential? 
  5. How will this have an effect on the me? 
We hope to explore this and more over the course of this article.



Encryption is the act of encoding data during a manner that results in only licensed parties having the ability to browse it. encryption doesn’t stop somebody intercepting the data, but stops the interceptor having the ability to look at the content. In essence, an encrypted message will only be control by people who have access to the key. Provided this key is properly unbroken secret, your messages are secure. In end-to-end encryption, this key is only accessible to the parties in the chat, and it’s not exposed outside of their devices, rendering the messages unreadable to anybody else.



With end-to-end encryption, nobody will have access to your chats, except you and the sender – even WhatsApp themselves. Users should be rest assured that all their chats are currently private, more like a face-to-face conversation. to explain this further, here’s an excerpt from WhatsApp legal page:

Messages between WhatsApp users are protected with an end-to-end encryption protocol in order that third parties and WhatsApp cannot browse them and then that the messages can only be decrypted by the recipient. every type of WhatsApp messages (including chats, group chats, images, videos, voice messages and files) and WhatsApp calls are protected by end-to-end encryption. WhatsApp servers don't have access to the private keys of WhatsApp users, and WhatsApp users have the option to verify keys in order to confirm the integrity of their communication.

The content of actual messages are encrypted and can't be browse in transit through WhatsApp’s servers, but data like date and time of communication, and the parties involved during a conversation are still accessible. all these may be categorized under metadata and may be created available for government and security agencies to access whenever the need arises. Funnily, this is even what they may be interested in.


To further clarify, the metadata can be used to reveal the following:

  • Whom a particular user communicated with,
  • When they did the communication,
  • How often they communicated,
  • Where the communicating parties were located when the conversation occurred. (Probably possible if location is turned ON).

“WhatsApp may retain date and time stamp information related to successfully delivered messages and the mobile phone numbers involved in the messages, as well as any other info that WhatsApp is legally compelled to collect.”


That being said, when the encrypted communication, the process continues to be in doubt as a result of most of the endpoint devices aren't encrypted. several iPhones are, but different smartphones, tablets etc, running android or different operating systems don't have encryption enabled. looking at another angle, it’s not simply encrypting to keep data secure. currently that we've seen the leverage Facebook/WhatsApp still retains over user info, it is now totally down to them. To what extent will they go to protect customers when faced with a court order? It also appears that, for WhatsApp cluster chats, the encryption won’t work unless everyone in the group updates to the most recent version of the app. Even pdf sharing won’t work until the same condition are met.

Encryption has come to stay as far as internet communications is concerned. In fact, it has become a fundamental right for people to have their communications kept private and secure while online. the big question is : how much do we trust the people handling the servers and infrastructure powering our communications?

Do you trust WhatsApp with your metadata? Are there any encryption experts in the house to explain things better for us? Do you think the WhatsApp encryption move was necessary? Leave a comment below!

Read More

Monday, 18 April 2016

Grab Android N Emoji for Your Android Phone

Leave a Comment
We know how you guys are with waiting, so we thought you’d like to know that the folks over at Gadget Hacks have shared a flashable zip of the new Android N emoji. The emoji are based on the as-yet-unpublished Unicode 9.0 standard, so you’ll legitimately have emoji that no one else has except for those with the Android N developer preview 2.

Grab Android N Emoji for Your Android Phone


So here’s how to get the new Android N emoji on your phone.

First of all : 

Flashing this zip will overwrite your existing emoji, so if for some reason they don’t work right or you want to revert back to what you had before, it is essential that you create a android backup of your system before you flash anything.

Grab Android N Emoji for Your Android Phone

Note :

  • The new emoji will only work on Android 5.0 Lollipop and above, and you’ll need a custom recovery installed to flash the zip file. 
  • Apparently they don’t work on all Samsung Galaxy phones either, but if you’re keen to give it a try, here’s what you need to do.

Download emoji file:

  • Just download the Android N emoji zip file and reboot your phone into recovery. Assuming you’re using TWRP (because who uses anything else these days), just tap Install and navigate to your Downloads folder (unless you moved the zip elsewhere).
  • Here is a flashable zip for the new emojis from the Developer Preview 2. Please back up your font in /system/fonts/NotoColorEmoji.ttf prior to flashing.
  • Locate the emoji zip, tap it and slide the slider at the bottom of the screen to flash it. Then just reboot your system and you’ll now have system-wide Unicode 9.0 emoji. Remember, if you have any problems or want to change things back to the way they were, just restore the backup you made earlier.

Demo Emoji Image :

What do you think of the new emoji? Thoughts on the “human” emoji?
Read More

Friday, 15 April 2016

Bing New Features for Developers

Leave a Comment
Bing has updated its Bing search engine with a unique feature that provides executable code directly in the search results. This has been made possible as a result of a partnership between Microsoft and HackerRank.

It’s one of the best new features I’ve seen in a search engine for a long time.


Very often, every programmer needs to open the web browser search for algorithms and programs. People end us visiting websites like Stack Overflow or Mozilla Developer Network to seek help. To make this exercise easier, Microsoft has turned Bing into a specialized search engine for coding.

How to use Bing’s executable code snippet feature?

To use Bing for getting executable code snippets, all you need to is visit Bing.com and search queries like “fibonacci in c#”, “quick sort python” etc.



As soon as you hit enter, it will pop up the code editor widget for you. You can run the code here clicking on the Run Code button.

From another button in the top right corner, I was able to switch the programming languages as well and see the same code in the different language. Currently, the programming languages listed are C, C++, C#, Python, PHP, and Java.

Important note: 

If you are unable to see the executable code snippet feature in Bing, make sure to set your region us U.S. in bing. To do this, you have to click on Settings on Bing.com page and look for Regions in left sidebar and select United States.

HackerRank says that right now the search engine shows more than 80 code snippets that cover the most commonly searched terms.



“In addition to learning how a certain algorithm/code is written in a given language, users will also be able to check how the same solution is constructed in a range of other programming languages too — providing a Rosetta-stone model for programming languages,” 

-says Bing’s Marcelo De Barros.

Go ahead, give it a try!
Read More

Tuesday, 12 April 2016

WebUSB API - Connect USB to Internet

Leave a Comment
Two Google engineers have developed a draft version of an API called WebUSB that might allow you to connect your USB devices to the web safely and securely, bypassing the necessity for native drivers.

connect usb to internet using webusb api


This API covers all sorts of devices that are connected to your computer via USB ports — keyboards, IoT equipment, mice, etc.


Let’s tell you about WebUSB API in detail:

What is WebUSB API?

WebUSB wants to create the process of connecting a device to a web page simple. However, Googlers don’t try to label it as a universal method.

“WebUSB doesn't decide to provide a general mechanism for any online page to attach to any USB device,” 

-They explain.

how to connect usb to the internet using webusb api

They hope that API hardware manufacturers can get the power to create cross-platform JavaScript SDKs for their devices. this might be possible if the browser vendors adopt the technology inside their product and provides the hardware makers a base to build devices with out-of-the-box WebUSB capabilities.

"With this API hardware manufacturers can have the ability to build cross-platform JavaScript SDKs for their devices," 

-Google engineers wrote within the draft project description.

How to use WebUSB API — an easy example

Let’s take an example of a 3D printer. these days you can’t go to Thingiverse and hit Ctrl+P to print style out of your 3D printer. this is so because user agents and operating systems don't have 3D printer support.

You can also check this  : 15 Use of USB OTG in Android Phone

With the WebUSB API already implemented inside the browsers, JavaScript code from iframe can prompt the user for 3D printer access. a website will ask the user to approve the access and ask for commands just like the permissions on an android device.

Privacy and Security issues

The Google engineers also made public security concerns.

  • WebUSB can include origin protections, like a type of the Cross-Origin Resource Sharing (CORS), to restrict the web pages from requesting information from different domains except the one from where they originate.

This means a web page couldn't be able to exploit your USB device to access your computer, or your important files or any files that your laptop or the USB device itself might hold.

  • To address the issue of USB devices leaky information, WebUSB can always prompt the user to authorize a website or web page in order to observe the presence of a device and connect to it.

For now, the WebUSB is only a draft of a potential specification, which hasn't been officially adopted by W3C. WebUSB remains a work in progress at the current, although you'll check out the complete WebUSB codebase on GitHub.
Read More

Saturday, 9 April 2016

Google replace java with Apple's Swift Programming Language for Android

Leave a Comment
Almost two years back, Apple introduced Swift programming language at its World Wide Developers Conference (WWDC) to the developers who build software applications for Apple devices.

Google replace java with Apple's Swift Programming Language for Android



Swift was designed to make it easier for developers to create apps for Apple's mobile platform. Usually developers write complete app code and then compile it to see output, but Swift helps them see results in real time instantly while writing code.

Google replace java with Apple's Swift Programming Language for Android



Now, reports have been emerged that the search engine giant is also considering making Swift programming language a "first class" language choice for programmers making apps for its Android platform.

In between an ongoing legal battle with Oracle over Android, Google is planning to bring Swift into the Android platform with at least two major third-party developers — Facebook and Uber, reports The Next Web.

Google replace java with Apple's Swift Programming Language for Android



Around the time when Apple officially made Swift an open source language, executives from Google, Facebook and Uber attended a meeting in London to discuss the Apple's very popular Swift programming language.

The move is very likely due to Google's ongoing legal dispute with Oracle. The dispute started when Oracle sued Google for copyright in 2010, claiming that the search engine improperly used its Java APIs and baked them into its Android mobile OS.

However, Google argued that the Java APIs in question were necessary for software innovation, allowing different apps to talk to each other, and, therefore, could not be copyrighted.

Google almost won the initial lawsuit in 2012, but a Federal court reversed the decision in 2014 in Oracle's favor. Google then reached out to the US Supreme Court to take the case, but Supreme Court declined to hear its appeal.

Google replace java with Apple's Swift Programming Language for Android



Most recently, Oracle announced its intent to seek $8.8 Billion in damages from Google.

Although the final decision is yet to be made, which could possibly prohibit Google from using the copyrighted APIs, the company has started planning a shift towards other open source languages.

Last year, Google announced that the future Android builds (from Android N) will not use Java API, rather will make use of OpenJDK – an open source version of Oracle’s Java Development Kit (JDK).

OpenJDK is still controlled by Oracle, but at least, Google is legally cleared to implement it.

So, any official implementation of Swift into Android would not replace Java immediately, though. Google would make it easier for developers to build their Android apps with Swift, right alongside Java most often used for Android apps today.
Read More

Friday, 8 April 2016

Android Material Design GUI XML Template

Leave a Comment
We made this beautiful Android UI template with idea to provide developers easy and practical way to make their apps also beautiful. With our Android UI template you don’t need to loose your precious time to set up pre-designed graphic – we did it for you!



Also all elements are available to be used in older versions of Android so you don’t need to have expensive smartphone to have awesome Material design. You can easily implement components from Android UI template just by following our huge and well organized documentation.

Full feature list


  • Wizards – Five themes of wizards, and five new fragments, ready to use. Open Source projects used in this elements: Universal Image Loader

  • Custom Dialogs – Six themes of custom dialogs, ready to use. Open Source projects used in this elements: Universal Image Loader







  • Check Buttons – Dark & light versions of check boxes inspired by Material design. Open Source projects used: Material Ripple Layout.

  • Search bars – Dark & light search bar with search suggestions prepared to place in your app. Open Source projects used: Material Ripple Layout.

  • Icons – a wide range of free Fontello icons.
  • Icons are added via Fontello – no more four different sized PNGs. In our project is 46 icon in .svg format.
  • Easy colors changing – colors are changeable in one XML and primary color for all layouts and elements are changeable in one line.
  • Finished elements and layouts ready to use – ready XML files and drawables for use in your app.
  • Many elements have animation and/or transparency – beautiful transparent animations which are more and more popular.
  • All elements and layouts work on old versions of Android (from 4.0 version) too – every element has its own AndroidMainfest.xml file with defined minSDK.
  • Define typefaces and fonts through XMLs – no more need to create fonts from assets folder.
  • Universal Image Loader – link – Used for effective image loading. Take a look at library for more details.
  • Pager Sliding Tab Strip – link – This project is used to make items in Tab category.
  • Progress Wheel – link – Progress bar.
  • Circular Progress Button – link – Yet another example of a progress bar.
  • Float Labeled Text Field – link – This project allows us to show hint text above edit text when we start typing. This might be useful when you have prepopulated Edit Text fields, or when you have a large number of them to show user what is purpose of every Edit Text field.
  • Material Ripple Layout – link – We use this project to bring Material design ripple effect to api levels lower then Lollipop API level (pre-21). If you want to get ripple effect, add MaterialRippleLayout to your xml layout, then nest you own views into it.
  • Pull Zoom View – link – This project allows us to show parallax effect with image that is attached on top of ListView or ScrollView. You can see an example by clicking the link of project.
  • Not Boring ActionBar – link – Take a look at this link for more details.
  • Shape Image View – link – This project allows us to create different shapes around images using ImageViews. Visit link for more information.
  • List View Animations – link – For the most beautiful animations you want with your ListView items, use this project. To use this project with Sticky List Headers, use project below (Sticky List Headers).
  • Sticky List Headers – link – Sticky list headers project allows you to have headers drown above ListView (like the ones you have in Instagram application). For more information, take a look at a the link.
  • Animated Expandable List View – link – This project is used to animate expanded list items in ExpandableListView.

To be able to have all of these beautiful elements available, we had to use some open source projects to achieve this. We have described in documentation and shown in our demo app how to use these projects. 

Free Download


Read More