title: Bluetooth LE can't find any device on android 6.0
body: <p>I am building an app that receives data from bluetooth device and is fully functional on a 4.4.4 android smartphone. But when I try it on  version 6.0 devices it does not find the bluetooth devices. I have activated location on the phone and I have added the permissions for location on manifest file but nothing happens.</p>
  
  <p>I have read somewhere that I have to request permission from the user and I have tried to add</p>
  
  <pre><code>ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}, 1001); //Any number
  </code></pre>
  
  <p>on my activity's onCreate, but I get error "cannot resolve symbol AcivityCompat" and "cannot resolve symbol Manifest"...</p>
  
  <p>My build.gradle file is that:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 28
  buildToolsVersion '28.0.3'
  
  defaultConfig {
      applicationId "com.redbear.chat"
      minSdkVersion 18
      targetSdkVersion 26
  }
  
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
      }
  }
  }
  
  dependencies {
  implementation 'com.android.support:support-v4:28.+'
  implementation 'com.google.android.gms:play-services-location:16.0.0'
  }
  </code></pre>
  
  <p>And my manifest file 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="com.redbear.chat"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-feature
      android:name="android.hardware.bluetooth_le"
      android:required="true" /&gt;
  
  &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt;
  &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;!-- Needed only if your app targets Android 5.0 (API level 21) or higher. --&gt;
  &lt;uses-feature android:name="android.hardware.location.gps" /&gt;
  &lt;uses-feature android:name="android.hardware.location.network" /&gt;
  
  
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/redbear"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.redbear.chat.Main"
          android:label="@string/app_name"
          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="com.redbear.chat.Chat"
          android:windowSoftInputMode="stateHidden" &gt;
      &lt;/activity&gt;
      &lt;activity
          android:name=".Device"
          android:theme="@android:style/Theme.Dialog" &gt;
      &lt;/activity&gt;
  
      &lt;service
          android:name="com.redbear.chat.RBLService"
          android:enabled="true" /&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>