matchmakerViewController:didFindMatch: does not get called to invited player? - game-center

I am working on a multiplayer game using Game Kit. "auto match" is working great, but not "invite friend." The problem is that matchmakerViewController:didFindMatch: is not getting called on the invited player's device. Is there some other delegate method that I'm not seeing, which I should be using for the invitee?
I noticed in the apple docs, talking about this method, it says this:
This method is called when the view controller’s hosted property is
NO.
Is this hosted property referring to the hosting device, or that the game is hosted on a server?

Related

Hooking up a web service, which can ask things back and receives answers?

Is it somehow possible to call a web service which can ask things back and receives the answer?
Let me explain:
At home, I have a media center with some movies on it. It's content changes over time of course: Files get added, removed, renamed and so on.
Now I’d like to say for example “Hey Google, play wizard of oz” and then wizard of oz should played on my tv.
Since I know how to develop things in .NET, the web service running at home already exists and works fine, movies start. And I guess thanks to API.ai, I should be able connect it via the webhook function to Google Home.
But what if there are multiple results and I want to ask, which result should be picked? For example:
User says "Play Star Wars"
Google Home calls my web service, which checks my disk and finds out that there are multiple Star Wars movies.
Now, the user needs to be asked "There are multiple results. Which one would you like to see? Star Wars: A new hope, Star Wars: The empire strikes back, ..."
The user now answers "Star Wars: A new hope"
Google Home calls the web service again with that info and after success it replies "Okay, playing Star Wars: A new hope."
I haven't found out how to do that with API.ai. As I understand, API.ai calls the web service with some parameters (JSON), sends the response text received from the web service back to Google Home and then just ends.
Or did I miss something? Do you guys have any idea how I could achieve this scenario?
Or can we somehow develop our private services, like the ones listed in the Google Home app (Akinator, Dominos, CNBC, ...) or is that only possible as a partner? Would be nice actually.
Thanks in advance!
As I understand, API.ai calls the web service with some parameters
(JSON), sends the response text received from the web service back to
Google Home and then just ends.
The bot is still in control unless you send from your web service:
data: {
google: {
expect_user_response: false,
}
}
or check this box in API.AI in the intent pane
If you are using the ActionsSDKAssistant, make sure that you are using the right method. Ask vs. Tell
https://developers.google.com/actions/reference/ActionsSdkAssistant#ask
https://developers.google.com/actions/reference/ActionsSdkAssistant#tell
You need to study the API, the api.ai webhook request/response format and implement it. Take a look at this tutorial. Then, of course, you will have to poke a hole in your firewall to be able to receive the calls from Google or use ngrok or the BST proxy.

Getting spotify desktop player status

I come from an electronics background, with a project whereby I'd like to be able to obtain various information about the state of the desktop player, eg
Current track name
Current track artist
Position in song
Play/pause status
Is there an active API or other method which will allow me to obtain this information and get it out of the desktop app itself, such that I might be able to send that information out via a COM port?
Thanks in advance.
You could use my .NET Library SpotifyAPI .NET
It combines the spotify-local and spotify-web API.
Also, it provides all your required information and is simple to use.
Small example:
SpotifyLocalAPIClass spotify = new SpotifyLocalAPIClass();
if(!spotify.Connect())
return;
SpotifyMusicHandler mh = spotify.GetMusicHandler();
SpotifyEventHandler eh = spotify.GetEventHandler();
Console.WriteLine(mh.GetCurrentTrack().GetTrackName());

Google Cast Receiver Applications

In the receiver developer's guide is the following:
Applications running on the Google Cast receiver device (receiver applications) are always web applications. They are launched on the device after it receives instructions from the sender application to do so.
How exactly is this accomplished from the sender (in Chrome)? The sender guide doesn't seem to include this anywhere and I'm unable to track down it down in the API docs.
There is the class cast.LaunchRequest, but there isn't anything there that would accept a receiver application URL.
It is a little hard to figure out at first. What happens is you have a sender and a receiver. For the sake of simplicity lets say we are making a chrome app. Chrome app is synonymous with a Web Page running on chrome.
So what we would have is two web apps (pages).
Sender (Web Page)
Receiver (Web Page)
You then get your sender whitelisted, by giving them the url to your web app's root. In a day or two they send you an Application ID. That application ID acts as your ActivityID (in the place of say 'Netflix' or 'YouTube').
When you say cast.LaunchRequest("[AppId]", receiver); from you sender. The receiver pulls down the web page that corresponds to that AppId, which uses the Receiver Javascript API to talk to your sender(s).
The sender can also be on android or iOs in those cases you only have to make one Web App.

How can I access other Spotify users' currently playing tracks?

I want to build an app where a user can see what their friends are listening to.
I can get my own currently playing track by using the player model.
I can get another user's toplist by supplying a userName to the toplist model.
But how can I get another user's currently playing track?
You can't, directly.
If you want to do this, you'll need to have your own web service that keeps track of it. When a user uses your app and opts-in to having their currently playing track uploaded to your service for your friends to see. Of course, that means that everyone needs to use your app in order to keep your service populated.
Another approach will be to connect to the Facebook API and get friends' listening history that way.

Is developer provisioning profile/code signing required to test game center in simulator?

I am in a strange problem of getting "this application is not recognized by Game Center".
I developed a game which is in the App Store with no Game Center option. Now I am working on it to make it Game Center-enabled. A few hours ago, I enabled Game Center and added leaderboard and achievements using iTunes Connect. Now when I try to access Game Center in the iPhone Simulator it gives me the following error:
GameKitHelper ERROR: {
NSLocalizedDescription = "The requested operation could not be
completed because this application is not recognized by Game Center.";
}
The bundle ID of the application is the same as the application that is uploaded in iTunes Connect, but I don't have any valid provisioning profile now, so there is no code signing in my application.
Now my question is this: Does it require a provisioning profile associated with the corresponding application to test with Game Center in the simulator? Or is it sufficient that just the application bundle ID matches the uploaded application bundle ID? If the second case is true then why am I getting this error?
I am using a sandbox account which is generated from the simulator. So certainly it is sandbox account.
Please, someone help me!
The bundle ID is case sensitive. Make sure they really are the same.

Resources