JRE on Android - android

This might sound like a stupid question, but google didn't help me.
Is there a JRE available for Android? If so which version is it? Are there any major features missing?
If not does that mean all java apps need to be recompiled for Dalvik to work on the Android?
Update; Will there ever be JRE available for the Android?

No, there is not. Google did create a completely different runtime for Android, where the base classes are completely different ( albeit compatible )
It uses Java as the language ( syntax ) but not the Java platform.
You can learn about the Android platform here.
From that page:
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.
Read in bold "most".
So, although they look similar, they are not the same.

The closest I've found is http://www.apogee.com/products/cjre-a
Unfortunately as stated on that page:
Note that Apogee temporarily suspended further development of CJREs+A
in June, 2012, because of insufficient demand for them. Please,
contact Apogee if you are interested in a CJRE+A targeted at a an
Android-running device of your choice for "volume" distribution to
your customers and/or other third parties.
...and a download/demo is nowhere to be found.
Taken from their products page http://www.apogee.com/products it does sound like it would have been a great thing to have:
CJRE+A - The “CJRE for Android” is suitable for devices running
Android v4.x or higher, which need to execute the Java SE 5 and SE 6
applications in addition to executing the Android applications.
We can still dream. I have not contacted them. I am aware of many companies that are looking for this functionality. I can't imagine it will dwindle all too fast (or let's say slower than flash)?
I have not reached out to Apogee, might be worth a try...If anyone ever finds a solution, please keep us updated! Thanks.

Related

Can iOS Apps be developed using Java?

I'm a web developer and am thinking of digging into mobile app development. The languages I know so far are PHP, Python, SQL, Js, HTML and CSS, all of them pretty well now. Currently I'm starting to dig into Java, as it's the language to be used for native Android App Development, as far as I've learned. Interestingly, I'm coming across posts (also in this forum) saying that Java can also be used to develop iOS - compatible Apps, while other sources comment that Apple is completely against cross-devs, and that you should develop iOS apps using Swift when it comes to the native choice and optimal UX. So I was wondering about the answer in this forum; can you develop iOS apps using Java or not?
Post is a few months old now, but I figure someone with a similar question will probably find this with web search, so this reply is for them. (Disclaimer: I wrote Java professionally for about five years, and I grew up when Java was supposed to be the future.)
If the question is, "Can you write Java code and run it on iOS?" then the answer is, "Technically yes, but you almost certainly don't want to."
It requires jumping through all kinds of hoops and sleight-of-hand to make it work. The project linked in a previous answer, Codename One, is a pretty heavyweight framework and the kind of thing you'd only want to use if you were heavily committed to a Java codebase already.
There are advantages to knowing Java in 2022, but cross-platform mobile development isn't one of them.
Some reasons why you might want to learn Java:
Developing on Android. Android now supports/recommends Kotlin for new projects, but Java was the sole first-class language on the platform for 10+ years, so it's advantageous to be able to read/write/reuse Java code and libraries.
Using long-standing big-data tools (spark, hadoop, neo4j, etc.). While this domain has increasingly moved to Python over the past 5-7 years, there's still a lot of production Java code that someone needs to maintain. [Edit 3/31/22: See also the Apache http server, whose name never sat right with me because as far as I know, the people who wrote it aren't Apache.]
Stylistic similarity to C-family languages. Java can be a more intuitive introduction to C-style languages than jumping right into, say C++. These days, though, I would recommend C# over Java since it's used in more domains.
Continuity with some JS dialects. React code in particular is full of Object Oriented(tm) design conventions that are very strongly influenced by Java practices, and those design choices in turn have influenced changes in the JS spec. So being familiar with Java conventions can help make sense of that stuff. It can also help you identify which of those practices are bad ideas so you can avoid them in JS. [See footnote 1.]
As far as reasons why you won't see widespread Java usage outside of those legacy domains, I'd say there are a lot of good reasons people have moved away from Java since 2006 or so:
It's incredibly verbose, and requires a lot of esoteric knowledge about implementation details to write code that runs efficiently. This is the kind of problem that languages like Scala and Kotlin have tried to solve, while retaining compatibility with the JVM platform for ease of migration.
The JVM platform itself introduces substantial overhead, both in resource usage and integration complexity.
Changes in approach and policy since Sun's acquisition by Oracle. This is related to licensing issues (see Oracle v Google), as well as complexity/feature creep, which has given rise to compatibility issues across codebases.
Emergence of viable alternative languages in the 2000's and 2010's.
Widespread adoption of virtualization technology has yielded alternate ways to solve the compatibility issues that Java was designed to address.
It's ironic, since the motto of Java used to be "write once, run everywhere", but that's the way things go.
Footnote 1. Actually, this is kind of a trick question, since most commonly accepted Java practices are bad ideas. This can be demonstrated by the fact that in 1995, object-oriented Java applications would run in a typical web browser, whereas 27 years later Java is considered too heavyweight for that purpose.
Postscript, 3/31/22: This is my first and likely only Stack Overflow post. If you want to read more like this, check out my github: https://github.com/ubuvoid
Yes you can.
One tool used for this is Codename One.
https://www.codenameone.com/
Also for more info on this subject, feel free to consult this thread:
How can one develop iPhone apps in Java?
Yes, this is possible. https://github.com/Anuken/Mindustry is an open-source RTS game written in Java. It has an iOS port that is compiled via an open-source fork of RoboVM.
IOS works on objective C and Android works in Java and Kotlin. I don't know how much some conversion tool can help you to achieve all the functionality. So in my opinion answer is No.
Hybrid Application development can help you. You have one source code that will run in both platform. You have to develop the app again.
First: Java is used in more Domains than C#. Needed information because C# has no way to get over with ONE UI to Desktop, Mobile and Web.
By the way, the recommended Solution is CodenameOne or - if you want to implement your App with JavaFX - use Gluonmobile which is using the GraalVM, an ahead of time compiler for IOS.
In both Cases you have access to Hardware of the Device for Android and IOS because there is an abstraction which helps you with implementations for both Platforms - Android And IOS. Write in this Case one App and compile for both worlds.

Remove unwanted packages from downloaded android source before build

I have downloaded Android 4.0.1_r1 source code to my local system. I'm working to understand building own custom Android ROM and modify it according to my requirements.
I went through a number of web based tutorials on how to build custom ROMs for Android and I am clear with the overall process. What I'm essentially looking for is a well defined structured way of removing packages that are downloaded along with the source code but not needed for my own version of the build.
Additionally, it would be helpful if someone can provide me links pointing to building android source (guides,books or tutorials) as most of the available resources are based on creating Android APPs using Android SDK and the application framework. Its difficult to find any decent indepth tutorial explaining the entire architecture , source tree and different build guidelines for platform level developers.
This is a good book, but it's not officially out yet (you can get the first few chapters only).
There is no real documentation, but if you hang out with CyanogenMod forums/IRC long enough you can get some insights. You can also ask questions on the official Google Groups, android-porting and android-platform should be helpful. Reading XDA can be helpful too, if you can filter out all the noise.
Generally, the whole thing is quite complicated, and there are parts that are device specific. The only thing that you can remove more or less safely without modifying things (much) are the bundled user-level apps (Calculator, etc). Even some of those may provide some system-level services, so you should watch out.
In short, buy the book, read the groups and ask more specific questions, like 'how do I modify X in order to do Y. I tried Z and it didn't quite work.
In addition to the answer, this is the closest I got to find a suitable information for modifying packages in the source code before building. It also has a decent information for memory optimization.
http://processors.wiki.ti.com/index.php/TI-Android-ICS-MemoryOptimization
For removing packages please refer to the section
Run Time-Volatile Memory Customization
subsection - Customizing Android Product Package
The article pertains to Froyo , but the concepts are pretty much the same Android 4 ICS.
I have added this for anyone seeking reference material on the same.

Is there any tutorial to get feature wise comparision between releases in android

I have developed some application in android 2.2. I have read http://developer.android.com/sdk/android-4.0-highlights.html. But I need to know what are the new features in android 4.0 against 3.0 and 2.2. If there will be any such tutorial which will give details about android features by comparing two old version and latest version, then that will be more easy to remember the feature wise difference between any two releases. Is there any such tutorial which gives version wise comparison between android features.
I don't know of a pre-made API-level comparison (although a change history would include it).
You could always run any of several JAR diff tools, like the one in depfind (details in the user manual section) if you're looking for a summary view. There are a few others, but I'm not as familiar with them.
why don't you just download the code tree, including tags and mount this locally with git/svn/other and use the graphical tools of those csm to explore the code, docs, etc?
I know that it's a bit buggy, but i use eclipse EGIT for that.

How does Mono for Android work?

I am interested in how Mono for Android (by Novell) works.
My biggest question is around the actual runtime's that are used. Is MfA providing a Mono runtime that wraps and calls down to the Dalvik runtime or is the Dalvik completely bypassed in this operation? Is it something else completely?
I am curious because I hear that the Mono runtime has better performance on mobile devices (not that I believe anything I read on the internet...), and really I am just trying to understand the whole thing.
Any other general knowledge on the topic of comparing and contrasting Mono/Dalvik runtimes would be appreciated.
Thanks!
It's both! Some things are run directly in Mono on the kernel and some things get passed into the Dalvik system.
http://mono-android.net/Documentation/Architecture
Link to site provided by #trutheality is already dead.
Newest version of Mono for Android would be found here: https://developer.xamarin.com/releases/android/mono_for_android_4/mono_for_android_4.4/
It's seems to be a bit out-of-dated version as it has support for earlier Jelly Bean Android version. Nowadays, MonoDroid is called Xamarin.Android and now it's in 6.0.1 version.
but there are no official information how compatible is it with MonoDevelop IDE or how it works on Linux.
I sent today a message about it to Xamarin. Hope they would explain me clearly how it nowadays looks like.

Titanium compatibility with Android

Will Titanium work properly on all android sdk versions (1.5, 1.6, 2.0, 2.1, 2.2).....
Based on the research I've done, yes, I believe so. I'd recommend trying it out.
Yes it is.
But be warned that while Titanium has its strengths, it also has its weaknesses (ie; memory).
If you're working on a project for a client or are just starting your journey into mobile development, I would recommend learning how to code a native application. At least that gives you some options if you run into troubles. I've been burned a couple of times.
Titanium works with all android SDKs .You just have to make some changes to make it work with all SDKs. Titanium works with sdk 2.1 and below without any changes. But in order to make it work with 2.2 and above you have to add a symbolic link of adb file which is in
platform-tools(source) folder to tools(target).
Occasionally the platform-level support for a particular feature is different between the iOS and Android. For instance, the underlying audio support is significantly better on iOS; many features are simply missing on Android (we eventually patched them ourselves).
In addition, the way that the underlying platform's primitives are wrapped differs, so that code that is correct Javascript will result in incorrect Java on Android. An example we came across was related to the treatment of null and undefined when used with the Ti.App.Properties.setXXX functions. This issues are becoming fewer and farther between, as mentioned, but there are still issues not just related to UI.
I suggest you make a point of continuously developing and testing on both platforms; you'll find incompatibilities (mostly related to leaky abstractions) and their workarounds more easily that way.
Well it works great for the cross platform Execution.
The Only problem is that when user want to compare the iphone version & Android Version by developing same code.
iphone is excellent as per its gesture supports & fine UI works.While Android is still improving the terms.
So you should firstly check your terms and requirement then Go a head with Titanium. OtherWise
Appcelerator consistently working around all the native support as well as common features.
you need to find the possibilities in proposal for the Framework.it will be great approach & future perception as well.

Categories

Resources