diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 2572cef..14ac78a 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -600,5 +600,5 @@
     public static class DataUsageSummaryActivity extends Settings { /* empty */ }
     public static class AdvancedWifiSettingsActivity extends Settings { /* empty */ }
     public static class TextToSpeechSettingsActivity extends Settings { /* empty */ }
-    public static class NfcSharingSettingsActivity extends Settings { /* empty */ }
+    public static class AndroidBeamSettingsActivity extends Settings { /* empty */ }
 }
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index 7c52413..d18f81e 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -43,6 +43,7 @@
 
     private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane";
     private static final String KEY_TOGGLE_NFC = "toggle_nfc";
+    private static final String KEY_ANDROID_BEAM_SETTINGS = "android_beam_settings";
     private static final String KEY_VPN_SETTINGS = "vpn_settings";
     private static final String KEY_TOGGLE_WIFI_P2P = "toggle_wifi_p2p";
     private static final String KEY_WIFI_P2P_SETTINGS = "wifi_p2p_settings";
@@ -100,11 +101,12 @@
         final Activity activity = getActivity();
         mAirplaneModePreference = (CheckBoxPreference) findPreference(KEY_TOGGLE_AIRPLANE);
         CheckBoxPreference nfc = (CheckBoxPreference) findPreference(KEY_TOGGLE_NFC);
+        PreferenceScreen androidBeam = (PreferenceScreen) findPreference(KEY_ANDROID_BEAM_SETTINGS);
 
         CheckBoxPreference wifiP2p = (CheckBoxPreference) findPreference(KEY_TOGGLE_WIFI_P2P);
 
         mAirplaneModeEnabler = new AirplaneModeEnabler(activity, mAirplaneModePreference);
-        mNfcEnabler = new NfcEnabler(activity, nfc);
+        mNfcEnabler = new NfcEnabler(activity, nfc, androidBeam);
 
         String toggleable = Settings.System.getString(activity.getContentResolver(),
                 Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
@@ -122,12 +124,14 @@
         // Manually set dependencies for NFC when not toggleable.
         if (toggleable == null || !toggleable.contains(Settings.System.RADIO_NFC)) {
             findPreference(KEY_TOGGLE_NFC).setDependency(KEY_TOGGLE_AIRPLANE);
+            findPreference(KEY_ANDROID_BEAM_SETTINGS).setDependency(KEY_TOGGLE_AIRPLANE);
         }
 
         // Remove NFC if its not available
         mNfcAdapter = NfcAdapter.getDefaultAdapter(activity);
         if (mNfcAdapter == null) {
             getPreferenceScreen().removePreference(nfc);
+            getPreferenceScreen().removePreference(androidBeam);
             mNfcEnabler = null;
         }
 
diff --git a/src/com/android/settings/nfc/AndroidBeam.java b/src/com/android/settings/nfc/AndroidBeam.java
new file mode 100644
index 0000000..a6bd037
--- /dev/null
+++ b/src/com/android/settings/nfc/AndroidBeam.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.nfc;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.app.Fragment;
+import android.nfc.NfcAdapter;
+import android.os.Bundle;
+import android.os.Handler;
+import android.preference.PreferenceActivity;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.Switch;
+import com.android.settings.R;
+
+public class AndroidBeam extends Fragment
+        implements CompoundButton.OnCheckedChangeListener {
+    private View mView;
+    private ImageView mImageView;
+    private NfcAdapter mNfcAdapter;
+    private Switch mActionBarSwitch;
+
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        Activity activity = getActivity();
+
+        mActionBarSwitch = new Switch(activity);
+
+        if (activity instanceof PreferenceActivity) {
+            PreferenceActivity preferenceActivity = (PreferenceActivity) activity;
+            if (preferenceActivity.onIsHidingHeaders() || !preferenceActivity.onIsMultiPane()) {
+                final int padding = activity.getResources().getDimensionPixelSize(
+                        R.dimen.action_bar_switch_padding);
+                mActionBarSwitch.setPadding(0, 0, padding, 0);
+                activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
+                        ActionBar.DISPLAY_SHOW_CUSTOM);
+                activity.getActionBar().setCustomView(mActionBarSwitch, new ActionBar.LayoutParams(
+                        ActionBar.LayoutParams.WRAP_CONTENT,
+                        ActionBar.LayoutParams.WRAP_CONTENT,
+                        Gravity.CENTER_VERTICAL | Gravity.RIGHT));
+                activity.getActionBar().setTitle(R.string.android_beam_settings_title);
+            }
+        }
+
+        mActionBarSwitch.setOnCheckedChangeListener(this);
+
+        mNfcAdapter = NfcAdapter.getDefaultAdapter(getActivity());
+        mActionBarSwitch.setChecked(mNfcAdapter.isNdefPushEnabled());
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        mView = inflater.inflate(R.layout.android_beam, container, false);
+        initView(mView);
+        return mView;
+    }
+
+    private void initView(View view) {
+        mActionBarSwitch.setOnCheckedChangeListener(this);
+        mActionBarSwitch.setChecked(mNfcAdapter.isNdefPushEnabled());
+    }
+
+    @Override
+    public void onCheckedChanged(CompoundButton buttonView, boolean desiredState) {
+        boolean success = false;
+        mActionBarSwitch.setEnabled(false);
+        if (desiredState) {
+            success = mNfcAdapter.enableNdefPush();
+        } else {
+            success = mNfcAdapter.disableNdefPush();
+        }
+        if (success) {
+            mActionBarSwitch.setChecked(desiredState);
+        }
+        mActionBarSwitch.setEnabled(true);
+    }
+}
diff --git a/src/com/android/settings/nfc/NfcEnabler.java b/src/com/android/settings/nfc/NfcEnabler.java
index c7a2d60..018b8ae 100644
--- a/src/com/android/settings/nfc/NfcEnabler.java
+++ b/src/com/android/settings/nfc/NfcEnabler.java
@@ -23,6 +23,9 @@
 import android.nfc.NfcAdapter;
 import android.preference.CheckBoxPreference;
 import android.preference.Preference;
+import android.preference.PreferenceScreen;
+
+import com.android.settings.R;
 
 /**
  * NfcEnabler is a helper to manage the Nfc on/off checkbox preference. It is
@@ -32,6 +35,7 @@
 public class NfcEnabler implements Preference.OnPreferenceChangeListener {
     private final Context mContext;
     private final CheckBoxPreference mCheckbox;
+    private final PreferenceScreen mAndroidBeam;
     private final NfcAdapter mNfcAdapter;
     private final IntentFilter mIntentFilter;
 
@@ -46,14 +50,17 @@
         }
     };
 
-    public NfcEnabler(Context context, CheckBoxPreference checkBoxPreference) {
+    public NfcEnabler(Context context, CheckBoxPreference checkBoxPreference,
+            PreferenceScreen androidBeam) {
         mContext = context;
         mCheckbox = checkBoxPreference;
+        mAndroidBeam = androidBeam;
         mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
 
         if (mNfcAdapter == null) {
             // NFC is not supported
             mCheckbox.setEnabled(false);
+            mAndroidBeam.setEnabled(false);
             mIntentFilter = null;
             return;
         }
@@ -97,18 +104,28 @@
         case NfcAdapter.STATE_OFF:
             mCheckbox.setChecked(false);
             mCheckbox.setEnabled(true);
+            mAndroidBeam.setEnabled(false);
+            mAndroidBeam.setSummary(R.string.android_beam_disabled_summary);
             break;
         case NfcAdapter.STATE_ON:
             mCheckbox.setChecked(true);
             mCheckbox.setEnabled(true);
+            mAndroidBeam.setEnabled(true);
+            if (mNfcAdapter.isNdefPushEnabled()) {
+                mAndroidBeam.setSummary(R.string.android_beam_on_summary);
+            } else {
+                mAndroidBeam.setSummary(R.string.android_beam_off_summary);
+            }
             break;
         case NfcAdapter.STATE_TURNING_ON:
             mCheckbox.setChecked(true);
             mCheckbox.setEnabled(false);
+            mAndroidBeam.setEnabled(false);
             break;
         case NfcAdapter.STATE_TURNING_OFF:
             mCheckbox.setChecked(false);
             mCheckbox.setEnabled(false);
+            mAndroidBeam.setEnabled(false);
             break;
         }
     }
