예제 #1
0
 // =======================================================================================
 // 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);
 }
예제 #2
0
        /// <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)
            {
            }
        }
예제 #3
0
파일: Toast.cs 프로젝트: hakeemsm/XobotOS
		// =======================================================================================
		// 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;
		}