Progress Notifications

Hello,

I'm trying to implement a progress notification for a background service I am running as detailed here:

http://developer.android.com/training/notify-user/display-progress.html

However I cannot fins the setProgress Method on the Xamarin Notification Object.

I have looked in the Xamarin Notification section here:

http://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/android/local_notifications_in_android/

There is no mention of a progress Notification in the above url. There are no obvious methods that seem to match setProgress.

Is this possible in Xamarin?

Thanks,
Jon

Posts

  • c0mmanderc0mmander USMember ✭✭
    edited April 2015

    It is my problem too...
    var notificationService = (NotificationManager) GetSystemService(NotificationService); var notification = new Notification(Resource.Drawable.Icon, "Download started", Java.Lang.JavaSystem.CurrentTimeMillis()); notification.Flags = NotificationFlags.NoClear; //I just Want Show prgressbar in notification notification.ContentView.SetProgressBar(1, 100, 50, false); var notificationIntent = PendingIntent.GetActivity(this, 0, new Intent(this, typeof(DownloadActivity)), 0); notification.SetLatestEventInfo(this, "Download in progress", "Plz Wait..", notificationIntent); notificationService.Notify(DownloadNotification, notification);

  • c0mmanderc0mmander USMember ✭✭

    Thanks Cheesebaron ..
    It worked perfectly..

    just two things:
    1- How can set notification Flags?(l using builder.Notification.Flags = NotificationFlags.NoClear; but don't worked)
    2-Can I change Style or background of this progress bar?

  • c0mmanderc0mmander USMember ✭✭

    That link was great ..
    Whatever you want from God, God 'll give you , Mr Cielecki.
    Thanks Soooooooooooooooooooo match.

  • YahiaALnaqeebYahiaALnaqeeb USMember

    @c0mmander said:
    That link was great ..
    Whatever you want from God, God 'll give you , Mr Cielecki.
    Thanks Soooooooooooooooooooo match.

    did You implement it in Xamarin Forms

  • c0mmanderc0mmander USMember ✭✭

    @YahiaALnaqeeb said:

    @c0mmander said:
    That link was great ..
    Whatever you want from God, God 'll give you , Mr Cielecki.
    Thanks Soooooooooooooooooooo match.

    did You implement it in Xamarin Forms

    No I didn't.
    I'm not using XAMARIN anymore. 'React Native' is good enough for me.

Sign In or Register to comment.