3

I try to make my Google Glass discoverable via Bluetooth in my app by calling the flowing intent:

Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); 
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 120);
startActivity(discoverableIntent);

But I get the following error message:

Unable to start activity ComponentInfo{com.example.glass/com.example.MainActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.bluetooth.adapter.action.REQUEST_DISCOVERABLE (has extras)` }

Does anyone know if this intent is supported by Google Glass right now or not?

Of course I made sure that I set the permissions in my Manifest file:

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
andfich
  • 31
  • 2

1 Answers1

0

That error is occurring because Glass does not have an activity registered to handle displaying the UI for that action.

Can you file a feature request in our issue tracker if you need this?

In the meantime, have you explored the workaround in this post/answer to see if it would work for you?

Community
  • 1
  • 1
Tony Allevato
  • 6,429
  • 1
  • 29
  • 34