Android NDK GLES v1.1 - android-ndk

I got a game written in C/C++ using GLES v1.1 (yeah that was an iPhone game), as Im porting it to android I realize that I got some logs on the LogChat of Eclipse that tells me that the GL functionality (like glGet*) that I want to use is not implemented.
Digging on Google I found that you can cast a GL10 to GL11 context, however, since my API calls are all native, I cannot use that...
Is there a way to initialize a GL11 context in Java and then use the native GL11 API call?

If you are running on the emulator, be aware that currently (SDK Tools Rev9, ndk-r5b) the emulator (no matter the platform version) only implements the GLES 1.0 interfaces. It won't matter that your context is for GL11. You'll need to test on hardware to successfully call the unimplemented API entry points.

Related

Does Android Things Developer Preview 6.1 support Google Cast

Does NXP i.MX7D support Google Cast via Android Things?
Android Things Version: Developer Preview 6.1 which has 11.6.0 Play Services.
We need to show the UI on external displays like TV with Android Things, but the Google Cast feature does not seem to work with Chrome Cast.
To Test the code we manipulated our source code, so that it can run on Android Device; which runs perfectly fine. But when we try it on Things, it does not discover any devices to cast.
We also tried similar procedure with the Google Sample - CastRemoteDisplay-android
The above sample works on Android Devices but the same does not work on Android Things 6.1 developer preview; after making required changes to run on Things
We also tried different Play Services versions from 10.x and 11.x
We also tried to change the API level from 23 to 27
But all results the same
NOTE: I am not including any code or stack trace as I feel it is not required. But if any one demands will post the required logs
After lots of trial and research, I found out that the version of Play Services installed on Things Developer Preview 6.1 does not support it. It lacks GMS Core, because of which currently not possible.
In the mean time I'll try to search and side load OpenGapps with GMS Core, but I am not sure if it will work

Can Chromecast run Native C libraries?

As I understand it, Chromecast runs a modified version of ChromeOS.
Hackers examining the device have "concluded that it’s more Android than Chrome OS," adding, "to be specific, it’s actually a modified Google TV release, but with all of the Bionic / Dalvik stripped out and replaced with a single binary for Chromecast."
With this in mind can one conclude that Chromecast can only run HTML/JS code and that it can't run any Native C code?
What if I have a Native C library which already runs on Android and iOS, what will be the best approach to port it so that it could be run on Chromecast?
No, there is no provision for supporting a native application.

Where did lcdui go, in JME SDK 3.0+?

I want to write a tiny "hello world" J2ME MIDlet. In a sample like this one, classes in javax.microedition.lcdui.* are used for display output. When I try to compile it in Eclipse, I get the error,
The import javax.microedition.lcdui cannot be resolved
I've installed JME SDK 3.4, and I'm able to run MIDlets that don't import javax.microedition.lcdui.*. I read somewhere that lcdui can be obtained from the wireless toolkit; and Oracle says that the wireless toolkit has been integrated into JME SDK as of 3.0+.
So why can't Eclipse find it?
OK, I think I know the answer now.
I got back to the JME SDK 3.4 documentation page on Using Sample projects, and created and ran an instance of UIDemo. It uses lcdui classes, but it runs flawlessly - no errors about inability to resolve javax.microedition.lcdui.*.
The difference appears to be that the working sample uses different libraries than the one I tried at first. The first one uses org.elipse.mtj.JavaMEContainer/Oracle Java(TM) Platform Micro Edition SDK 3.4/IMPNGDevice1,
while the one that works uses org.elipse.mtj.JavaMEContainer/Oracle Java(TM) Platform Micro Edition SDK 3.4/JavaMEPhone1. They contain different sets of jars, e.g. the working one contains midp_2.1.jar, while the earlier one has impng_1.0.jar.
A follow-up question might be, why doesn't IMP-NG have lcdui in it? Well, those who pay attention to what they're doing will have read that
This JSR [for IMP-NG] will define a J2ME profile targeting embedded networked devices that wish to support a Java runtime environment similar to the Mobile Information Device Profile (MIDP) version 2.0, but that do not provide the graphical display capabilities required by MIDP 2.0.
The Information Module Profile - Next Generation (IMP-NG) will be a strict subset of MIDP 2.0, where at least the APIs relating to GUI functionality (the LCDUI) are removed. Functionality not already present in MIDP 2.0 is not anticipated or desired. "
The next question might be, why did I end up selecting IMP-NG when I was going through the tutorial... when I really do want a MIDlet that does something graphically? But I'm not sure I care, now that it's working.
The new me sdk 8.2, as I understood after browsing all class and in packages, does not provides any class to develop user interface. not like sdk 3.4, that have many graphical components.

Is it possible to embed xamarin part into an existing native app?

I have existing iOS and Android native apps. Is it possible to extend the apps with Xamarin coded part ?
Both Xamarin.iOS and Xamarin.Android are currently setup to take control of your application, so you need to make your main program be written in C# and then call into the existing code.
The way that you would do this is to bind your existing Objective-C or Java code as C# libraries, and then consume those libraries from C#. The binding technology is precisely what drives both the Xamarin.iOS and Xamarin.Android tools, so you would effectively be doing the same.
Once you have bindings, the interoperability works both ways: you can call native code, and native code can call C#.
The bad news is that instead of starting to enjoy writing code with both tools from day zero, the first thing you have to do the bindings, which is in general, not as fun as watching colored squared move on your screen.
Ok I find an answer here : http://www.whitneyland.com/2013/05/why-i-dont-recommend-xamarin-for-mobile-development.html
For example, code written in Xamarin cannot be used in native or HTML5
apps.

Async/Await in portable class library targeting Windows Store, iOS and Droid

Developping an MvvmCross application targeting Android and iOS (Xamarin/Mono) and Windows Store (because it's so easy/fast to debug compared to iOS/Android).
The Core of the app is PCL based.
Is it possible to use Async/Await in the Core library?
Xamarin mono supports Async/Await, and Windows Store supports it.
However, when selecting only Net4.5, Windows Store, Mono Android and MonoTouch as the PCL targets, SL4 and WP7.5 get automatically selected and Async/Await is not availlable anymore.
The latest I have is: TPL on PCL of mvvmcross
But PCL support from Xamarin has officially launched in the last week - so the latest I have is be out of date. Miguel has promised a blog post on the current status when he returns from Build.
Also, I have seen user comments like "I'm using asyncbridge and profile47 with heavily usage of async inside PCL. Works perfect on iOs and Android, with MvvmCross events it looks like a magic" from http://forums.xamarin.com/discussion/comment/18872/#Comment_18872 - would love to see this more fully blogged, explained, documented by those who have it working.

Resources