Make Android Apps with Java SE coding !!!

Hi,
I am making a whole new compiler in Java which will allow you to compile your existing java se codes into Android apps and thus you will be able to make Android apps with your existing java knowledge and without learning any new things !!!

(Beta version will be release soon)

So how is the idea ???
Please reply with your views…

Er… I already can do that? Coz, like, Android is completely based on Java SE 7?

Cas :slight_smile:

Well, not quite. Maybe he’s planning on implementing all of Java2D, AWT and Swing for Android. ::slight_smile: In which case, I’m looking forward to attempting to code in NetBeans with the swipe keyboard on my trusty old Moto G! ;D

It won’t work well. If you aren’t willing to learn how a mobile platform actually works, your apps will run like crap. You can’t use your desktop style and knowledge and apply it to mobile Java on Android and expect it to run fine. It won’t!

Yeah… I had a huge Java 5 code base for general OpenGL and a lot more I ported over to OpenGL ES 1.0 & Android 1.1 back in the day and this exact problem is why i ditched OOP and went component oriented (ala Entity Systems, but applied across the entire architecture) to make it possible to support desktop and the massive differentiation and actual fragmentation of Android over all it’s versions. When writing software for Android over the last 8 years I always abstract away as much as possible and make it pure portable Java. I’m really excited actually as I’m going to double down on Vulkan and get TyphonRT back up and kicking on the desktop and Android. Once LWJGL (come on @Spasi et al!) get desktop Vulkan bindings when drivers are launched I’m immediately diving in porting most of the effects / video engine I’ve got on Android to Vulkan on the desktop and then port it back to Android when support launches hopefully a year from now. So yeah if you go OpenGL / ES or Vulkan you can write portable apps for desktop and Android with just a little extra effort.

Of course there are already superior solutions out there ala RoboVM and RoboVM Studio for actual cross-compiling for iOS.

In the future I’d mess around with it more if Apple ever gives in and supports Vulkan (guessing ~2-3 years from now).

Hi

Maybe this is a good starting point:
http://davy.preuveneers.be/phoneme/

Edit.: JOGL started supporting OpenGL ES in 2008. JOGL 2 windowing toolkit (NEWT) supports Android. It’s already possible to write OpenGL and OpenGL ES code shared between desktop and embedded environments with JOGL.

Android != Java. Android is based on Apache Harmony but it has been noticeably modified. It provides a subset of Java SE. The support of the syntactic sugar depends on the API level under Android (System.getProperty(“java.version”) returns 0). You can use some Java 1.7 features under Android Kitkat but they don’t work under Android 1.

Does Swing support touch screens?

Ask_Reply, do you really plan to write a new compiler? I’m very skeptical. Why not using Avian with the OpenJDK class library under Android?

It sounds like a lot of work, enough to keep a team busy for a year at least. And then no-one will use it.

Please can you elaborate?

I prefer using Swing to make GUIs. I’m happy to use the same JOGL code in desktop environments, on the Pi and under Android. I don’t believe that Ask_Reply is able to write a whole new compiler but I don’t think that his motivations are stupid, I just think that writing a new compiler isn’t the best way to do that and I gave an example of software allowing to run unmodified J2ME applications under Android, I tested it several years ago: phoneME for Android

There is a lot of work to add JNI support into it and to fill the gap between JavaME and JavaSE. The latter should be easier by using a more recent implementation of PhoneME.

Have you seen RoboVM?

I like their approach of ditching Swing/AWT and working towards implementing JavaFX instead. JavaFX is more similar to Android’s GUI than Swing. Also, it has 3D support, and overall is getting attention and development where Swing is basically going nowhere.

I know RoboVM but it’s better for the developers who want to use the same code under Android and iOS than for those who want to use the same code in desktop environments and under Android. Yes, Swing is going nowhere but it works, it’s well known, documented and very capable. As far as I know, RoboVM doesn’t use the OpenJDK class library. Of course, mentioning RoboVM is a good idea as it’s actively maintained whereas phoneME for Android was stopped in 2011. I’m not interested in RoboVM because I don’t like the build-in GUI APIs under Android and I’m not interested in iOS.

Thanks for your suggestions!!!
Yes after some considerations, I found that it will be not of much use…So staying out of the idea…