Skip to content

Conversation

@steelbrain
Copy link

setPayloadData was defined but wasn't being used. This makes sure to set the payload data on GCM messages


String actionName = intent.getAction();
if (IterableConstants.ACTION_PUSH_ACTION.equalsIgnoreCase(actionName)) {
IterableApi.sharedInstance.setPayloadData(intent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to move this to line 84, before the calls to setNotificationData and trackPushOpen.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Taken care of

@steelbrain steelbrain force-pushed the steelbrain/set-payload-data branch from e7fefdb to 2a1e50c Compare July 26, 2018 22:19
@vbabenkoru
Copy link
Contributor

Awesome, thank you for catching that @steelbrain!

@vbabenkoru vbabenkoru merged commit a7a22a9 into Iterable:master Jul 26, 2018
@steelbrain steelbrain deleted the steelbrain/set-payload-data branch July 26, 2018 22:21
@steelbrain
Copy link
Author

@vbabenkoru Thoughts on a new method getAllPayloadData on IterableAPI that returns a JSON object with all the extras?

Currently we have to get each payload key one by one and it cannot be used, which doesn't work if keys are dynamic (unless we wrap the dynamic top level keys into a namespace object like "tb")

@vbabenkoru
Copy link
Contributor

Yeah, we can add getPayloadData() that would return the entire bundle I think.

@codecov
Copy link

codecov bot commented Jul 26, 2018

Codecov Report

Merging #50 into master will increase coverage by 0.4%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #50     +/-   ##
=========================================
+ Coverage   54.26%   54.66%   +0.4%     
=========================================
  Files          24       24             
  Lines        1360     1361      +1     
  Branches      142      142             
=========================================
+ Hits          738      744      +6     
+ Misses        532      526      -6     
- Partials       90       91      +1
Impacted Files Coverage Δ
...erable/iterableapi/IterablePushActionReceiver.java 67.27% <100%> (+0.6%) ⬆️
...ain/java/com/iterable/iterableapi/IterableApi.java 48.9% <0%> (+1.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca52455...2a1e50c. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants