ARIJIT
ARIJIT

Reputation: 515

Expanded Notification Using Android 2.3.3 SDK

I am getting the notification in status bar but if the text is long, then it is not displaying the whole text. My requirement is to show the whole text. I founded that it can be done using Notification Builder. As in the Below code:

Notification notification = new Notification.BigTextStyle(builder)

But it will only for support Android 3.0 and above. Right now I can't change my sdk because there are many things which I am using like Gallery, has been deprecated for above versions. So please suggest me if using Android 2.3.3, I can achieve expanded notification or not.

Thanks in Advance

Upvotes: 0

Views: 854

Answers (1)

Selvin
Selvin

Reputation: 6797

short answer is No, you can't...

long answer is:

You have to change target SDK(you can still use Gallery, but it will better to rewrite this code)

EDIT: anyway even in doc's we have statement: To maintain your application along with each Android release, you should increase the value of this attribute to match the latest API level, then thoroughly test your application on the corresponding platform version.

and as i wrote in comment deprecated in programming it means try to avoid this class/method, it still will works, but from now, there are better classes/methods for doing this

now you have 2 choices:

first, use NotificationCompat.Builder from support v4 library ... but on devices with version lower than 4.1 it will only show text

second, make own custom notification for devices with version lower than 4.1 and use new API on other ...

Upvotes: 1

Related Questions