Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Documentation issue of Android pictures push #1028

Closed
slorber opened this issue Jun 28, 2016 · 7 comments
Closed

Documentation issue of Android pictures push #1028

slorber opened this issue Jun 28, 2016 · 7 comments
Labels
Milestone

Comments

@slorber
Copy link
Contributor

slorber commented Jun 28, 2016

Hi,

Great picture option :)

Just a few details seems unclear to me in doc.
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#picture-messages

The doc payload uses both title/message/summaryText, but it seems in the doc screenshot, the message param is simply ignored.

For me there's something not clear here, and it seems different from what happens with inbox stacking (as 3 fields get displayed).

According to current doc, I don't really understand, should I set message, or summaryText, or both (using the same value?) because in the screenshot in the end it seems only one get displayed.

Maybe there's an error in doc or something I'm missing?


Also I would have liked a little explaination on the impact of picture size of the performances.

According to source code it seems that it's the plugin Android code that downloads the image synchronously to display the push:

        } else if (STYLE_PICTURE.equals(style)) {
            setNotification(notId, "");

            NotificationCompat.BigPictureStyle bigPicture = new NotificationCompat.BigPictureStyle();
            bigPicture.bigPicture(getBitmapFromURL(extras.getString(PICTURE)));
            bigPicture.setBigContentTitle(fromHtml(extras.getString(TITLE)));
            bigPicture.setSummaryText(fromHtml(extras.getString(SUMMARY_TEXT)));

            mBuilder.setContentTitle(fromHtml(extras.getString(TITLE)));
            mBuilder.setContentText(fromHtml(message));

            mBuilder.setStyle(bigPicture);
        }

getBitmapFromURL could take a long time according to the image size, so it's worth mentionning that the push delivery time is affected by the size of the push picture to download, and that a download failure will result in a push message without picture

Thanks

@macdonst macdonst added the docs label Jun 28, 2016
@macdonst
Copy link
Member

@slorber I'll double check the payload for big picture, I think I may need to update the screen shot.

And I'll write up some notes on the affect of picture size and download failure.

@macdonst macdonst added this to the Release 1.8.0 milestone Jun 28, 2016
@fredgalvao
Copy link
Collaborator

Could we use links to images using _blank instead of inlining the images? Having to load the images break up pretty much every anchor the docs have, for the browser scrolls to the anchor before images load (and then it's not in the right spot when they do load).

@macdonst
Copy link
Member

@fredgalvao then I'd have to find an image host and I'm so lazy.

@slorber
Copy link
Contributor Author

slorber commented Jun 29, 2016

thanks @macdonst

@macdonst
Copy link
Member

@slorber I just added a note to the doc. When expanded you see the title, summary text and picture. When not expanded you see the title and body.

@slorber
Copy link
Contributor Author

slorber commented Jun 30, 2016

thanks!

Will try to check that on a phone soon

@lock
Copy link

lock bot commented Jun 4, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants