Example #1
0
 public PushManager(ShinyCoreServices services,
                    INotificationManager notificationManager,
                    ILogger <IPushManager> logger) : base(services)
 {
     this.notificationManager = notificationManager;
     this.logger      = logger;
     this.receiveSubj = new Subject <PushNotification>();
 }
Example #2
0
        public PushManager(AzureNotificationConfig config, ShinyCoreServices services) : base(services)
#endif
        {
            this.hub = new NotificationHubClient(
                config.ListenerConnectionString,
                config.HubName
                );
        }
Example #3
0
 public HttpClientHttpTransferManager(ShinyCoreServices services,
                                      IJobManager jobManager,
                                      ILogger logger)
 {
     this.Services   = services;
     this.jobManager = jobManager;
     this.logger     = logger;
 }
Example #4
0
 public MotionActivityManagerImpl(ShinyCoreServices core,
                                  AndroidSqliteDatabase database,
                                  ILogger <IMotionActivityManager> logger)
 {
     this.core      = core;
     this.database  = database;
     this.logger    = logger;
     this.client    = ActivityRecognition.GetClient(core.Android.AppContext);
     this.eventSubj = new Subject <MotionActivityEvent>();
 }
Example #5
0
 public BackgroundTask(ShinyCoreServices core,
                       IBleManager centralManager,
                       IBeaconMonitoringManager beaconManager,
                       ILogger <IBeaconMonitorDelegate> logger)
 {
     this.bleManager    = centralManager;
     this.beaconManager = beaconManager;
     this.logger        = logger;
     this.core          = core;
     this.states        = new Dictionary <string, BeaconRegionStatus>();
 }
Example #6
0
 public HttpTransferManager(
     ShinyCoreServices services,
     IJobManager jobManager,
     ILogger <IHttpTransferManager> logger
     ) : base(
         services,
         jobManager,
         logger
         )
 {
 }
Example #7
0
        internal static void SetBadgeCount(this ShinyCoreServices core, int value)
        {
            core.Settings.Set(AndroidBadgeCountKey, value);

            if (value <= 0)
            {
                global::XamarinShortcutBadger.ShortcutBadger.RemoveCount(core.Android.AppContext);
            }
            else
            {
                global::XamarinShortcutBadger.ShortcutBadger.ApplyCount(core.Android.AppContext, value);
            }
        }
Example #8
0
        public ManagerContext(ShinyCoreServices services, BleConfiguration config)
        {
            this.Configuration = config;
            this.services      = services;

            this.devices           = new ConcurrentDictionary <string, Peripheral>();
            this.peripheralSubject = new Subject <NamedMessage <Peripheral> >();
            this.Manager           = services.Android.GetBluetooth();
            //this.StatusChanged
            //    .Skip(1)
            //    .SubscribeAsync(status => Log.SafeExecute(
            //        async () => await this.sdelegate.Value?.OnAdapterStateChanged(status)
            //    ));
        }
Example #9
0
        public NotificationManager(ShinyCoreServices core,
                                   AndroidNotificationManager manager,
                                   IJobManager jobManager)
        {
            this.core       = core;
            this.manager    = manager;
            this.jobManager = jobManager;

            this.core
            .Android
            .WhenIntentReceived()
            .SubscribeAsync(x => this
                            .core
                            .Services
                            .Resolve <AndroidNotificationProcessor>() !
                            .TryProcessIntent(x)
                            );
        }
Example #10
0
        public NotificationManager(ShinyCoreServices core, AndroidNotificationManager manager)
        {
            this.core    = core;
            this.manager = manager;

            this.core
            .Android
            .WhenIntentReceived()
            .Subscribe(x => this
                       .core
                       .Services
                       .Resolve <AndroidNotificationProcessor>()
                       .TryProcessIntent(x)
                       );

            // auto process intent?
            //this.context
            //    .WhenActivityStatusChanged()
            //    .Where(x => x.Status == ActivityState.Created)
            //    .Subscribe(x => TryProcessIntent(x.Activity.Intent));
        }
 public AndroidNotificationManager(ShinyCoreServices core)
 {
     this.core          = core;
     this.NativeManager = NotificationManagerCompat.From(this.core.Android.AppContext);
 }
Example #12
0
 public AndroidNotificationManager(ShinyCoreServices services)
 {
     this.Services      = services;
     this.NativeManager = NotificationManagerCompat.From(this.Services.Android.AppContext);
 }
Example #13
0
 protected AbstractPushManager(ShinyCoreServices services) => this.Services = services;
Example #14
0
 public PushManager(AzureNotificationConfig config,
                    ShinyCoreServices services,
                    ILogger <IPushManager> logger) : base(services, logger)
Example #15
0
 public NotificationManager(ShinyCoreServices services)
 {
     this.services = services;
 }
Example #16
0
 public PushManager(ShinyCoreServices services) : base(services)
 {
 }
Example #17
0
 public NotificationManager(ShinyCoreServices services, IJobManager jobManager)
 {
     this.badgeUpdater = BadgeUpdateManager.CreateBadgeUpdaterForApplication();
     this.services     = services;
     this.jobManager   = jobManager;
 }
 public AndroidPushNotificationManager(ShinyCoreServices services) : base(services)
 {
 }
Example #19
0
 public PushManager(ShinyCoreServices services, ILogger <IPushManager> logger) : base(services)
 {
     this.logger = logger;
 }
Example #20
0
 public PushManager(AzureNotificationConfig config,
                    ShinyCoreServices services,
                    Shiny.Notifications.INotificationManager notifications)
     : base(services, notifications)
Example #21
0
 internal static int GetBadgeCount(this ShinyCoreServices core)
 => core.Settings.Get(AndroidBadgeCountKey, 0);