when I'm sending notification with image banner (Android) only one text line is displayed, no matter what is the image size alt text

asked 11 Jul '16, 09:15
inon's gravatar image

inon
31115

Hello,

You encountered that issue because of the push notification content.

Pushwoosh SDK automatically chooses an appropriate notification style by analyzing its content. If a push contains a picture, SDK assigns a BigPictureStyle notification type. If a push contains a lot of text and no other media, SDK assigns a BigTextStyle type and etc. By default it cannot be done using Pushwoosh SDK, as Android itself does not allow applying multiple notification styles to one notification.


The only way to do it is to create your own custom notification layout, which would contain specific place for an image and few lines of text. Below you can find a sample for a custom layout using Pushwoosh Notification Factory:

1. CustomContentNotificationFactory.java

code here

2. MainActivity.java

code here

1. notification.xml

code here

2. styles.xml

code here

Regards, Nikita.

permanent link
answered 14 Jul '16, 11:02
novchinnikov's gravatar image

novchinnikov
2015

edited 14 Jul '16, 11:03

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×447
×326
×141

question asked: 11 Jul '16, 09:15

question was seen: 741 times

last updated: 14 Jul '16, 11:03