Android - LinkedIn Integration

Android allows your application to connect to Linkedin and share data or any kind of updates on Linkedin. This chapter is about integrating Linkedin into your application.

There are two ways through which you can integrate Linkedin and share something from your application. These ways are listed below.

Linkedin SDK (Scribe)

Intent Share

Integrating Linkedin SDK

This is the first way of connecting with Linkedin. You have to register your application and then receive some Application Id , and then you have to download the Linkedin SDK and add it to your project. The steps are listed below.

Downloading SDK and integrating it

Posting updates on Linkedin application

Once everything is complete, you can run the Linkedin samples which can be found here.

Intent share

Intent share is used to share data between applications. In this strategy, we will not handle the SDK stuff, but let the Linkedin application handles it. We will simply call the Linkedin application and pass the data to share. This way, we can share something on Linkedin.

Android provides intent library to share data between activities and applications. In order to use it as share intent, we have to specify the type of the share intent to ACTION_SEND. Its syntax is given below −

Let's try to run your application. I assume you have connected your actual Android Mobile device with your computer. To run the app from Android studio, open one of your project's activity files and click Run icon from the toolbar. Before starting your application, Android studio will display following window to select an option where you want to run your Android application.

Select your mobile device as an option and then check your mobile device which will display your default screen −

Now just tap on the image logo and you will see a list of share providers.

Now just select Linkedin from that list and then write any message. It is shown in the image below −