title: Unable to find explicit activity class (Bluetooth)
body: <p>Good Morning </p>
  
  <p>I am trying to send excel file to a PC via Bluetooth, but I am getting the following error:</p>
  
  <pre><code>android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.bluetooth/com.android.bluetooth.opp.BluetoothOppLauncherActivity}; have you declared this activity in your AndroidManifest.xml?
  </code></pre>
  
  <p>My code for handling sending operation is:</p>
  
  <pre><code>private void ShareReportToPc() {
          File file = new File(Environment.getExternalStorageDirectory() + "/CoiAppFiles/COI-Report.xls");
          Intent intent = new Intent(Intent.ACTION_SEND);
          intent.setType("application/excel");
          intent.setClassName("com.android.bluetooth", "com.android.bluetooth.opp.BluetoothOppLauncherActivity");
          intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
          startActivity(intent);
      }
  </code></pre>
  
  <p>And the code of Manifest is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="iq.nazaha.wissam.CoiApp"&gt;
  
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt;
      &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /&gt;
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/Theme.AppCompat.NoActionBar"&gt;
          &lt;activity
              android:name=".LoginPage"
              android:configChanges="orientation"
              android:screenOrientation="portrait"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity
              android:name=".MainPage"
              android:configChanges="orientation"
              android:screenOrientation="portrait" /&gt;
          &lt;activity
              android:name=".AddNewItemPage"
              android:configChanges="orientation"
              android:screenOrientation="portrait" /&gt;
          &lt;activity
              android:name=".EditItemPage"
              android:configChanges="orientation"
              android:screenOrientation="portrait" /&gt;
          &lt;activity
              android:name=".ReportsPage"
              android:configChanges="orientation"
              android:screenOrientation="portrait" /&gt;
          &lt;activity
              android:name=".AboutPage"
              android:configChanges="orientation"
              android:screenOrientation="portrait" /&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I searched many answers, some of them suggests to include the name of the activity in the AndroidManifest which I already did, others suggests to clean the project but it didn't solve the problem. I believe its very silly mistake but I became blind. Any help please?</p>