// ======================================================================================= // All the gunk below is the interaction with the Notification Service, which handles // the proper ordering of these system-wide. // ======================================================================================= private static android.app.INotificationManager getService() { if (sService != null) { return(sService); } sService = android.app.INotificationManagerClass.Stub.asInterface(android.os.ServiceManager .getService("notification")); return(sService); }
/// <summary>Show the view for the specified duration.</summary> /// <remarks>Show the view for the specified duration.</remarks> public virtual void show() { if (mNextView == null) { throw new java.lang.RuntimeException("setView must have been called"); } android.app.INotificationManager service = getService(); string pkg = mContext.getPackageName(); android.widget.Toast.TN tn = mTN; tn.mNextView = mNextView; try { service.enqueueToast(pkg, tn, mDuration); } catch (android.os.RemoteException) { } }
// ======================================================================================= // All the gunk below is the interaction with the Notification Service, which handles // the proper ordering of these system-wide. // ======================================================================================= private static android.app.INotificationManager getService() { if (sService != null) { return sService; } sService = android.app.INotificationManagerClass.Stub.asInterface(android.os.ServiceManager .getService("notification")); return sService; }