In my Windows 8 Store app the user can pick a contact via the ContactPicker. I then want to be able to use the information to start chat with/send a single instant message to that contact. However, for all the contacts I pick on my machine, the InstantMessages property is empty (CustomFields as well). All of my contacts come from Skype or Messenger, and when I open the People app they all have the option to send an instant message.
The code I have tried:
var contactPicker = new ContactPicker();
contactPicker.SelectionMode = ContactSelectionMode.Contacts;
var contacts = await contactPicker.PickMultipleContactsAsync();
ContactInformation contact = null;
foreach (var c in contacts) {
if (c.InstantMessages.Count > 0) {
contact = c;
break;
}
}
From MSDN:
You can let your users access their contacts so they can share content, email, or messages with each other, or whatever functionality you design.
But there is only a tutorial/sample on how to pick contacts info. Am I missing something?
Opening the user profile in the People app works as well.
Edit:
I should probably clarify that by "start chat with/send a single instant message to that contact" I mean to trigger an existing app (e.g. by using some URI). Like Skype for contacts that have Skype listed on their profile.
Related
I want to receive app events installed from Facebook Events Manager like number of installs, purchases etc.
What I am doing so far is:
var events = new Application("app_id", FacebookUtil.createApiContext(token)).getEvents()
.requestAllFields()
.execute();
It is expected to return events list as in the image, but instead it returns an empty list.
Am I missing something?
Thank you for any help.
Description:
Built an app, need to implement Swedish BankID. This means, when user presses a button, the Swedish BankID App opens, and when the user has signed in, the Swedish BankID App sends the user back to my app (which it does automatically), in which I need to retrieve data (if sign in was successful or not).
What needs to be accomplished:
Open Swedish BankID on the device from my app. Need to be able to receive a payload from Swedish BankID App in my app (Swedish BankID sends user automatically back to my app).
Current Code:
const url = `https://app.bankid.com/?${autoStartToken}`;
const supported = await Linking.canOpenURL(url);
if (supported) {
const answer = await Linking.openURL(url);
} else {
Alert.alert(`Don't know how to open this URL: ${url}`);
}
Currently, the Swedish BankID App opens correctly, my question is, is there any way to receive data from the other app? I know this is possible with Native Modules (running Objective-C etc), however I am using Expo Client and do not wish to eject.
I have yet to find anything that suggests that React-Native can listen to the other app.
You can use expo WebBrowser to open url.
For authentication you will want to use WebBrowser.openAuthSessionAsync, and if you just want to open a webpage WebBrowser.openBrowserAsync
Exemple:
...
import * as WebBrowser from 'expo-web-browser';
....
const handleLinkAsync = async () => {
let result = await WebBrowser.openBrowserAsync('https://google.com');
console.log(result)
};
Since the BankID app can even be on another device (if you present the url as a QR code) it's kind of hard to communicate with the app. Also, from a privacy perspective the app isn't supposed to give a lot of information away.
What you can do is to "bounce" information via the app using the "redirect" parameter. That's especially useful when you want to tie back to the existing session. There are however a few caveats, especially when using multiple browsers, so make sure to read the Relying Party Gudelines.
I'm trying to create Google Hangouts Chat message with a link to new Video meeting.
So far I managed to send a regular message, but I cannot find how to create a video meeting and send a link there:
msg := chat.Message {
Text: "test msg",
}
_, err := chatService.Spaces.Messages.Create(spaceID, &msg).Do()
if err != nil {
log.Fatal(err)
}
In the chat itself it's easily doable:
Any help will be appreciated! Thanks!
You have several options:
Include the link in a simple message:
If you include a plain link URL in your message text, such as http://example.com/foo, Hangouts Chat uses this as the link text and automatically hyperlinks that text to the specified URL.
If you don't want the link URL to show up, you can provide an alternate link text for this link, using the following syntax:
<video-meeting-url|your link text>
You can also customize your message to a higher degree by sending a card message. You can for example, provide a custom image for the meeting link, as explained here.
UPDATE:
Before doing this, you have to create a video meeting and get its link. You cannot create a video meeting with Hangouts Chat API.
As you can see in the official documentation, Chat API can only be used to manage spaces (that is, chat rooms and direct messages), as well as its members and messages. Video meetings are not part of Hangouts Chat but of Hangouts Meet, and there is no open Hangouts Meet API.
Reference:
Including links in message text
Card Messages: Image widget
I am creating a Windows Phone app using HTML And JavaScript. I am able to add connected services and have selected "Users and Groups" and given it Read permissions.
I am then making the following calls on button click:
var authContext = new O365Auth.Context();
authContext.getIdToken("https://TestDomain.onmicrosoft.com/TestWebApi").then(
function (token){
}
);
Services/Office365/Settings.js has been edited to the following:
Settings.clientId = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
Settings.authUri = "https://login.windows.net/common/";
Settings.redirectUri = "ms-app://s-1-15-2-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx/";
I got the redirectUri value by calling the following function:
Windows.Security.Authentication.Web.WebAuthenticationBroker.getCurrentApplicationCallbackUri();
I do get the login screen for my organization and I am able to provide credentials and it tries to redirect it back to my application, but then I get asked the following question:
"You need to install an app for this task. Would you like to search for one in the Store?"
If I click on yes, it takes me to the store and says "No apps found". If I click on no, it doesn't do anything.
How could I possibly get it redirected back to my app?
The connected services experience only works in Multi-device hybrid apps (a.k.a. Cordova), not in Windows Phone apps.
I have got the Android sample-chat app from the latest master release (quickblox-android-sdk-master) running but I can not create a new Chatroom from the app. If I create a chatroom by logging into my account on the quickblox site and creating a chatroom for my application then the chatroom shows up and the app works fine.
The application I am developing needs to create its own chatroom so I need the similar feature of the sample-chat app to create a new chatroom.
When I debug the sample-chat app I see that the code below is called:
#Override
public void onCreatedRoom(QBChatRoom room) {
Log.d(TAG, "room was created");
chatRoom = room;
chatRoom.addMessageListener(this);
}
with a valid QBChatRoom value. But the room does not show up in the app. Also when i log into my quickblox account and look into the app, there is no chatroom created.
Please let me know if there is a problem with the sample-chat app or the android sdk or if there is something special I need to do to create a chatroom. Thanks.
Seems like you create temporary chat rooms (not persistent).
Temporary room - A room that is destroyed if the last occupant exits
Try to create persistent room
Use
QBChatService.getInstance().createRoom(roomName, false, true, this);
instead of
QBChatService.getInstance().createRoom(roomName, false, false, this);