Game Center Integration with My App - cocos2d-x

As i run my App ,everytime the Gamecenter popping up.i use below code in my AppDelegate.cpp .to connect with game center.My Question is i want to connect my App to Game center but it should not pop up when my Game Start.
GKHWrapperCpp gkh;
gkh.authenticateLocalPlayer();

Related

how to setup robotdyn arduino mega+esp8266

I am making a web server with a robotdyn arduino mega + esp8266 to control a few bo motors I flashed the firmware for the esp8266 I have 2 questions, 1: when I give AT commands through the serial monitor It doesn't respond also when I open the serial monitor its saying, "error opening COM4, port busy" how can I solve this? the second one is how can I embed the html code into the arduino code? by the way I didn't use any code for the AT commands. Can you also tell how I should orient the switches (they're only on the robotdyn arduino mega/uno + esp8266 model not on normal esp8266 chips)on the mega while talking the the mega?

iOS 8 - Starling context loss on open camera roll gallery

I am creating an app on iOS in Flash Builder, with as3.
The app uses the Starling plugin: http://wiki.starling-framework.org/start
My app allows users to take photos and customise them. When attempting to access the camera or camera roll on iOS 8, I get the error message "The application lost the device context!".
On Android, I can get around this problem with this line:
Starling.handleLostContext = true;
But I am told that iOS should never lose context (and I haven't seen it lose context on iOS 7 or below).
If I include that line in iOS 8, the application crashes at around the same point, but in this case the app crashes completely, and returns me to the home screen rather than displaying the previous message.
I have heard there are restrictions on iOS 8 with regards to the use of 64 bit/32 bit plugins and extensions, but I am not using any ANEs in this particular app. Are there any other areas where 32-bit could be causing problems or is that strictly related to ANEs?
I don't get this error on iOS 7 or below or Android, unless I set handleLostContext to false.
Adobe Scout provides no error message.
Any help would be appreciated.
UPDATE:
This code calls in the camera functionality:
var cameraRoll:CameraRoll = new CameraRoll();
if(CameraRoll.supportsBrowseForImage) {
trace("camera rolling");
cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected);
cameraRoll.addEventListener(flash.events.Event.CANCEL, browseCanceled);
cameraRoll.addEventListener(flash.events.ErrorEvent.ERROR, galleryMediaError);
cameraRoll.browseForImage();
} else {
var alert:Alert = Alert.show("Image browsing is not supported on this device.", "Error", new ListCollection([{label:"OK"}]));
}
UPDATE 2:
I've switched from AIR SDK 17 to 16, and it is now more stable but has similar issues
There is a known issue with the camera roll in iOS which will cause stage3d to lose context. Your options:
Set Starling.handleLostContext = true, it is possible to lose context in iOS.
Find an ANE (Supposedly these exist) that handles the camera roll without losing context.
More Information:
http://forum.starling-framework.org/topic/starling-and-cameraui#post-77339
I can confirm on ios 8.3 a Context3D is not lost when opening the CameraRoll using AIR 18.
Make sure you are using AIR 18.
Make sure you are using the latest Starling Version.
If the problem persist it's likely Starling is the cause.
Either report the problem and wait for an update.
Do not use Starling when requesting the CameraRoll (turn Starling off and Display normal Bitmaps).
Don't use Starling and use another engine or create your own.

AS3 ServerSocket / Socket dropping intermittently

Making a game that uses an android tablet as a controller. Both the game and the controller being written in Flash / AS3.
Mostly it is working well. However, on occasion, the controller will just stop sending data. The server is receiving messages they are just blank.
I am using the accelerometer on the device to control the game, and send the 'angle' at 50ms intervals. Sometimes I can play through all three game levels 10 times with no issue. And then once in a while I'll be playing and the accel data is blank.
Not sure what is happening... I'm not getting a disconnect or other error - the server keeps replying showing that the clientMessage handler is being called - it just shows blank data.

Red5 2-way camera setup (videochat)

I got a problem with RED5 in combination with Flash. For a personal project i am trying to make a Skype-like application. I already got a application that records the users webcam and saves it with a custom filename on the RED5 server.
But i am stuck trying to connect one more user to that window for a video chat. I made a new video container in Flash but i don't know how to connect a second client to the same stream in AS3 with Red5?
I searched on the net but i only get really old threads about RED5 in combination with Flex.
Maybe this is helping understanding my problem?
Could someone help me out? Or get me in the right direction?
Video chat? You will need 2 streams, for every client. Inbound and outbound. Outbound is a stream from the client to the media server, inbound is consumed stream of another user. So it will look like:
_streamOut = new NetStream(connection, NetStream.CONNECT_TO_FMS);
_streamIn = new NetStream(connection, NetStream.CONNECT_TO_FMS);
_streamOut.addEventListener(NetStatusEvent.NET_STATUS, onStreamOutNetStatus);
_streamIn.addEventListener(NetStatusEvent.NET_STATUS, onStreamInNetStatus);
_streamOut.attachAudio(microphone);
_streamOut.attachCamera(camera);
_streamOut.publish(hostPeerID);
_streamIn.play(companionPeerID);
Also there are some helpful examples, did you check them?

Adobe AIR, how to open a scene in a new window

I'm developing a networked AIR application in Flash Professional. I need to open two instances of the application and after searching I found that launching the app multiple times just causes an invoke event to be sent to the currently running app.
Up until now I've been using NetConnection & NetGroup (Supported by Flash Player 10.1+), now that I'm using ServerSocket & Socket, it requires the AIR 2+ runtime.
I found a solution to open a window on invoke.
my solution would be to launch a new window on invoke
function openWindow():void
{
newWin = new NativeWindow(init); //Initialize the Native Window
newWin.activate();
newWin.height = 200;
newWin.width = 300;
newWin.title = "My First New Win!";
}
and have it
gotoAndPlay(1, "Scene 1");
Is there a way to execute that on the new window? Or is there a way to open two instances of an AIR app?
Edit
You can open two instances of the same air app by changing it's ID. However, this is a very involved process every time I want to debug!
Turns out AIR on Android doesn't support ServerSockets. This means I must use non-AIR flash methods to achieve communication.
I can then achieve network testing through multiple Flash Player instances.
I don't believe ADL has the ability to run more than instance at a time.