Page 1 of 1

Android API Amusements

Posted: Tue Nov 02, 2010 7:25 pm
by Trask
Two things brought to my attention today in the Android API: http://developer.android.com/reference/ ... nager.html
float GRAVITY_DEATH_STAR_I
float GRAVITY_EARTH
float GRAVITY_JUPITER
float GRAVITY_MARS
float GRAVITY_MERCURY
float GRAVITY_MOON
float GRAVITY_NEPTUNE
float GRAVITY_PLUTO
float GRAVITY_SATURN
float GRAVITY_SUN values returned by the accelerometer in various locations in the universe.
float GRAVITY_THE_ISLAND
and http://developer.android.com/reference/ ... nkey%28%29
public static boolean isUserAMonkey ()
Since: API Level 8

Returns "true" if the user interface is currently being messed with by a monkey.
That silliness being said and done, anyone mess around with any Droid development?

Re: Android API Amusements

Posted: Tue Nov 02, 2010 8:05 pm
by epicasian
I've actually been looking into the Android NDK: http://developer.android.com/sdk/ndk/index.html

Now only if the iOS devices had some C/++ headers...

Re: Android API Amusements

Posted: Tue Nov 02, 2010 10:15 pm
by avansc
I looked at the """"""""NDK""""""""" thinking it might be complete NATIVE C code, and its not, it just uses java's long existing JNI, now while you do write in straight C++, or for that matter, you can wrap almost any language in it. you PRE compile the code, now this is fine for something as specific as say phone X... but in most cases this code become non portable, breaking on of javas main features.

Anyways, the iOS is fine as it is, and you CAN use C/++ headers in it, whatever you meant by that.

Re: Android API Amusements

Posted: Wed Nov 03, 2010 7:14 am
by MrDeathNote
hotxxl007 wrote:Titleist 2010 AP2 Irons for Sun and Wind

Golfers spend a lot of time outdoors with titleist 2010 ap2 irons. Special attention is therefore needed to protect their eyes from an extended exposure to the sun and the wind. Wind and the dirt and debris carried by it may cause irritation of the eye. What is worse is the prolonged exposure to the ultraviolet rays of the sun for your titleist 2010 ap2. ishiner
WTF!!!

Re: Android API Amusements

Posted: Wed Nov 03, 2010 10:23 am
by Milch
I'm currently developing a game for Android and I've never seen these functions before :D
As far as I know, you don't need the NDK that much. It is core-dependent, so you would have to compile it for each core on the market.
Actually, you should only use the NDK for "hardcore" calculations, like physics stuff.

Re: Android API Amusements

Posted: Wed Nov 03, 2010 2:44 pm
by epicasian
avansc wrote:I looked at the """"""""NDK""""""""" thinking it might be complete NATIVE C code, and its not, it just uses java's long existing JNI, now while you do write in straight C++, or for that matter, you can wrap almost any language in it. you PRE compile the code, now this is fine for something as specific as say phone X... but in most cases this code become non portable, breaking on of javas main features.

Anyways, the iOS is fine as it is, and you CAN use C/++ headers in it, whatever you meant by that.
Yeah...I thought the NDK was a "Get out of Java free card" sadly, it isn't.

Re: Android API Amusements

Posted: Wed Nov 03, 2010 3:03 pm
by aamesxdavid
I've made a soundboard so far, and am trying to get the save-as-ringtone functionality. I'm not too crazy about Eclipse, but overall, it's been fun developing so far.

Re: Android API Amusements

Posted: Wed Nov 03, 2010 3:33 pm
by Milch
aamesxdavid wrote:I've made a soundboard so far, and am trying to get the save-as-ringtone functionality. I'm not too crazy about Eclipse, but overall, it's been fun developing so far.
Yeah, in my oppinion Eclipse sucks.
I simply hate the idea of having workspaces and in these workspaces there are projects.
I accidentally deleted some of my projects trying to close them, until I realized that all projects inside a workspace are shown up and I need to switch workspace.

Re: Android API Amusements

Posted: Thu Nov 04, 2010 8:45 am
by dandymcgee
Milch wrote:
aamesxdavid wrote:I've made a soundboard so far, and am trying to get the save-as-ringtone functionality. I'm not too crazy about Eclipse, but overall, it's been fun developing so far.
Yeah, in my oppinion Eclipse sucks.
I simply hate the idea of having workspaces and in these workspaces there are projects.
I accidentally deleted some of my projects trying to close them, until I realized that all projects inside a workspace are shown up and I need to switch workspace.
Sounds just like Visual Studio's solutions. I'm not sure why you would want multiple projects connected together like that.. but I guess it might be useful to some? I wouldn't say Eclipse sucks because of it though, that's a pretty drastic conclusion for a silly mistake.

Re: Android API Amusements

Posted: Thu Nov 04, 2010 10:29 am
by aamesxdavid
dandymcgee wrote:Sounds just like Visual Studio's solutions. I'm not sure why you would want multiple projects connected together like that.. but I guess it might be useful to some? I wouldn't say Eclipse sucks because of it though, that's a pretty drastic conclusion for a silly mistake.
It's not as if the idea that projects are connected by workspaces is the only issue. Probably the real issue with that is how poorly it's communicated. Your default workspace is automatically generated for you, and any projects you make will be automatically inserted into that workspace. So you really have no idea what's going on unless you stumble around the menus looking for a way to clear all of your projects from the interface (but still keep them saved).

The other issue with it is that you don't have project files. This annoys me to no end. There are just a bunch of folders within your workspace folder. So you can't just load a project, you have to load the workspace from within the IDE, and then load the project from the sidebar. It's horrifically unintuitive, and doesn't really allow you any control over how you manage your projects. I'm guessing it's a condescending pat on the head to Java developers - "Oh, you poor little thing, you can't possibly manage all these projects yourself; allow me." I can't imagine anyone using it for C++, unless that's how they happen to prefer managing their projects anyway.

/rant

Re: Android API Amusements

Posted: Thu Nov 04, 2010 11:07 am
by MrDeathNote
Milch wrote:
aamesxdavid wrote:I've made a soundboard so far, and am trying to get the save-as-ringtone functionality. I'm not too crazy about Eclipse, but overall, it's been fun developing so far.
Yeah, in my oppinion Eclipse sucks.
I simply hate the idea of having workspaces and in these workspaces there are projects.
I accidentally deleted some of my projects trying to close them, until I realized that all projects inside a workspace are shown up and I need to switch workspace.
What!! Eclipse has some of the best refactoring tools about (for java anyway). I use it for C++ on linux, it may not have all the fancy features the java version has but it's still pretty damn nice.