You should check out Notification.Builder
, particularly setStyle()
:
http://developer.android.com/reference/android/app/Notification.Builder.html
and then Notification.BigPictureStyle
should allow you to show an image like you desire:
http://developer.android.com/reference/android/app/Notification.BigPictureStyle.html
Edited with code sample, since you're processing the Bitmap as well, I've added an AsyncTask so that the processing doesn't occur on the UI thread:
else{
new AsyncTask<Void, Void, Void>(){
public Void doInBackround(Void... args){
PendingIntent pending = PendingIntent.getActivity(arg0.getContext(), 0, new Intent(arg0.getContext(),MainActivity.class), 0);
Bitmap bmp = BimapFactory.decodeResource(arg0.getContext().getResources(), R.id.my_img);
notification = new NotificationCompat.Builder(arg0.getContext())
.setContentTitle("I want to...")
.setContentText(Text)
.setContentIntent(pending)
.setSmallIcon(R.drawable.ic_launcher)
.setStyle(new NotificationCompat.BigPictureStyle()
.bigPicture(bmp))
.build();
notificationmanager = (NotificationManager)arg0.getContext().getSystemService(Context.NOTIFICATION_SERVICE);
notificationmanager.notify(notificationId, notification);
notificationId++;
}
}.execute();
}