Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

Chapter 15. Integration > Wrapping up: LinkedIn in action - Pg. 417

Wrapping up: LinkedIn in action 417 15.7 Wrapping up: LinkedIn in action A few final pieces of code will conclude the sample project. A well-designed account seems invisible; once configured, it'll silently and seamlessly work in the background, pulling in relevant data whenever available. We'll also discuss a few advanced topics that push the limits of integration. 15.7.1 Finalizing the LinkedIn project You've already written all the code, so all that remains is updating your Android mani- fest to describe the application's capabilities. The following listing shows the final pieces. Listing 15.20 AndroidManifest.xml for LinkedIn <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.manning.unlockingandroid.linkedin" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <service android:name=".auth.LinkedInAuthService" android:exported="true"> <intent-filter> Handles <action android:name= adding "android.accounts.AccountAuthenticator" /> accounts </intent-filter> <meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator" /> </service> <service android:name=".sync.SyncService" android:exported="true"> <intent-filter> Handles <action android:name= synching data "android.content.SyncAdapter" /> </intent-filter> <meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter" /> <meta-data android:name="android.provider.CONTACTS_STRUCTURE" android:resource="@xml/contacts" /> </service> <activity android:name= Private activity ".auth.LinkedInLoginActivity" android:label= for logging in "@string/login_label" android:theme= "@android:style/Theme.Dialog" android:excludeFromRecents="true"> </activity> </application> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_SETTINGS" /> B C D