Hi Mark. Thanks a lot. That worked a treat. I have since changed my code so I've now dynamically created a BroadcastReceiver in my main class (using registerReceiver) instead of the manifest file as its more accessible to my BluetoothTest activity. Having it locked away in a seperate class seemed very obstructive and unintitive. Any thoughts on this?
Steve On Jul 8, 11:31 am, Mark Murphy <mmur...@commonsware.com> wrote: > Your action string is wrong. It should be: > > android.bluetooth.adapter.action.DISCOVERY_STARTED > > See: > > http://developer.android.com/reference/android/bluetooth/BluetoothAda... > > > > > > > > > > On Fri, Jul 8, 2011 at 6:28 AM, Steven Bruce <stevebruc...@gmail.com> wrote: > > Hi > > > I am trying to add a broadcast receiver to my program. In my manifest > > file I have set up the receiver correctly (I think) in my manifest > > file like this: > > > <receiver android:name=".BluetoothReceiver" android:enabled="true"> > > <intent-filter> > > <action > > android:name="android.bluetooth.device.action.DISCOVERY_STARTED"></ > > action> > > </intent-filter> > > </receiver> > > > I have setup my class 'BluetoothReceiver' which should print a message > > to the debug screen: > > > public class BluetoothReceiver extends BroadcastReceiver { > > > @Override > > public void onReceive(Context context, Intent intent) { > > System.out.println("Discovery has started"); > > } > > } > > > However it never reaches this point. Yes bluetooth is enabled and > > setup correctly. Yes I am calling startDiscovery() to start the search > > process. What am I missing here?? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en