android


NotificationCompat.BigTextStyle not displaying big text and not multiple lines in android


I have applied BigTextStyle to NotificationCompat.Builder , but it will not display big text in notification list.
i have used bellow code.
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
intent,
PendingIntent.FLAG_ONE_SHOT);
NotificationCompat.BigTextStyle bigxtstyle =
new NotificationCompat.BigTextStyle()
.bigText(data.getMessage())
.setBigContentTitle(title)
.setSummaryText(data.getMessage());
Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setStyle(bigxtstyle)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle(title)
.setContentText(data.getMessage())
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent)
.setPriority(NotificationCompat.PRIORITY_MAX)
.setLargeIcon(BitmapFactory.decodeResource(getResources(),R.mipmap.ic_launcher));
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(id, notificationBuilder.build());

Related Links

handle emptylist and asynctask
SoftKeyboard does not display for a newly displayed Fragment
android animation switching UI and the active class
Update ListView after deleting from database android
How to update an app widget on midnight?
How to implement voice & video chat
Trouble writing and reading image from/to internal memory on Android tablet (3.1)
How can we create interactive 3d 360 degree Gallery in android?
Delete cache folder in Flash Builder mobile android app
How to share something over LinkedIn in android?
Processing Android video frame by frame while recording
Android Socket Exception “socket is closed”
How to create a private android application download server
Trouble converting an editable to a string (username/password test)
Detect location change in android
How to change the text color of the error popup for an EditText?

Categories

HOME
url-redirection
scikit-learn
delphi-7
fuelux
awk
3d
interface
components
spring-data-redis
nuget
alarm
tivoli
code-coverage
banner
trac
odoo-8
character
categorical-data
openpyxl
enthought
gource
scrolltop
coin3d
modbus-tcp
standards
digital-signature
delphi-xe5
microsoft-ocr
spring-async
libigl
gulp-watch
tosca
stackexchange
corpus
fractions
bringtofront
comparable
sqsh
angularjs-material
hibernate-validator
browser-extension
amazon-ses
google-data-api
azure-arm
android-softkeyboard
branching-and-merging
android-ibeacon
linqpad
contract
carrot2
context-sensitive-grammar
oozie-coordinator
seq
mathcad
android-instrumentation
pocketsphinx-android
rmongo
adafruit
macaulay2
stream-processing
ikiwiki
decimalformat
sciruby
avisynth
lazybones
pax-exam
mod-proxy
finalbuilder
apache-commons-daemon
bufferedinputstream
zxspectrum
broadband
phpldapadmin
public-html
post-commit-hook
grails-plugin-rabbitmq
authlogic
websphere-esb
http-patch
windows-phone-8-sdk
scringo
cmmi
font-awesome-4.0.0
virtual-pc
fragmenttransaction
jquery-blockui
saleslogix
subgraph
failing-tests
google-maps-mobile
lr
jqote
cdonts
mtu
qglwidget
timertask
updatesourcetrigger
opml
scrubyt
todos
int64
business-model
leader
netbeans6.1

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App