Git Product home page Git Product logo

sdk-xamarin's People

Contributors

b4tel avatar cr4567 avatar sanyandreichuk avatar sebastianstehle avatar xamplum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

xamplum

sdk-xamarin's Issues

Missing config for iOS Notification Service Extension

On iOS there is an issue with the notification service extension when trying to send a request to the notifo backend.
It seems that the configure of the main app is not used for the service extension.
Whenever the service extension is trying to send a request it receives an:

Error: System.InvalidOperationException: Neiter, API Key, nor Client ID and secret is defined.
  at Notifo.SDK.NotifoClientBuilder.Build () [0x00027] in <4749b32e680245aba38c4d8f0f7d70fa>:0 
  at Notifo.SDK.NotifoMobilePush.NotifoClientProvider.get_Client () [0x00021] in /Users/reichelt/Documents/workspace/xamarin/easierlife_app/sdk-xamarin/sdk/Notifo.SDK/NotifoMobilePush/NotifoClientProvider.cs:60 
  at Notifo.SDK.NotifoMobilePush.NotifoMobilePushImplementation.get_Notifications () [0x00000] in /Users/reichelt/Documents/workspace/xamarin/easierlife_app/sdk-xamarin/sdk/Notifo.SDK/NotifoMobilePush/NotifoMobilePushImplementation.shared.cs:56 
  at Notifo.SDK.NotifoMobilePush.TrackSeenCommand.TrackByIdentifierAsync (Notifo.SDK.TrackNotificationDto trackRequest, System.Threading.CancellationToken ct) [0x00020] in /Users/reichelt/Documents/workspace/xamarin/easierlife_app/sdk-xamarin/sdk/Notifo.SDK/NotifoMobilePush/TrackSeenCommand.cs:69 
  at Notifo.SDK.NotifoMobilePush.TrackSeenCommand.ExecuteAsync

when I set a fixed value for the url and apikey for testing purposes directly in front of the calls, it works fine.

Any suggestions how this could be possible?
Does it make sense to use the preferences to store these config options in the main app and restore them in the xamarin sdk?

Silent notifications

Some notifications are marked as silent, which means they should not been rendered but just made available in the SDK.

Checklist

This is just a checklist of things we need, you can mark them if they are already implemented

Features

  • Images are resized client side when not from notifo-server
  • Images are resized server side when from notifo server
  • Images resizing does not block the UI thread
  • Good token renewal behavior
  • Formatting: Large image
  • Formatting: Small image
  • Formatting: Body
  • Formatting: Confirm Button
  • Formatting: Link
  • Silent notification are not rendered but available through Event handler
  • Developer can get references for all clients through SDK
  • Simple configuration builder
  • Simple and basic documentation in Readme
  • Readme provides screenshots for major formatting options
  • SDK stores seen notifications in a persistent storage to filter out duplicates
  • SDK updates notifications when already seen, e.g. to remove confirmation when confirmed by other channel
  • Timestamp shown properly if possible???
  • XML comments for all public facing APIs
  • XML comments are available in NuGet package
  • SDK events are typed (as less Dictionaries as possible)
  • Sample uses official SDK only
  • SDK is easy to integrate into Dependency injection systems

Code

  • Code follows Notifo style guide
  • Namespaces match to the folder they belong to

Manual testing

Token refresh testing

  • Go to web portal -> user details, fresh install the app, open the app, refresh users details page, does the mobile counter increased by one?

Formatting options testing

  • Fill subject, body, small image (supported on Android only), large image, link text, link URL, confirm text, explicit confirm mode, publish notification, does every formatting option presented on notification?
  • Send two or more notifications one after another with different formatting options, does options show correctly on every notification?
  • Send notifications with a link and/or explicit confirm mode, does clicking on buttons open the browser with correct links?
  • Send notifications with an explicit confirm mode, confirm notification on one device, did confirmation button disappear from other devices?
  • Do all the above formatting tests work for remote and local notifications.

Notifications delivery testing

  • Open the app, send a notification, does the list refreshed with the new notification at the top?
  • Move app in the background by pressing the home button (or back button for Android), send a notification, does the notification appears in the device notification area?
  • Turn the screen off, send a notification, do the phone wakeups and notification appear in the device notification area?
  • Terminate the app by swiping in from the task manager, send a notification, does notification appears in the device notification area?
  • Move app in the background, send a notification, do you hear notification sound?
  • Click on the notification, do you see a "Notification opened" pop-up (in the background and terminated states)?

Offline mode testing

  • Turn the internet connection off, send a few notifications one by one, turn the internet connection on
    • Android: do all notifications appears in a few seconds?
    • iOS: does the last notification appears in a few seconds, and then the rest notifications appear in a 1 to 30 minutes time frame?
  • Turn internet connection off, send a few notifications with a few minutes interval, turn internet connection on
    • Android: do all notifications appears in a few seconds?
    • iOS: does the last notification appears in a few seconds, and then the rest notifications appear in a 1 to 30 minutes time frame?
  • Turn internet connection off, send a few notifications with a few minutes interval, wait a few hours, turn internet connection on
    • Android: do all notifications appears in a few seconds?
    • iOS: does the last notification appears in a few seconds, and then the rest notifications appear in a 1 to 30 minutes time frame?
  • Do all the above offline tests for the app in foreground, background, and terminated states.

"Smells"

Just some things I have found:

Non blocking image

Issue 1

return ResizeBitmap(bitmap, Resource.Dimension.notification_large_icon_width, Resource.Dimension.notification_large_icon_height);

The current approach blocks the thread. I am not sure if this can cause issues. I have found this:

https://stackoverflow.com/questions/24840282/load-image-from-url-in-notification-android

Issue 2

There should be overload for streams which consumes less memory:

private async Task<string> GetImageAsync(string imageUrl)
. I also think that the cache is useless here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.