Receiver implemented

This commit is contained in:
Paul 2020-10-21 17:14:05 +02:00
parent dff3b75f2c
commit 3c769ef513
3 changed files with 22 additions and 1 deletions

View File

@ -16,6 +16,12 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".TestReceiver">
<intent-filter>
<action android:name="com.ploedige.BroadcastReceiver.intentfilters.TESTBROADCAST"/>
</intent-filter>
</receiver>
</application>
</manifest>

View File

@ -0,0 +1,14 @@
package com.ploedige.broadcastreceiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class TestReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.v("IntentFilterTest","Broadcast Received!");
}
}

View File

@ -9,7 +9,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:text="This is the Receiver App"
android:textSize="5mm"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"