How to Take Screenshots of openGL with calabash - calabash

How can I take screenshots of openGL with calabash while using the ios simulator?
In the past I could do it with (localhost:37265/screenshot2), but now it is deprecated.

Since most likely you use UIViews to render OpenGL content, you could create a category on UIView that creates a screenshot of the current state (e.g. by drawing the content to an image). You can call the category using the map method of calabash, e.g.
# the following assumes your OpenGL view has an accessibility label 'OpenGL view'
# you also have a category 'UIView+Calabash' with a method '-(void)takeScreenshot;'
map("UIView marked:'OpenGL view'", :takeScreenshot)
You might also want to read the following topic:
Programmatically take a screenshot combining OpenGL and UIKit elements

UPDATED
Calabash iOS 0.18.2 and above now supports OpenGL screenshots.
The following information is out of date, but possibly useful.
The screenshot2 route was deprecated in this PR to provide Xcode 5.1.1 and 64-bit support.
This is the first report we've had of someone who was using this route.
For iOS 7 only, we have some options, but I haven't settled on a solution. This is being tracked in the calabash-ios issues and in this calabash-ios-server branch. Feel free to weigh in with your opinion.
On a side note, the calabash.framework now ships header files that allow users to implement their own routes. It is beyond the scope of this question to provide details, but we have one example of a user implementing OpenGL screenshots using the header files.

Related

Switching between ad networks in cocos2d v3.0 and spritebuilder

as the title would suggest i'm trying to make a system that automatically will prioritize my ad networks and display the next in line when one fails to load. I currently have iAd implemented and working following this example: How to add iad in cocos2d? and I plan on using the example provided by the same person, Guru, to implement AdMob. Example found here: AdMob with Cocos2d v3. Now preferably I would like to just add on/change the working code as it is very well built and organized. Along with prioritizing iAd followed by AdMob, I would like to also have revmob as well. I was thinking of just doing revmob as the fullscreen ad when launched, but I would still like to know how I would go about adding the revmob banners to the rotation just as good measure. If any of my code is needed I'll gladly post it :)

Is there a list of Android widgets present on Google Glass XE11?

As seen by the GDK sample code, there is a set of Android Widget classes (TextView, etc) that are supported on Google Glass. Has anyone compiled a list? I would love to know what options I am working with prior to the official GDK.
According to what I have gathered, you should be able to use any UI element within your application using GDK (it's simply an Android activity displayed in Glass). There are some services that aren't available though, that is really the only limitation at the moment. Some limitations I've spotted are: SpeechRecognizer not available - use RecognizerIntent instead, GPS might have some issues/limitations.
Since Glass is built on Android, all of the standard Android widgets are available. You should, however, restrict yourself to widgets that provide a high-quality user experience on Glass. For example, buttons and checkboxes aren't very usable since the user can't click on them directly.

BB10 Core Native SDK: Programmatically adjust screen brightness?

Is it possible? If so please provide a working example.
I have come across this function which can use the SCREEN_PROPERTY_BRIGHTNESS to apparently change a windows brightness. However, I have had no success using this as there are no noticeable differences. In the comments below, see two other people who have had a similar issue (posted on the BlackBerry Support Forums). According to one user, the SCREEN_PROPERTY_BRIGHTNESS property does not work. Can anyone verify that or provide an alternative solution?
Your first link is to a page that does not exist. On the page from the second link there are to things. The property you want is probably SCREEN_PROPERTY_INTENSITY, but the documentation goes on to say
Full read/write access to Screen API object properties is product
dependent.

Windows 7 current startup/shutdown bitmaps

Someone can tell me how to get CURRENTLY USED startup/shutdown bitmaps or animations of Windows 7 ? I know they are changed based on theme used. I am coding little tool to edit the current theme images, i dont want to use existing tool.
Thanks in advance.
As #Red Serpent wrote in his comment, these background images are not part of the theme, instead they are provided by the OEM, hence won't change when you change Windows theme.
It is possible to change the login, logout and lock screen backgrounds independently from the current theme. You can achive this by altering a registry setting and creating/modifying some dedicated image files deep in the Windows folder. The required steps are described in this blog post.
You can extract and change the OEM login screen background images by locating and reading these files. However, the default Windows 7 login screen cannot be extracted as it resides somewhere else, maybe bundled in a resource file with a dozen of other images.

Why should cocos2d-iphone users avoid using the #2x file extension?

Cocos2d-iphone uses the -hd extension for Retina images (and other assets). The cocos2d Retina guide speaks only vaguely of "some incompatibilities" regarding #2x:
Apple uses the ”#2x” suffix, but cocos2d doesn't use that extension
because of some incompatibilities. Instead, cocos2d has its own
suffix: ”-hd”.
WARNING: It is NOT recommend to use the ”#2x” suffix. Apple treats
those images in a special way which might cause bugs in your cocos2d
application.
Great. I feel well informed.
Through a 2-year old bug report regarding #2x I got the link to a forum thread that supposedly explains the issues with #2x. However, it does not. The only hints I found in there is that there are iOS (4.0/4.1) bugs regarding #2x which I suppose are no longer relevant. It's possible that I might have missed some crucial aspect (there was some talk about caching or repeat loading issues) - the thread is very long after all.
I'd like to know what specific issues might a cocos2d developer encounter if (s)he is using the #2x suffix for images instead of -hd?
Please give concrete examples of things that might go or actually will be wrong.
This seems to be the main reason from this link: http://www.cocos2d-iphone.org/forum/topic/12026
Specifically this post by riq:
I don't know if initWithContentsOfFile was fixed, but in 4.0 it was broken and it wasn't working with #2x, ~iphone extensions.
imageNamed caches all the loaded files so it consumes much more memory than initWithContentsOfFile
Also the #2x extension does something (I don't know exactly what) but it doesn't work OK with cocos2d.
Another good point: Back when the iPhone 4 was just released with the retina display, I am sure some users of Cocos2D were using an older version of it so when the user was using the retina display on a version of Cocos2D that didn't support it, things were twice as large as they should've been. Again this is now fixed to most unless you are using a VERY early version of Cocos2D.
Overview, so it seems that the main issue was with initWithContentsOfFile from iOS 4 but they have fixed this since because I use that exact API with Cocos2D 2.0-rc2 in my app and I do not have any issues whatsoever. I use all Apple specified extensions for images and everything works jolly good! :)
It seems as if this has a historic background.
What makes using -hd graphics still worthwhile is that loading them doesn't rely on Apple functionality but is rather done in framework code. So -hd can be loaded for iPads in iPhone Simulator mode and make use of the higher resolution pictures in 2x mode.
Other than that I couldn't find any more reasons to not use #2x when I was looking into this a week ago.
In case you want all the details it is probably best to drop riq an email.