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

I am getting null pointer exception when i tried to download file from dropbox
Cannot solve getMapAsync in Fragment
How to load local image in Android WebView
Press back button twice to exit an AIR android application
How to change my tab page when onCreateView in Fragment
Problems importing an Eclipse project into Android Studio
Multiple app icons being installed when using Flavors and multiple manifest files
In twitter integration gives error com.twitter.sdk.android.core.TwitterAuthException: Authorize failed.How to solve this?
What's the correct way to downgrade your Android app?
Listen checkbox of the MultiChoiceItem in AlertDialog Android
How to solve unable to locate adb(IllegalArgumentException) in android studio?
OnClick event not working in achartengine Doughnut chart in android?
Cordova on Android, parse error [duplicate]
Is reading config file at android app start a security issue?
Android in-app billing - Why use Integer.valueOf(0)?
SearchView like in Telegram app with arrow animation

Categories

HOME
google-app-engine
jpa
forms
depth
flex
devise
spring-data-redis
sublimetext
regular-language
mapbox
p2p
syntaxnet
augeas
gource
docx
null-pointer
imessage
symfony-console
question2answer
pagespeed
systemtime
object-storage
interpreter
asymptotic-complexity
inversion-of-control
jaws
aws-codecommit
hard-drive
hunspell
modalviewcontroller
swagger-php
reactivekit
timing
setup.py
azure-arm
plaintext
glm-math
lpsolve
tcc
strftime
dynamic-linq
textsum
manova
context-switch
azure-cli
juice-ui
docpad
cudd
flex4.6
greatest-n-per-group
dimension
android-dateutils
jclouds
halcon
exim4
vigenere
google-books
android-launcher
opserver
sha512
graphics2d
nsurlsessiondatatask
iiop
pseudo-class
teaspoon
appserver
nsmenu
ora-00904
extjs2
maven-scm
mt4j
notorm
model-driven-development
printdialog
jquery-1.9
intersect
android-loadermanager
saleslogix
objectquery
jdb
mapping-by-code
agility.js
load-time
maven-1
tui
cuda.net

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