Android NDK Linear Acceleration not available - android-ndk

I am trying to write most of my code purely using the android NDK and am currently at reading out the accelerations from the sensor. In Android java you were able to choose between Sensor.TYPE_LINEAR_ACCELERATION and Sensor.TYPE_ACCELEROMETER. According to the Android NDK documentation enumerations, there should also be a linear acceleration but when i navigate by hand to sensor.h, no such enumeration exists. Did they remove it?
As info, i am currently on NDK Version 13.1.3345770
Thanks in advance for the help!

Related

What is the purpose of /drawable-v14 or /drawable-v11?

I've seen that some Google's or other open source projects have resource directories like /drawable-v14 or /drawable-hdpi-v11.
Now, I understand what this means: all devices with SDK larger or equal than v11/v14 should use these images.
But what is the purpose of this? Why and when should I use them? Why devices of HDPI resolution and SDK v11 should ever use images different than HDPI devices and SDK 10?
I just cannot see when I will ever use one image for SDK 10 and another for SDK 17, for example. Makes no sense to me.
As a side note, the usage of resources /values-v{11/14/17} is logical and has the practical benefit.
This can be use in order to style your icons to the current UI guidelines on the given Android version.
Android has had a lot of evolution on its GUI style from its beginning. In Cupcake, icons had to show a 3D effect with a shadow. With ICS, there is more flat icons. And it will keep on changing with android 5 and more... (Let's watch the Google i/o 2014 to know more about it! ... by the way: its today!)
So basically you can stick to the GUI guidelines even from different Android versions. It's probably not the only use case but it is one of them.

Replace Android with real Linux in smartphones?

I always wondered if, android is a linux derived SO, why I can't just compile a Gentoo (for example) with correct arch, and little modifications in boot to fully replace android.
I know that I may miss some functions, but having already kernel sources, and existing AOSP ROMs, and even, with UbuntuOS, I think it should be possible.
The only problem I have is that I don't know anything about the boot process, so even if I could manage to build an image, I wouldn't know how to boot it.
Any hints, information, or advises about this area?
P.S. In this case is a Samsung Galaxy S3 (I-9300), but could be applicable to other brands as well.

How can I access the frames captured by Camera from the video buffer in Android 4.1

I wondering if I can do that in Android space.
The version I am using is Android 4.1
In general, I think you can use the JNI and if you know what classes to use you can get the buffer you ask for.
Try chewing on the 2 links: here and here
Note that before ICS, the stack is very different from what is presented in these 2 links. So, what you come up with for ICS wont work on 2.3.3 or on 3.x.x.

Does android supports SVG or Tiny SVG?

does android supports SVG or Tiny SVG ? I am having doubt like if i want to publish my application to android market which will cover different sizes of android devices then in that case i need to create same images with different densities, sizes etc.. and need to put on the different folders as specified in android developer guides. I just want to avoid it because it will unnecessarily increase the apk file size so rather than using this approach can we create the vector graphics file and store all image related information and add it in to the apk file.
but I am not able to find whether vector graphics approach will work in android or not and if it is working then how to use it?
Please provide me some valuable information about it.
Regards,
Piks
I found TinyLine. I have not tried it, but it seems to be sophisticated.

windows ce - 2d graphics library

I have Windows CE 5.0 device and it doesn't support any hardware accelearation.
I am looking for some good 2d graphics library to do following things.
I prefer backend programming in Compact .Net Framework.
Drawing fonts with antialiasing.
drawing lines, and simple vector objects with antialiasing.
I am not doing animation, so i don't care about frames per seconds performance.
i have looked into following libraries, but nothing suits me.
opengl (vincent 3d software rendering) - works, but api is very low level and complex.
openvg - no software implementation for windows ce.
Cairo - api is very neat, but no wince build.
Adobe Flash - installs as browser plugin , no activex support in wince.
Anti-aliased fonts in .Net CF 2.0+ can be done with Microsoft.WindowsCE.Form.LogFont -- after creating your logfont, you can use it with any WinForms widget's .Font property by converting it using System.Drawing.Font.FromLogFont().
...you might need to enable anti-aliasing in the registry for these to render properly, see this MSDN article for the right keys: [http://msdn.microsoft.com/en-us/library/ms901096.aspx][1].
There was a decent implementation of GDI+ for .Net CF 1.0 called "XrossOne Mobile GDI+", it's not longer supported, but you can get the source code here: http://www.isquaredsoftware.com/XrossOneGDIPlus.php -- Run it through the import wizard on VS2008 to build it for later versions of CF. I liked this library for its alpha transparency support without hardware acceleration, rounded rectangles and gradient support.
Someone was advertising this library in some forum. It's for Windows Mobile, but you can check it out. I have no experience with it.
link
I have Google's skia library compiling under WindowsCE, although I haven't done much with it yet :) It wasn't too hard to get working. It does support a OpenGL/ES backend.
There is also AGG (Anti Grain Geometry) which is a heavy C++ library based on templates.

Resources