Browse Source

message body

master
Gregor Wüst 4 years ago
parent
commit
f0ee27f089

+ 6
- 0
fcm/.idea/vcs.xml View File

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

+ 0
- 3
fcm/app/src/main/AndroidManifest.xml View File

android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.App"> android:theme="@style/Theme.App">


<service android:name=".MyFirebaseMessagingService" <service android:name=".MyFirebaseMessagingService"
android:exported="false"> android:exported="false">
<intent-filter> <intent-filter>
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>

</manifest> </manifest>

+ 1
- 1
fcm/app/src/main/java/com/example/fcm/MainActivity.java View File

buttonSend.setOnClickListener(v -> { buttonSend.setOnClickListener(v -> {
TOPIC = "/topics/testForMDT"; //topic must match with what the receiver subscribed to TOPIC = "/topics/testForMDT"; //topic must match with what the receiver subscribed to
NOTIFICATION_TITLE = "Test"; NOTIFICATION_TITLE = "Test";
NOTIFICATION_MESSAGE = "Hello World";
NOTIFICATION_MESSAGE = "Gregor";


JSONObject notification = new JSONObject(); JSONObject notification = new JSONObject();
JSONObject notifcationBody = new JSONObject(); JSONObject notifcationBody = new JSONObject();

+ 0
- 1
fcm/app/src/main/res/values-night/styles.xml View File

<item name="colorPrimaryDark">@color/purple700</item> <item name="colorPrimaryDark">@color/purple700</item>
<item name="colorAccent">@color/teal200</item> <item name="colorAccent">@color/teal200</item>
</style> </style>

</resources> </resources>

Loading…
Cancel
Save