September 27th, 2012, 09:33 AM
|
#1 (permalink)
|
|
New Member
Thread Author (OP)
Join Date: Mar 2012
Location: Manchester, England
Posts: 7
Device(s): Sony Xperia Tipo
Carrier: Not Provided
Thanks: 0
Thanked 0 Times in 0 Posts
|
Notification builder
I found this problem.
Get the sample code from developer.android.com
PHP Code:
Notification noti = new Notification.Builder(mContext)
.setContentTitle("New mail from " + sender.toString())
.setContentText(subject)
.setSmallIcon(R.drawable.new_mail)
.setLargeIcon(aBitmap)
.build();
and when you put it into eclipse you get this error.
"The method build() is undefined for the type Notification.Builder"
Turns out I was using the wrong api. This only works with api 16 or greater, I was using 15.
|
|
|
Last edited by MunterMan; September 27th, 2012 at 09:44 AM.
Reason: My bad, wrong api
|
|