Siri should open certain Page or ViewController - swift3

My app is a self care app. In this app user can pay his bills once he is logged in. I am able to open the app successfully via Siri. Just wondering if I could pay the bills via SIRI
While opening the app I could do login in background with saved user credentials in app.
In Payment intent handler I can send the payment response to SIRI.

In iOS 10 there are two different uses for Siri. Sirikit is to register intents, such as booking a ride or making personal payments. The intents are limited to what Apple has outlined here although I am sure they will expand in the future:
https://developer.apple.com/sirikit/
The other is to use Speech Framework to transcribe speech to text. You can do whatever you want with that input, but it only works if the user opens the app and then you initiate Speech recognition.
https://developer.apple.com/reference/speech

Related

Clarify few doubts in connectycube Flutter chat sdk

We are developing a Flutter app with one to one chat, so the user is able to sign up with phone number, email, Google sign-in, Facebook sign-in, Apple sign in. So, regarding the chat we like to clarify few doubts from your development team:
How do you maintain the uniqueness for each user like auto-generating user-id?
Are we able to change the name of the users before chatting to the opponent?
Are we able to change the notification sound, Can we manage the notification with our own notification(we are using awesome notification flutter)?
Is there an API available to get the chat history for each user?
After getting the correct request for signup (https://developers.connectycube.com/flutter/authentication-and-users?id=user-signup) ConnectyCube's server creates a new user and generates an id for it, and returns newly created user in the response.
User can change their name any time via ‘Update profile’ https://developers.connectycube.com/flutter/authentication-and-users?id=user-profile-update request. The only current user can update the user’s name.
ConnectyCube SDK doesn’t provide any UI solutions. You can use any plugin(s) for displaying the notifications.
The user can fetch only chat history related to this user (https://developers.connectycube.com/flutter/messaging?id=chat-history).
The ConnectyCube has an API for login via Facebook, Firebase phone auth, e-mail, but for Google sign-in and Apple sign in you have to develop your own logic for creating a user and signup it on the ConnectyCube server.

Is there anyway to initiate chat in dialogflow?

I am working in Dialogflow right now, is there any way to initiate chat using webhooks instead of using the common welcome massages given by dialogflow or some chat apps. Like I want to have my own initialize chats for many different situations. For example, today is my day to save money, then it will initiate a chat to make sure user get into save_money_daily intent. More details on the comment
There are few things that you wanted to do here that are not natural, I guess. Let me go on each:
How can I send an automatic chat for every possible case from the backend automatically?
Ans: You are building a google assistant on dialog flow, using as a chatbot, any chatbot can not send an automatic message(unless set by user), chatbots, and assistants are in the nature of the user interaction.
Let's any bot on Facebook, Skype, or any platform even the google assistant, they can't popup unwantedly with any information, it will be not user friendly.
There is a way to do, like if the user is interacting with your bot: You can ask like:
'Do you want me to remind you for saving money every day'
If user gives permission, save it in-app local cache and send app notification, via. Once the user get the app notification you can invoke the chat on the app notification click and open chat screen with your reply, but in the background when the user clicks on app notification you have to send a request to initiate chat.
And this solves your second problem as well.
Let me give you a high-level example:
Three Intent: With some user utterance
GetLatestMoive: ['get me the latest moives list']
GetLatestNews: ['Headline for today']
HealthCheck: ['I want health tips']
Create Notification and send it to the user via the app:
Based on the notification if the user clicks any of them, initiate your chat in-app with that utterance, it will automatically call the intent, and rest will follow based on your intent follow up a map and conversation design.
Hope this helps!

OAuth2 Signin from a Bot, based on Enterprise Bot template(v4 SDK), does not work with MS Teams desktop app

I have a bot which is based on enterprise bot template(Bot builder framework SDK v4.0). I have called AuthenticationDialog (OAuth2 sign-in with AAD v2) as per other thread in the stack overflow, i have implemented to handle Invoke Activity with "signin/verifyState" in my IBot implementation , it works fine on Microsoft Teams Web app, however, MS Teams desktop app puts up the dialog for selecting sign-in user, immediately, it closes the dialog and sends the Invoke activity with signin/verifyState with "{ "state": "123456"} , i am displaying user to enter the state, when user enters, it works.
Is it a bug in the Desktop MS Teams app
(or) I am doing something wrong.
From my bot, I don't use the following line which is in the SDK sample:
await Dialog.RunAsync(turnContext, conversationState.CreateProperty<DialogState>(nameof(DialogState)), cancellationToken)
In Slack same code works like this, bot puts up the sign-in dialog, when user clicks on Sign-In, browser display the sign-in option where user can select specific user name account, after successful login, it display the screen with:
Please enter this validation code into the chat window to complete the sign-in:
123456
When user enters the code, automatically TokenResponse is given to the bot.
In TeamsAuth sample, Startup.cs calls
// Create the bot as a transient.
services.AddTransient<IBot, TeamsBot<MainDialog>>();
In my bot calls
services.AddBot<>()
any idea how it can be done on my case?
I have it working well with OAuthPrompt & Azure Bot Service in both Teams desktop and mobile.
Here is my code for your reference. Check it out and see whether similar code works for you.
BTW The new suggested way of adding bot is to register it using services.AddTransient<IBot, TBot>(). Try to avoid using AddBot.

NFC Photography Identification

There was a music event a friend of mine went to and they had a few photographers waling around out there. The photographers took photos that were instantly uploaded to the users facebook account via an NFC wristband. The workflow when it was explained to me looks like this:
Step-1 Get a nfc wristband at the Kiosk- Facebook will be encoded into the wristband.
Step-2 Walk around the event. If a photographer takes your picture, hold your wrist to the camera and the image will be watermarked with event/sponsor logos at the bottom and posted to your facebook account .
So, I was thinking how this could possibly be done- I googled and googled, but I got nothing. Here's my guess- All the FB authentication can be in the wristband. An EyeFi SD card has the ability to take a photo and transmit it. NFC Arduino reader could read the persons wristband, authenticate, then go into the images and pull the last photo that was taken and post it to the users fb page. What do you think?
We have a (beta) product that performs this exact function. It's called Flomio Kiosk. The way it works is with NFC wristbands and Android NFC terminals like the Galaxy S4 Zoom. The system lets guests associate wristbands/cards to their Facebook or Email accounts. The NFC Kiosk application has a photographer mode that allows pictures taken to be tagged and uploaded with the scanned wristband's profile.
The architecture of the stack is straightforward. The UUID of the wristbands are associated with the Facebook token of the associated guest. This needs to be stored in a cloud server so that you can effectively OAuth2.0 to Facebook and post on behalf of the guest. This setup also allows us to remain liability free of ill formed posts. Each developer that uses our system needs to create their own Facebook app and get it approved. If spam or content that violates Facebook T&C is posted then only that Facebook app will be shutdown rather than the whole Flomio Kiosk solution.
In order for us to grab the Facebook token for each guest, the guest must go to the events' landing page (we use eventname.flomio.com), enter their wristband code (5 digit number) and sign in with their Facebook credentials. The guest can then select what permissions to give the event application, such as post to "Only Me" and allow access to their "News Feed". Once this registration process is complete the wristband is considered activated and the OAuth token for accessing the guests Facebook profile is stored in the Flomio database alongside the wristband UUID.
When a wristband is scanned at an access point, the UUID is sent up to Flomio via websockets for ultra-fast responsiveness that reveals the guest name and profile picture. This way event organizers can provide a more personalized experience to guests. In photographer mode, the images are taken and then wristbands are scanned. Images are posted through Flomio where event logos are overlaid on the pictures for added brand recognition. Included are predefined post messages as well that event organizers can curate before hand. Here's a simple diagram of how things come together.
For high end cameras like the Nikon D300 we use the Transcend Wifi SDcards as they're more hacker friendly. These run Linux so we execute some scripts to tag the photos as soon as they're taken but upload them later through a background process. Our Kiosk solution is undergoing maintenance right now to add support for our FloJack and FloBLE product lines. Once complete any smartphone will be able to act as a scan terminal in a multitude of deployment scenarios. Sign up for our blog to stay tuned with our latest releases.

Programatically setting the user and password for authentication. How to avoid the security question?

I'm developing an application for a Hotel where the costumers capture some snapshots and then upload them to their facebook.
Using the graph API it makes you identify yourself on facebook using the security question or identifying your friends.
I want to be able to identify the clients on facebook without the need of pop ups, specifying the user and password that they have previously given me
Is that possible?
If not, if I use the same computer to connect a lot of different people onto facebook, I get asked all the security questions. Can this be avoided with a digital certificate or anything like that?
Edited to add back info that was in an answer
The user 'Authorise my app' already. It's part of the facebook login process.
This should be right way:
The user captures a photo with the webcam.
The user introduces the email and password IN MY OWN FORM
I connect to facebook through my application, submitting the email & password and write some nice text in the user's wall.
This is what i'm doing now:
The user captures a photo with the webcam.
I connect to facebook using my desktop app. A facebook login window appears.
Sometimes, facebook indicates that this computer is login too much accounts, and ask for an aditional security ( phrase or friend's name).
The user grant access to my application.
My application write some nice text in the user's wall.
I need that the user write its own email & password in my form, because there is no keyboard ( it's a touch screen system) And if i show the Windows Touch Screen Window, there is some 'dangerous' keys like 'window' that i do not wan
What you need to do instead is have the user "Authorise your app" this way your application will be given an AccessToken which can then be used to perform the activities you need.
Look into the OAuth protocol and the Graph API
Start here:
http://oauth.net/2/
http://developers.facebook.com/docs/reference/api/
http://developers.facebook.com/tools/explorer/?method=GET&path=616612017