Is there a way to know when nobody is broadcasting with Agora (Unity) - unity3d

I'm trying to make a 'broadcast' video share in Unity, where only one person 'owns' the video, they have to press a button to 'be broadcaster' which shuts out all other users until the broadcaster stops or leaves.
What I need to know is, when the broadcaster stops or leaves, what's the best way to know that 'nobody is broadcasting'?

thanks for the question!
I'm fairly certain that the Agora SDK isn't able to explicitly tell how many users are in a channel. That functionality has to be handled inside a Unity script, instead of directly asking the Agora SDK.
I'd recommend using the OnUserOfflineHandler(), and checking to see if the 'special broadcasters' UID is equal to that of the user who just left, if so, fire some custom event you've created to alert interested subscribers.

Related

Stop Game Speed Hack

I have an app where I open a HTML5 game in WebView, its a single player game where we match 2 players and who ever scores more wins the game. This has a time limit. There are users who use speed hack X8 Speeder for one. I am trying to find how do I avoid this.
How do I detect if a particular app is installed on the phone. Even if they change the app name
How do it detect if my APK has been patched or modified.
Any help would be great.
Regards
Mitsy
Off the top of my head, I'd try to verify game sessions on the backend. When game completes, your app sends the complete log of what happened to your server which then analyzes it. If the log was generated by a script (like this, for example: https://x8speeder.com/?p=77), it will have very repeated and detectable sequences. You can then discard this score and not put it on the leaderboard.

VR application for the phone without using a button

I built the application, works fine. But now the boss wants the capability for users to concentrate on a point in the screen and it triggers an event. Call me an old fashioned dev but I haven't got a clue. Any insight would be appreciated.
First off, you really need to find out what your boss means by "... users to concentrate on a point in the screen and it triggers an event". There is no eye tracking capability (yet) build into any VR HMD. That might end the vague request right there.
OTOH - what most apps do that need some user input without using any buttons is called "gaze tracking" or "gaze input" but what it really is at this stage of VR development is if the user has centered the screen about some UI trigger, then you can (typically) show some hourglass-like object superimposed on the trigger in an obvious countdown mode. If the countdown goes off, the input is triggered. If the user "gazes away" (i.e. moves their head), you abort the countdown and turn off the UI visuals. Works best if there's a reticule that's either always on, or comes into focus when it's near a trigger. While reasonably intuitive, it's not my favorite technique, and it's got serious problems when you do it in a stereo scene, but a lot of apps currently use it. Get a GearVR and visit the Oculus store/apps, they do it as good as anyone, plus they have some nice documentation of best practices.

processing touch events as mouse events in Android apps

I've tried looking for similar posts but looks like they are all for the browser. I'm running JellyBean and don't have a touch device, so some apps (such as SubwaySurfer) don't respond. Is there a way to use mouse events instead? Would truly appreciate any help
Is the app supposed to take care of this? Or can it be done somewhere within Android?

iPhone background operations/daemon with live chat module. Keeping the app alive?

I am building a live chat app for the iPhone, and for this it is necessary to ensure that the operator is online and to keep the flow of data going.
After much search it seams to be only two options for similar kind of behavior;
UILocalNotification, only works if I have some scheduled information notice to be sent
Push Notification, for pushing data to the phone
The problem with push notification seams to be that I cannot ensure that the user is available, or in any way talk with the app without the user re-opening it. This way it seams impossible for me to know if the user is online, to update data in the app without the user having to manually open it, etc.
So, what I ask for, is it in any way possible to keep the app active in the background thus ensuring the operator is online and notify of incoming chat sessions?
Thanks a lot for your help guys!
Unfortunately the answer is no. I take it you mean text chat and not VoIP (which CAN run in the background)? Your best bet would be Push Notifications, as you would not be able to monitor anything from the app itself when it is in the background.

OpenFeint, Game Center and multiple users

I'm about to add highscore support to my mobile game and I have a basic understanding problem with leaderboard services like OpenFeint or Apples Game Center:
Suppose I'm logged in to OpenFeint and/or Game Center with my account. Then a pal of mine wants to play, I hand him my device and he gets the best score ever. Is there any way he can get his score listed under his name now? My understanding is that he can't, because when the game is over the score is saved, and it is automatically saved for the current account, which happens to be mine at that moment. Tough luck.
This would mean that if I play the game with my pal in turns we would constantly have to log in and out from both services after each game to get it right in the case that one of us gets a highscore. That seems a bit awkward...
Do I overlook something or is this just the way it works? Or do I have to take care for this situation as a developer? Or do the OpenFeint/GameKit SDKs handle this automatically somehow?
I don't know about Open Feint, but at least for Game Center I think the answer to your question is: Yes, that's just the way it works. Even if you know the Game Center id's for both you and your friend, you don't have the ability to save stats for anyone but the logged in game center player.
It does seems possible that they could have supported this use case, to allow more than one player to be "signed in" on a given device, and then the game could just present a "PlayerA", "PlayerB" button to choose who's playing, instead of having to run the Game Center app to do the switch. But I imagine this use case wasn't a super high priority. (They'd rather have each of you playing on your own devices. And in fact some services like ScoreLoop keep things simple by enforcing a single player per device, period.)