Proposal to change the Java Sender Builder API
by Sebastien Blanc
Hi,
Currently in the Java Sender Library the pushApplicationId and the
masterSecret are part of the UnifiedPushMessage object. I would like to
move these 2 fields to the Sender object and add it to its Builder API, to
have something like :
JavaSender defaultJavaSender = new
SenderClient.Builder("http://localhost:8080/ag-push")
.pushApplicationId("c7fc6525-5506-4ca9-9cf1-55cc261ddb9c")
.masterSecret("8b2f43a9-23c8-44fe-bee9-d6b0af9e316b")
.build();
Why ?
- Regarding design, these 2 fields are more part of the sender rather
than the message itself
- This is a first step to externalize the configuration, so we could
have later, for instance, `JavaSender defaultJavaSender = new
SenderClient.Config("path.to.config(or resource stream")
What does it change ?
- It only concerns the Java Sender, we do not touch the Rest Sender API
here.
- A Sender instance is now bounded to a particular PushApp, so if we
want to send a message to another PushApp we should :
- Create a new instance of the Sender
- Expose setters to update the config.
So , wdyt ?
10 years, 1 month
Cordova push-config.json generated in UPS Console - multiple variants
by Lukáš Fryč
Hey guys,
the feature of UPS Console where you can generate push-config.json under
the Example implementation is pretty cool:
{
"pushServerURL": "http://localhost:8080/ag-push/",
"android" : {
"senderID": "234",
"variantID": "a85cdfad-969c-4ab3-80bd-65a661bfd1a1",
"variantSecret": "da2ffc3a-96bf-4ee1-81fe-92721569c407"
}
}
I would like to build on top of it.
Especially for demo purposes, it would be nice to generate multi-variant
configs at once, such as bellow.
But the problem comes when you have more variants per one type, I have some
ideas here:
a) generate multi-configs and include all variants with comments what
config stands for what variant
b) generate multi-configs ONLY when there is at most one variant per type
c) use alternative approach and allow to generate push-config.json
according to user-selected variants (selection such as in Send Push feature)
WDYT?
{
"pushServerURL": "http://localhost:8080/ag-push/",
"android" : {
"senderID": "234",
"variantID": "a85cdfad-969c-4ab3-80bd-65a661bfd1a1",
"variantSecret": "da2ffc3a-96bf-4ee1-81fe-92721569c407"
},
"ios" : {
...
},
"windows" : {
...
},
"firefoxos" : {
...
}
}
10 years, 1 month