Back to project page AsteroidGetLocationOverBT.
The source code is released under:
Apache License
If you think the Android project AsteroidGetLocationOverBT listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.freak.fidji.locationoverbt; //from ww w .ja v a 2 s. c o m import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class BtEventsReceiver extends BroadcastReceiver { public static final String ACTION_EXTRA = "CONNECTION_STATE"; private static final String TAG = "BT_EVENT_RECEIVER"; private static final boolean DEBUG = true; public BtEventsReceiver() { } @Override public void onReceive(Context context, Intent intent) { if (DEBUG) Log.d(TAG, "Intent received"); Intent newIntent = new Intent(context, ManagerService.class); newIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE)); newIntent.putExtra(ACTION_EXTRA, intent.getAction()); context.startService(newIntent); } }