Azure / Azure/azure-notificationhubs-android

Registering template with nested payload

Open
#308 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
33
Forks
65
PR merge metrics
No merged PRs in 30d

Description

**Query/Question**

In Android(FCM v1)/APN, How is it possible to register with a nested template? for example, I want the notification I send have some other properties in nested form, i.e

`
{
"message": "Simple notification message"
"object1":{
"prop1": "value 1",
"prop2": "value 2"
}
`
For Android, I have:

`String templateBody =
"{\"message\":{\"android\":{\"data\":{\"message\":\"$(message)\",\"object1\":{\"prop1\":\"$(prop1)\", \"prop2\":\"$(prop2)\"}}}}}";
`
it gets registered, but not receive notifications when I do send JSON body notifications with REST API in Postman like this:

`
{
"message": "Simple notification message",
"object1": {
"prop1": "value 1",
"prop2": "value 2"
}
}
`

If I don't use nested objects after message and just use a property, I'll work fine.
What could go wrong here?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue mentions the Android template body and REST API request but names no repository files, tests, or entry points. Start by locating the template registration and nested-payload handling, then reproduce the FCM/APN request to determine whether nested properties are supported and what successful delivery should look like.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.