Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 11 13:42
    spyro89 commented #870
  • Jul 11 13:26
    spyro89 commented #870
  • Jun 30 11:20
    tomkocyan commented #934
  • Jun 29 13:59
    RosenDev commented #934
  • Jun 22 16:35
    Build #28 passed
  • Jun 22 16:34
    Build #27 passed
  • Jun 22 16:34
    Build #27 passed
  • Jun 22 16:33
    Build #26 passed
  • Jun 22 16:32
    Build #26 passed
  • Jun 22 16:32
    Build #26 passed
  • Jun 22 16:31
    Build #26 passed
  • Jun 22 16:31
    Build #25 passed
  • Jun 22 16:30
    Build #24 passed
  • Jun 22 16:30
    dependabot[bot] labeled #940
  • Jun 22 16:30
    dependabot[bot] opened #940
  • Jun 22 16:30

    dependabot[bot] on nuget

    Bump Newtonsoft.Json from 7.0.1… (compare)

  • Jun 22 16:29
    Build #23 passed
  • Jun 22 16:29
    dependabot[bot] labeled #939
  • Jun 22 16:29
    dependabot[bot] opened #939
  • Jun 22 16:29

    dependabot[bot] on nuget

    Bump Newtonsoft.Json from 7.0.1… (compare)

YoniH
@YoniH
I'm trying to load the p8 file some how to x509certificate2
mikecoram
@mikecoram
Any chance someone familiar with WNS and PushSharp could take a look at this issue? Redth/PushSharp#720 StackOverflow Question
I have PushSharp sending to both Android and iOS phone successfully but failing for Windows phones.
Parv
@parveshh
Hi i am using PushSharp in a new project and wondering if there is a way to inject servicebrokers? i could not find any documetation for this
TarrahArshad
@TarrahArshad
hi
is here body ?
i have a xamarin.forms project and server api in asp.net mvc . can i use pushsharp for communication between asp.net mvc api and app on android and ios ?
Stelios Ioannou
@stegiosioannou_twitter
Hey
Burhan UĞUR
@burhanugur
@Redth When are you going to accept pull requests?
Al Yaros
@alyaros
Hey, I have several millions of push request to send - How do I prevent the broker Queue to throw out-of-memory exception?
The internal blocking queue has unbounded capacity. for example I have stream of requests I would like to send, I take each element from the stream and enqueue it in the broker, the broker has unbounded capacity so eventually all my items will get into the broker memory cause it to ran out of memory. The broker is not fast as the incoming stream of requests. bottom line - how to throttle push sharp broker? I think that allowing library client to set bounded capacity on the broker queue would solve this issue.
Any Ideas?
Denis Ibragimov
@h0useRus
thats biggest problem of arhitecture of PushSharp 4, second version was much better with queue, I tried to play with Start/Stop for portion of messages, but then push sharp stopped send anything. My system with push sharp taking 5-10 gigs of memory during sending about ~7 mil messages per day, with version two it was only 700 megs!!! But version two do not support new Apple certificates.
levl289
@levl289
Let me start over... Is there a good way to make a collection of ServiceBrokers, which are actually concrete ApnsBroker and GCMBroker objects?
given the way generics are setup in PushSharp, it doesn't seem possible
I need to do this on account of multiple applications, as well as the ideally long-lived nature of the broker
Denis Ibragimov
@h0useRus
I did exactly like this and made base class
public abstract class PushChannelBase<T> : ISendChannel<MessageData>, IDisposable where T : INotification
    {
        protected static readonly Log log = Log.GetLogger<PushChannelBase<T>>();

        protected bool IsDisposed;
        protected readonly ServiceBroker<T> Broker;
        public virtual ChannelSetting[] Settings => ApplicationSettings.Settings;
        public ApplicationSetting ApplicationSettings { get; }
        public Guid ApplicationID => ApplicationSettings.ID;
        public string Name => ApplicationSettings.Name;
        public bool IsInitialized => Broker != null;

        public virtual ChannelResult SendData(IEnumerable<MessageData> data)
        {
            foreach (var message in data)
            {
                SendData(message);
            }
            return new ChannelResult { Status = StatusCodes.Success };
        }

        public abstract ChannelResult SendData(MessageData data);

        protected PushChannelBase(ApplicationSetting settings)
        {
            ApplicationSettings = settings;
            Broker = CreateBroker(settings);
            if (Broker == null)
                throw new NullReferenceException("Push service not initialized!");
            Broker.OnNotificationSucceeded += OnNotificationSuccess;
            Broker.OnNotificationFailed += OnNotificationFailed;
            Broker.Start();
        }

        protected abstract ServiceBroker<T> CreateBroker(ApplicationSetting settings);
        protected abstract void OnNotificationFailed(T notification, AggregateException exception);
        protected abstract void OnNotificationSuccess(T notification);

        protected virtual void OnError(int statusCode, MessageData data, Exception exception)
        {
            log.Error(exception);
            var response = new ResponseData
            {
                Code = statusCode,
                MessageID = data.ID,
                Message = exception.SerializeToJson(),
                By = data.UserID
            };
            SendProvider.SendStatus(response);
        }

        protected virtual void RegisterMessage(T notification, int errorCode, string errorMessage)
        {
            SendProvider.SendStatus(MakeResultResponse(notification, errorCode, errorMessage));
        }

        protected abstract ResponseData MakeResultResponse(T notification, int errorCode, string errorMessage);
        public virtual void Dispose()
        {
            if (!IsDisposed)
            {
                Broker?.Stop();
                IsDisposed = true;
            }
        }
    }
TarrahArshad
@TarrahArshad
hi all
is here for chat ?
levl289
@levl289
any examples of sending with PS directly w/o using a Broker?
we already have a queue mechanism, and I'm trying to keep our system as abstract WRT platforms as possible
levl289
@levl289
hrm, looks like the async part goes all the way to the bottom - not sure how useful it would be to send w/o a broker anyways...
Donnie7
@Donnie7
Hi. Can someone help me please? i would like to know if the Pushsharp can read .p8 certificates. If not, how can i read a .p8 certificate and convert it into a X509Certificate2?
It is quite urgent and i will accept all the help you can give me please.
By the way, i'm trying to use the communications with the APNs server.
Selçuk Ermaya
@se
Jonathan Dick
@Redth
woo figured out why mono debugging in vscode wasn’t hitting breakpoints set in the editor...
jay1050
@jay1050
Hi John. Now that ALPN is available in .net core 2.0 do you think we can progress this further. I am more than happy to put in my efforts alongside you and everyone else. I really hope we build the new version with support for proxy
SimonAntony
@SimonAntony
Hi All - trying to get the tests running but they fail as there is no settings.json file and the project references a ghost file. Anyone got a sample I can use? Trying to work out how to integrate this library into an existing dotnet project to send notifications to ipads. thnx
btw i've got the sample, just not sure what should go in it ;-)
msadikkose
@msadikkose
Hi All, I m trying to push over 500 K notification, but it takes over 10 minutes in v4.0 while with v2.0 it takes 2-3 minutes over all.
I tried to change scale up to 50 or keep it 10 and increase the thread - task count but could not decrease the time elapsed.
Application is run on 8 Gb, 2.3 Ghz server.
Do you have any suggestions ?
Thank you!
SimonAntony
@SimonAntony
@Redth Got a working codebase now :-) - one more question (if anyone is listening?), how do I actually test this is sending out? The logs say notification sent, however the app dev says nothing is being received - is there a way I can test this locally to ensure it's working?
Bono Pomodoro
@BonoPomodoro_twitter
Hey guys, does anyone have an example of usage of PushSharp for Xamarin Forms? For all three platforms :)
S.Stratis
@spstratis
Can someone give me an idea on how to resend failed notifications that are caught by the exception events. For example when either of these exceptions are caught - GcmNotificationException/GcmMulticastResultException/RetryAfterException. Do I need to restart the broker in order to resend them or is it handled automatically.
I'm using 4.0
Adam J. Mendoza
@adammendoza
@Redth I've been away for a while. I'll take a look at the repo now
@SimonAntony Are you still working on this? Are you testing APNS or Google?
Adam J. Mendoza
@adammendoza
@SimonAntony for APSN I'd test the actual key apart from PushSharp to make sure all is good with the APNS and key. If that works then you should be able to receive notifications on a device
SimonAntony
@SimonAntony
Thanks @adammendoza - all working now and live
Federico Di Gregorio
@fogzot
Hi. Does PushSharp work with netcoreapp2.0 console applications?
Adam J. Mendoza
@adammendoza
@SimonAntony Did you migrate the code to dotnet core? If so is it on github?
sktyjd
@sktyjd
@SimonAntony did you have to make any changes to the codebase to get it to work with APSN?
SimonAntony
@SimonAntony
@adammendoza no just used what was in the repo
@sktyjd Nope, found a couple of examples on the net so used as a basis
Paul Arizpe
@kiramishima
Hi, how can use .p8 certificate with PushSharp ?? anyone have a Example :D
(PushSharp.Core)
Adam J. Mendoza
@adammendoza
@SimonAntony Cool! does that mean that it works with dotnet core as is?
sourceship13
@sourceship13
Hey guys, I just ran across this library. I just cloned it, how can i send a test message to a dev device. I know its a silly question, im just not sure how to start building into this
moutabreath
@moutabreath
Hi guys. I'm having a problem validating my certificate to APNS with this nuget. My certificate works when using PHP and when using Sockets. Couldn't find anything on the web
Alex P
@SanSYS
Hi there! Are the project alive?
last commit at 1 Dec 2016
Unfortunately Redth/PushSharp#702 http/2 not supported yet =(