I would like to ask if someone can give me an example that uses NotificationCompat.Builder with a foreground service. Can anyone do that please?
public void onStartCommand (Intent intent, int flags, int startId) {
    NotificationCompat.Builder  mNotifyBuilder = new NotificationCompat.Builder ( this) 
       .setContentTitle("somthing");
    mNotificationManager.notify (mNotificationId,mNotifyBuilder.build());
}
When I use this in the foreground it refuses, so how can i use them together?