sdk-xamarin's People
Forkers
xamplumsdk-xamarin's Issues
Automatic resize
When the notification comes from Notifo itself, the server can do the resize. We should check that.
https://app.notifo.io/api/docs/index.html?url=/api/openapi.json#operation/Media_Download
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?
Refresh token periodically
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:
- XML comments are not generated yet in csproj
- Extract Nuget options to its own file: See: https://github.com/Squidex/text/blob/master/Directory.Build.props
- csproj formatting looks odd.
Non blocking image
Issue 1
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:
. I also think that the cache is useless here.Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.