Office 365 SharePoint list notify on new item - ios

I am looking at creating a business app for our company that will simplify specific tasks. These correspond to items in Lists in SharePoint hosted in Office 365.
It is basic enough to use the Office 365 iOS SDK to get list items, but we would like to add push notifications for new items in specific lists (e.g. announcements). My only solution so far is an Azure Mobile Service which polls the list and then can use push notifications from here to notify the device of the update.
Is there a way to notify a remote app/service when a new item is created in the SharePoint List? i.e. maybe a web hook type service that could POST to our web service (maybe azure notification hubs or azure mobile services) on creation or something directly from SharePoint that can send push notifications to a custom iOS app.

This is for Office 365 so you need a Remote Event Receiver for when the item is added to the list. The link below shows how to create one. You can have this event run your code to create the push notification in the Azure Notification Hub.
http://msdn.microsoft.com/EN-US/library/office/jj220043(v=office.15).aspx
You may also want to take a look at the updated PnP guidance on Remote Event Receivers
https://github.com/OfficeDev/PnP/tree/master/Samples/Core.EventReceivers
Updated:
If you follow the tutorial (thanks #efimovandr) to wire up your iOS application to use the Azure notification hub, your Remote Event Receiver only needs to contain the code in the Send Notification from BackEnd step, which writes an item to the Service Bus Notifications when the ItemAdded event fires on your list.

I am not good in SharePoint but looking at this or this article I can see that it is possible to write a handler which is called on SharePoint side when new item appears in a list. In that handler you could send a push notification using Azure Notification Hub. Just look at tutorial.

Related

Is there an event payload when adding ms teams app to org?

If I upload a custom app that has a messaging bot to an MS Teams org (through admin center), is there an event payload that gets sent to the bot messaging payload that lets me know that the app/bot is added to that MS Teams tenant?
Something similar to installationUpdate event: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/subscribe-to-conversation-events?tabs=dotnet#installation-update-event but for adding app to org (this payload event is sent for when users add app to their own MS Teams space)
No, there is no event for this.
Having it installed in a tenant doesn’t do anything except making it available for users to install. And without a user installing it, you cannot interact with the bot.
There are only two ways the app could be added to the org: either (a) by them adding the package manually, in which case presumably you gave it to them, so you should know about it, or (b) by your app being in the public App Store. In this 2nd case, you'll know it's been installed into the tenant by using the same installationUpdate event you mentioned - you can store an entry somewhere on your infrastructure (e.g. a database or otherwise) that tracks which tenants have installed the bot ever before in any channel, and if nothing is found for the incoming tenant id, it must be new.

Send Activity Notification in MS Teams for the personal application

I have created one personal app which is added as in the Microsoft teams. Now I have a requirement to Send Activity Notification in Activity Feed for the users who match certain criteria.
My question is related to the Send Notification Graph API.
When I try to add the activities in my manifest.json file it is not displayed in the App studio. That section disappeared.
When I try to run the Graph API command it fails.
Can someone guide me with step by step implementation for the custom app?
Error I get when try in Graph Explorer
The value of the topic must match the graph resource path.
You can use the activity feed notification APIs in Microsoft Graph to extend this functionality to your apps.
Requirements for using the activity feed notification APIs:
The Teams app manifest must have the Azure AD app ID added to the
webApplicationInfo section.(Teams app manifest version must be 1.7 or greater)
Activity types must be declared in the activities section in manifest schema.
The Teams app must be installed for the recipient, either
personally, or in a team or chat they are part of.
For detailed steps ,please follow below doc:
https://learn.microsoft.com/en-us/graph/teams-send-activityfeednotifications#understanding-the-basics-of-activity-feed-notification

Microsoft Teams developer platform, add push notification ? (blocking if it is possible)

I am developing a Microsoft Teams custom tab app, and i want that if a event occurs in the server, notify to the teams client, and if the client is in other Teams tab, the client show a prompt (with sound?) to see the event or to link to my custom tab.
That is possible?
One option to do this is to include a bot as part of your app, and then the bot can send a message to the user as needed. The user will receive a normal Teams message notification toast. This would use something called Proactive Messaging, to send a message on a trigger.

SignalR won't work properly inside Windows Service in comparison with Client Version

Objective: I want to send notifications to my customers in certain operations, such as when they loged in. To say in more detail, i wanna show the notification to employer that says {{x}} employe just loged in and clearly all the Authorisation codes are ready and works.
Current State: I opened another asp.net mvc web project(let say signal project) in my solutions and inside signal project i wrote my signalr codes that send notification to users according to their authorizations.(ClassName : Hub)
My client/signalr work flow
List item
user logs in, i check his/her authorizations.
To her/his authorizations i assign them in to groups
and send notifications to employers(which they have they own group)
At this state every thing is fine and works.
But i want to convert this signal project to a windows service.So i created one.
Problem: Windows Service is working but the notifications that should be send to certain groups won't go(in my case employers won t see any notifications).
Analyze:So i review my codes and debuged with log4net library and checked the windows event log
Tested/Debuged/Confirmed Steps
Groups Creating works
Loged in Customer assigning to groups works
Send notification to employers group WON'T work(code below)
Clients.Group("Employers", Context.ConnectionId).Send("Some Context");
So i created a method that sends notification to ALL loged in users and strangely it works
all my users including employers and employees are sees notifications.
In brief, using signalr inside asp.net mvc project, i can send notification to my users which in a specific group but while using windows service i can send notification to all my users but i can t send notification to my users which in a specific group.
I can share code if needed?
Any insights, thoughts, ideas are appreciated.
Revising -
In the method are you setting the hub context?
IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext<Hub>();
(do some stuff)
hubContext.Clients.Group("Employers").Send("Some Context");
If you are can you show some code?

How to demo the push capabilities in iOS Bluelist Sample App (imf-bluelist)?

I am using this sample application on IBM bluemix.
https://hub.jazz.net/project/mobilecloud/imf-bluelist/overview
I am able to receive push notifications on the device. I sent the notification with TODO_CATEGORY and also I accepted the notification, but I would like to know what should happen when you accept the notification. Is it supposed to add the message to the TODO List? Is it not getting added to the list.
Also how do you subscribe to notifications with tags? I created few tags on Bluemix and the list of tags are showing on the settings page, but it is not clear how to subscribe to tags.
When you accept the notification, there is not currently functionality to add the message to the todo list. For this sample, you could imagine that you've subscribed to push notifications from your favorite grocery store and they send you notifications about coupons or sales they're having based on the items in your grocery list. As an extension to this app, you could easily pull in the information from the push notification and add it to the todo list.
To subscribe to notifications with tags, you first need to enable the notifications by sliding the on/off slider to on, and then you are able to click on each of the tags to subscribe. You should see a check mark appear next to the tag once you've selected it.
There's a couple of great videos & articles around setting up the sample, using the sample, and how it all connects up to Bluemix here:
Build an iOS 8 App with Bluemix and the MobileFirst Platform for iOS (developerWorks how-to)
Bluemix MobileFirst Platform for iOS (15 minute walkthru on YouTube)

Resources