I am trying to do a notification on api level 10 and below is my code but im getting a syntax error setLatestEventInfo cannot be resolved. I am guessing its something to do
If your compile SDK version is set to api 23+ you'll see this issue. This method was removed in M (api 23).
To do notifications for api 4 onwards you can use the NotificationCompat.Builder which was added in the Android Support Library. The Android Documentation has a decent example:
Notification noti = new Notification.Builder(mContext)
.setContentTitle("New mail from " + sender.toString())
.setContentText(subject)
.setSmallIcon(R.drawable.new_mail)
.setLargeIcon(aBitmap)
.build();
You can replace "Notification.Builder" for "NotificationCompat" if need to support older api versions.