Example #1
0
        public override void onPause()
        {
            base.onPause();

            if (mSession != null)
            {
                mSession.onPause();
            }

            mNotifyBuilder = (new NotificationCompat.Builder(this)).setContentTitle(this.Title).setContentText(Resources.getString([email protected])).setSmallIcon(R.drawable.ic_launcher).setOngoing(true);

            Intent notificationIntent = new Intent(this, typeof(MultipartyActivity));

            notificationIntent.Flags = Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP;
            PendingIntent intent = PendingIntent.getActivity(this, 0, notificationIntent, 0);

            mNotifyBuilder.ContentIntent = intent;

            if (mConnection == null)
            {
                mConnection = new ServiceConnectionAnonymousInnerClassHelper(this);
            }

            if (!mIsBound)
            {
                bindService(new Intent(MultipartyActivity.this, typeof(ClearNotificationService)), mConnection, Context.BIND_AUTO_CREATE);
                mIsBound = true;
                startService(notificationIntent);
            }
        }
Example #2
0
 // The activity manager dispatched a broadcast to a registered
 // receiver in this process, but before it could be delivered the
 // receiver was unregistered.  Acknowledge the broadcast on its
 // behalf so that the system's broadcast sequence can continue.
 public android.app.IServiceConnection getServiceDispatcher(android.content.ServiceConnection
                                                            c, android.content.Context context, android.os.Handler handler, int flags)
 {
     lock (mServices)
     {
         android.app.LoadedApk.ServiceDispatcher sd = null;
         java.util.HashMap <android.content.ServiceConnection, android.app.LoadedApk.ServiceDispatcher
                            > map = mServices.get(context);
         if (map != null)
         {
             sd = map.get(c);
         }
         if (sd == null)
         {
             sd = new android.app.LoadedApk.ServiceDispatcher(c, context, handler, flags);
             if (map == null)
             {
                 map = new java.util.HashMap <android.content.ServiceConnection, android.app.LoadedApk
                                              .ServiceDispatcher>();
                 mServices.put(context, map);
             }
             map.put(c, sd);
         }
         else
         {
             sd.validate(context, handler);
         }
         return(sd.getIServiceConnection());
     }
 }
Example #3
0
 internal ServiceDispatcher(android.content.ServiceConnection conn, android.content.Context
                            context, android.os.Handler activityThread, int flags)
 {
     mIServiceConnection = new android.app.LoadedApk.ServiceDispatcher.InnerConnection
                               (this);
     mConnection     = conn;
     mContext        = context;
     mActivityThread = activityThread;
     mLocation       = new android.app.ServiceConnectionLeaked(null);
     XobotOS.Runtime.Util.FillInStackTrace(mLocation);
     mFlags = flags;
 }
Example #4
0
			internal ServiceDispatcher(android.content.ServiceConnection conn, android.content.Context
				 context, android.os.Handler activityThread, int flags)
			{
				mIServiceConnection = new android.app.LoadedApk.ServiceDispatcher.InnerConnection
					(this);
				mConnection = conn;
				mContext = context;
				mActivityThread = activityThread;
				mLocation = new android.app.ServiceConnectionLeaked(null);
				XobotOS.Runtime.Util.FillInStackTrace(mLocation);
				mFlags = flags;
			}
Example #5
0
 public override void unbindService(android.content.ServiceConnection conn)
 {
     mBase.unbindService(conn);
 }
Example #6
0
 public override bool bindService(android.content.Intent service, android.content.ServiceConnection
                                  conn, int flags)
 {
     return(mBase.bindService(service, conn, flags));
 }
		public override void onPause()
		{
			base.onPause();

			if (mSession != null)
			{
				mSession.onPause();
			}

			mNotifyBuilder = (new NotificationCompat.Builder(this)).setContentTitle(this.Title).setContentText(Resources.getString([email protected])).setSmallIcon(R.drawable.ic_launcher).setOngoing(true);

			Intent notificationIntent = new Intent(this, typeof(MultipartyActivity));
			notificationIntent.Flags = Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP;
			PendingIntent intent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
			mNotifyBuilder.ContentIntent = intent;

			if (mConnection == null)
			{
				mConnection = new ServiceConnectionAnonymousInnerClassHelper(this);
			}

			if (!mIsBound)
			{
				bindService(new Intent(MultipartyActivity.this, typeof(ClearNotificationService)), mConnection, Context.BIND_AUTO_CREATE);
				mIsBound = true;
				startService(notificationIntent);
			}

		}
Example #8
0
 public android.app.IServiceConnection forgetServiceDispatcher(android.content.Context
                                                               context, android.content.ServiceConnection c)
 {
     throw new System.NotImplementedException();
 }