@@ -46,10 +46,18 @@ public Notification build() {
4646 @ Override
4747 public void run () {
4848 final RemoteViews contentView = notification .contentView ;
49- //Picasso.with(mContext).load(imageUrl).into(contentView, iconId, requestCode, notification);
5049 if (android .os .Build .VERSION .SDK_INT >= android .os .Build .VERSION_CODES .JELLY_BEAN ) {
5150 final RemoteViews bigContentView = notification .bigContentView ;
52- Picasso .with (mContext ).load (imageUrl ).into (bigContentView , bigIconId , requestCode , notification );
51+
52+ try {
53+ Class picassoClass = Class .forName (IterableConstants .PICASSO_CLASS );
54+ if (picassoClass != null ) {
55+ Picasso .with (mContext ).load (imageUrl ).into (bigContentView , bigIconId , requestCode , notification );
56+ }
57+ } catch (ClassNotFoundException e ) {
58+ IterableLogger .w (TAG , "ClassNotFoundException: Check that picasso is added " +
59+ "to the build dependencies" , e );
60+ }
5361 }
5462 }
5563 });
@@ -99,7 +107,7 @@ public static IterableNotification createNotification(Context context, Bundle ex
99107 .setContentTitle (applicationName )
100108 .setPriority (Notification .PRIORITY_HIGH )
101109 .setContentText (notificationBody );
102-
110+
103111 if (pushImage != null ) {
104112 notificationBuilder .imageUrl = pushImage ;
105113 notificationBuilder .setContentText (notificationBody )
0 commit comments