public static void updateMediaNotificationForTab(Context context,int tabId,boolean audio,boolean video,String fullUrl){
  int mediaType=getMediaType(audio,video);
  if (!shouldStartService(context,mediaType,tabId))   return;
  Intent intent=new Intent(context,MediaCaptureNotificationService.class);
  intent.putExtra(NOTIFICATION_ID_EXTRA,tabId);
  String baseUrl=fullUrl;
  try {
    URL url=new URL(fullUrl);
    baseUrl=url.getProtocol() + "://" + url.getHost();
  }
 catch (  MalformedURLException e) {
    Log.w(TAG,"Error parsing the webrtc url " + fullUrl);
  }
  intent.putExtra(NOTIFICATION_MEDIA_URL_EXTRA,baseUrl);
  intent.putExtra(NOTIFICATION_MEDIA_TYPE_EXTRA,mediaType);
  context.startService(intent);
}

public static void updateMediaNotificationForTab ( Context context , int tabId , boolean audio , boolean video , String fullUrl ) { int mediaType = getMediaType ( audio , video ) ; if ( ! shouldStartService ( context , mediaType , tabId ) ) return ; Intent intent = new Intent ( context , MediaCaptureNotificationService . class ) ; intent . putExtra ( NOTIFICATION_ID_EXTRA , tabId ) ; String baseUrl = fullUrl ; try { URL url = new URL ( fullUrl ) ; baseUrl = url . getProtocol ( ) + "://" + url . getHost ( ) ; } catch ( MalformedURLException e ) { Log . w ( TAG , "Error parsing the webrtc url " + fullUrl ) ; } intent . putExtra ( NOTIFICATION_MEDIA_URL_EXTRA , baseUrl ) ; intent . putExtra ( NOTIFICATION_MEDIA_TYPE_EXTRA , mediaType ) ; context . startService ( intent ) ; }
send an intent to mediacapturenotificationservice to either create , update or destroy the notification identified by tabid .
