Test events were not received – Android Studio-ThrowExceptions

Exception or error: I have no idea how to test and I was following a tutorial.I am trying to run: package name.company.sunshine.app.data; import android.test.AndroidTestCase; public class TestPractice extends AndroidTestCase { /* This gets run before every test. */ @Override protected void setUp() throws Exception { super.setUp(); } public void testThatDemonstratesAssertions() throws Throwable { int a …

Android Broadcast Receiver bluetooth events catching-ThrowExceptions

Exception or error: I’m trying to catch bluetooth state changes with Broadcast Receiver. My manifest: <uses-permission android:name=”android.permission.BLUETOOTH” /> <application> <activity android:name=”.MainActivity” android:label=”@string/app_name” > <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity> <receiver android:name=”.BluetoothBroadcastReceiver” android:label=”@string/app_name”> <intent-filter> <action android:name=”android.bluetooth.adapter.action.STATE_CHANGED” /> <action android:name=”android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED” /> <action android:name=”android.bluetooth.device.action.ACL_CONNECTED” /> <action android:name=”android.bluetooth.device.action.ACL_DISCONNECTED” /> </intent-filter> </receiver> </application> Receiver onReceive method: public …