I'm just wondering is anyone trying this yet? i mean is it even possible?
Just a thought for you big shot android devs out there JF, Haykuro, LucidREM
Google "android jni"
Well, a quick trip around google would have helped you.
Android is using java, and currently it's not possible to use anything else.
But anyway, would you rather compile all of your code for multiple architectures? J makes things easier here...
You can write cli-apps in C though... i heard something about that there was plans to make other languages available in android, but i wouldn't hold my breath
Also, why is this related to JF/Haykuro/LucidREM?
I think you can do this with JNI: http://en.wikipedia.org/wiki/Java_Native_Interface
Using an ARM native compiler (such as the ones at CodeSourcery, http://www.codesourcery.com/sgpp/lite/arm/portal/[email protected]=lite) you can compile your apps and run them fine on the G1
Code:
$ arm-none-linux-gnueabi-gcc -static foo.c -o foo
$ adb push foo /data/foo # we are pushing to /data as it is +rwx (read, write, execute) for a standard user.
$ adb shell /data/foo
a=1
b=2
foo=a+b
foo=3
^^^
OH I love when I stumble across a post like this and have something new to play with.
The problem is due to the different location of the linker and mainly the different libc you have to statically link everything.
I have been having a hell of a time getting DPKG to build statically.
I picked up a copy of the newly released book, Unlocking Android, at Barnes and Noble yesterday. There is a whole chapter devoted to writing native apps using C (and ARM assembler) with the CodeSourcery tools linked above. The author walks through the steps you need to do to dynamically link the libraries so you don't end up with enormous statically linked executables. Well worth the price.
It is surprising what you can do with C on the phone, its actually not too difficult. The method outlined below doesn't use the non native toolchains and if you use the sourcery toolchain (as mentioned above) you will end up with bigger binaries as you need to link in a standard glibc and not androids bionic libc. This may or may not be important for your project.
The other advantage of the steps below is that you will build and link against any library that is available to the android platform
The easiest way that I've found to start when porting or writing new applications is this method.
1) Check out the current git android source.
2) Build the entire tree, "make" in the top level directory.
3) Create a new directory in mydroid/external/packagename/
4) Copy one of the simple android Android.mk (Make) files from a "like" target.
(If doing a library, choose a library, if coding an executable , choose that).
5) source the mydroid/build/envsetup.sh in the users bashrc
6) cd to your directory, then instead of the usual "make" do an mm.
This should create a binary, which you can adb push to the phone and run at the console.
You can do all the usual things if linked properly, like write the framebuffer using sdl, play sounds, create network connections.
Just remember that you dont have a standard libc (glibc) to play around with you have "bionic". If you are missing your favourite glibc function , it is probably intention and not abug. You'll either need to port it or make do with the functions provided by bionic.
These instructions are for a "pure" C program. you can mix the java like dex calling by 'shelling' out to the C application when you need performance, however premature optimization is the root of all evil, you'll be surprised what performance you can pull from davlik (And I expect the VM guys to improve this even further).
I know that is a lot to digest. Will do the best I can to answer your questions. I'm by no means an expert in the area, but have learned a bit about C on android.
Well I don't know much about all this but what i know is that e.g.
ScummVM IS written in C++ , and so is g-arcade.
His FAQ says:
"How did you do this? Is it Java?
No. ScummVM is a C++ program. For this port, I turned it into a really big JNI library so Android still thinks it's running a Java program, but almost all of it is implemented in C++."
(http://sites.google.com/site/scummvmandroid/faq#TOC-How-did-you-do-this-Is-it-Java-)
So if some1 wanna port MAME, feel free to xD
Hello,
Do you know that it is possible to enable JIT in Dalvik JVM?
http://groups.google.com/group/0xlab-devel/browse_thread/thread/1edef26f4e5b7427
According to the Dalvik developers it is possible to backport JIT to the Donut tree and gain ...1.74x in performance!!! It would be awesome if someone could spend some time and create a ROM with that patches applied.
Anyone?
Karol
I think you misread somewhere.
It is a *new feature* they are *adding in*. The current JIT in AOSP/master is in development (i.e. incomplete). You can play with it if you want, but you should consider this to be a future new feature that will be added to official builds.
Well, I though that this is xda developers forum, place where even experimental Android features are welcome (vide extra memory hack and others...
And while English is not my native language I doubt that I have misread it. The current master tree ALREADY contains JIT implementation PLUS there are patches which allow using it in the Donut tree. So even though it is experimental it is worth checking out because it apparently it can be compiled and tested...
I would do this by myself, but since a week or so I am unable to update my donut tree, I am getting "fatal: The remote end hung up unexpectedly" messages
The current master branch in AOSP is eclair. If you use repo to sync the AOSP source, then build, the branch it pulls out (according to the output from envsetup and the lunch menu I receive) is eclair (2.0). I doubt that the donut branch has the code for the Dalvik JIT.
It *may* be possible to backport it to donut (1.6), but why when 2.0 is running on the Dream except for some AV/codec issues without problem?
Let me quote developers behind JIT in Dalvik....
NOTE: the results were measured in Donut based environment. That is,
there are some changes for Eclair backport to Donut without replacing
the libcutils and bionic, which were modified a lot in Eclair.
If you would like to introduce Eclair's Dalvik VM in Donut based
products (especially for 3rd-party components compatibility), feel
free to apply the attached patches and rebuild Android.
Here are the instructions:
# cd android-donut
# mv dalvik dalvik-orig
# . build/envsetup.sh
# git clone git://android.git.kernel.org/platform/dalvik.git
# cd dalvik
# git apply dalvik-eclair-backport.patch
# mm
# cd ../frameworks/base
# git apply frameworks-base-eclair-backport.patch
# mm -B
# cd ../../
(Do copy out~system to your target.)
Click to expand...
Click to collapse
This is from the link I pasted in my first message...
And why? Well, because there will be no full Eclair build for G1 until HTC releases some closed source components which currently doesn't work with the Eclair kernel. So this is still worth trying out, I doubt that those components will be released in near future...
karolbe said:
Let me quote developers behind JIT in Dalvik....
This is from the link I pasted in my first message...
And why? Well, because there will be no full Eclair build for G1 until HTC releases some closed source components which currently doesn't work with the Eclair kernel. So this is still worth trying out, I doubt that those components will be released in near future...
Click to expand...
Click to collapse
Ah, I stand corrected. It looks like it is indeed workable to get 1.6 with a JIT Dalvik. However, once HTC (or Qualcomm) releases the needed A/V drivers, 2.0 will be fully functional on the Dream. But, this might be nice in the interim.
Is that just the Eclair Dalvik version, or is it also the JIT-enabled Eclair Dalvik?
There /is/ a difference between the two.
I've had the JIT-enabled Dalvik running for a bit (on CM 4.2.5), but it's a memory hog and has a weird performance profile. It will shave 4 seconds off your "Benchmark PI" score, but interactivity of the device suffered. And it crashes sometimes.
If you want to try it (CM-4.2.5 only), here's a copy of the file:
http://n0rp.chemlab.org/android/testing/libdvm.so
Yeah, I tried it out, and the phone seemed to be less responsive. When I tried to install an app the phone rebooted, and now it seems to be booting to a certain point and then shutting down again. Nice progress though.
cyanogen said:
I've had the JIT-enabled Dalvik running for a bit (on CM 4.2.5), but it's a memory hog and has a weird performance profile. It will shave 4 seconds off your "Benchmark PI" score, but interactivity of the device suffered. And it crashes sometimes.
If you want to try it (CM-4.2.5 only), here's a copy of the file:
http://n0rp.chemlab.org/android/testing/libdvm.so
Click to expand...
Click to collapse
Memory Hog.
That's what I was afraid off, that a JIT would hog memory. And if there's 1 thing that my G1 is really short of, it's memory. RAM for running applications. So no please no more memory hoggging on my G1! ;-)
I'm afraid that memory hogging is kind of unavoidable for a JIT.
Just my 2ct.
--Tim
Anyone tried this with the memhack and CompCache running?
EDIT: Running it myself now. Can't see any lagginess; everything seems to be running quite snappily. Going full-time with it now.
I haven't done any java stuff for a while, so I might be off. Anyways, since this is a vm library change, I assume it runs in mixed mode (dynamnically compiles the java byte code when needed), which may cause performance issues. Is there a way for us to pre-compile all the java code in the apps with jit? and have the apps run natively without the dalvik vm at all? This would be the most desirable. I think the biggest weakness in android is the dalvik vm. It is a huge memory hog. If we can use jit to compile the apps into native instructions then theoretically we shouldn't need the vm to run at all.
If this jit is run in mixed mode, if it is done correctly it should still help. You should see performance increases on the second time you run the app.
If this jit is run in mixed mode, if it is done correctly it should still help. You should see performance increases on the second time you run the app.
Click to expand...
Click to collapse
Umm... that's just not how JIT interpreters work.
Seriously -- JIT compilers don't change the core data of the application at all; they just translate bytecode into machinecode within the runtime environment in order to speed up the execution of frequently-encountered "strings" of code within the application as they are encountered.
Seriously: try this link [ http://psyco.sourceforge.net/doc.html#how-does-it-work ] to get a better understanding of why what you just suggested displays a bit of ignorance regarding the topic-at-hand.
A bit of ignorance is a compliment. Like I said I have not done any java work for a long time. What I don't understand about jit the way it is done, is why not go all the way and generate the native code similar to the odex files, and just by pass the vm all together. If they are going to the trouble of compiling byte code into native instructions anyway.. why not just do it once and get it over with instead of compiling it over again and again... for short running tasks like most apps on android, it may very well be a perf hinderance.
IConrad01 said:
Umm... that's just not how JIT interpreters work.
Seriously -- JIT compilers don't change the core data of the application at all; they just translate bytecode into machinecode within the runtime environment in order to speed up the execution of frequently-encountered "strings" of code within the application as they are encountered.
Seriously: try this link [ http://psyco.sourceforge.net/doc.html#how-does-it-work ] to get a better understanding of why what you just suggested displays a bit of ignorance regarding the topic-at-hand.
Click to expand...
Click to collapse
why not just do it once and get it over with instead of compiling it over again and again... for short running tasks like most apps on android, it may very well be a perf hinderance.
Click to expand...
Click to collapse
Well, I can think of a few reasons.
1) High-level programming languages are just plain easier to write for. Python, for example, uses an interpreter (VM) as well -- though you can compile it once and be done with it. High-level languages, as such, typically don't compile well because of the lack of "symmetry" that you get between higher-level languages and actual machine code. (Remember, my friend, the The Story of Mel )
2) JIT compilation in interpreters get you //near// compiled performance from non-compiled code. In other words; you write the program to the VM once. The VM then gets compiled one time for each platform, (Remember; despite being essentially the same hardware the Dream is somehow two different boards each of which would require a separate compile... :/) and this will only get worse over time. Now, the programmer doesn't have to specifically call up devices based on the platform but rather on the VM. He doesn't have to re-compile for each CPU/integrated-board circuit. You don't have to store, for example, one version of an app for Dreams/MT3G's, one for Heroes, one for Droids... and down the road, one for the MIPS chips, etc... Saves massively on storage considerations for centralized distribution repositories like the Market itself is.
3) VMs can be functionally isolated, preventing most forms of malicious program code escalation. Sandboxing programs is far easier when those programs are running in their own VMs. Each program/task is initiated within its own VM, which makes initialization and garbage-cleanup rather simple. For such an open-to-communications platform as a mobile phone, that can only be a good thing. Natively compiled code typically doesn't play so well with such sandboxing.
Those are just the thoughts off of the top of my head. I feel it important to note that IANAP.
I'm trying the libdvm.so cyanogen posted on my 32A magic (288MB of RAM) and so far it's all working well, and it seems much faster
Using 4.2.5 on 32A Magic with 4.2.4 Radix Kernel with New JIT Based libjvm.so
Everything Works Well and Never had any Force Close but is that 4.2.4 Kernel from Radix actually uses JIT.
@cyanogen 32A have 288 MB ram i can test JIT based Dalvim if you want me to test it
Ok, I integrated this lib with Cyan 4.2.5. Running comp-cache and Ram hack, 16GB class 2 SD.
Initial impression (based on 20 minutes of playing);
No change in OS speed. No crashes yet. Apps (especially game emulators) have a noticeable increase in speed. I have no technical information to back up my claims, nor do I have the possibility of an ABX comparison. Sorry.
Thanks for the explanation, I buy #3 as far as security is concerned, we all know those virus taking advantage of overflow instructions in windows. But As for #2 I don't mean to have developers compile the byte compile to native, but have the vm on our phone compile it on first run and save the native instructions in file similar to how it generates the dex files on first run. This way it'll not have to recompile every time it runs. I just wish there is a way to avoid the dalvik-vm.
I irks me how much memory the dalvik-vm hogs up. A simple battery widget takes 12-16mb of memory.. It has a few pics and bytecode that simply goes to the system driver go get a number. I mean the whole ext3 filesystem driver uses less memory. Same with those widgets for task killing, they take up well over 10 mbs, which kind of defeats the whole purpose. I could write a simple tiny script that uses kill and do the same job without taking up 10m+ in the background.
We all here complain about our hardware, but I feel like these are more of software problems. anyways, that's just my rant... i hope the memory issues in vm gets better in later release.
IConrad01 said:
Well, I can think of a few reasons.
1) High-level programming languages are just plain easier to write for. Python, for example, uses an interpreter (VM) as well -- though you can compile it once and be done with it. High-level languages, as such, typically don't compile well because of the lack of "symmetry" that you get between higher-level languages and actual machine code. (Remember, my friend, the The Story of Mel )
2) JIT compilation in interpreters get you //near// compiled performance from non-compiled code. In other words; you write the program to the VM once. The VM then gets compiled one time for each platform, (Remember; despite being essentially the same hardware the Dream is somehow two different boards each of which would require a separate compile... :/) and this will only get worse over time. Now, the programmer doesn't have to specifically call up devices based on the platform but rather on the VM. He doesn't have to re-compile for each CPU/integrated-board circuit. You don't have to store, for example, one version of an app for Dreams/MT3G's, one for Heroes, one for Droids... and down the road, one for the MIPS chips, etc... Saves massively on storage considerations for centralized distribution repositories like the Market itself is.
3) VMs can be functionally isolated, preventing most forms of malicious program code escalation. Sandboxing programs is far easier when those programs are running in their own VMs. Each program/task is initiated within its own VM, which makes initialization and garbage-cleanup rather simple. For such an open-to-communications platform as a mobile phone, that can only be a good thing. Natively compiled code typically doesn't play so well with such sandboxing.
Those are just the thoughts off of the top of my head. I feel it important to note that IANAP.
Click to expand...
Click to collapse
cyanogen said:
I've had the JIT-enabled Dalvik running for a bit (on CM 4.2.5), but it's a memory hog and has a weird performance profile. It will shave 4 seconds off your "Benchmark PI" score, but interactivity of the device suffered. And it crashes sometimes.
If you want to try it (CM-4.2.5 only), here's a copy of the file:
http://n0rp.chemlab.org/android/testing/libdvm.so
Click to expand...
Click to collapse
Could anyone upload that again? The link is dead.
I've seen all the work you guys here at XDA developer do (and it's all really great).
And i'd really like to be able to develop stuff for android devices like you guys!
I know how to use Eclipse to develop apps and i've made a few apps already (no games or any real good stuff because i'm still learning right now).
But I want to be able to develop ROMs,kernels,...etc.U know!!
I've signed up for a java coarse at "New Horizons" training center and i'm gonna start in about a month.
But that won't teach me everything,it won't even teach me everything about application-creating
So,here I am,asking you guys (android developers):
How can I learn the stuff that you've learned?
What websites should I check out?
Where and how can I learn how to develop complete apps,games,Roms and kernels for any android smartphone?
In other words;Tell me how you learned all this stuff,and how can I learn it too?
Thank U!!!
Custom ROMS are not created from scratch.
Existing ROMs from the manufactors are taken appart, dissected, modified and packed again to be uploaded here.
The best way to start on that is just by taking apart existing ROMs and looking through the files.
Modifiy some, repack them and check if it still works.
Repeat said process .
If you want to go deeper read up about decompiling & recompiling apk files.
Modifying bak smali code.
For creating your own kernels, just use google, so much info about that. Its not an android only topic, but a linux topic and the internet has plenty of info on that.
Good luck on your journy .
The first thing you have to do is to understand the system. This means you have to understand Linux, the kernel, the datasystem(because Android is obvisiously based on Linux).
You have to be able to understand written code or program/code yourself.
The best way to code for android is to learn java.
Read this here: http://developer.android.com/guide/index.html
Ok,thanks for the information.
But let me tell you what I already know and understand:
Android is Linux,I know what linux is,I know everything about it and i'm already using GNU Fedora and Ubuntu (I have spent countless hours reading the "about Ubuntu" and "about GNU"),In Android or Linux everything is a file and everything in the system or the apps has a file .
Now I have some questions that I need you to answer first before adding anything else:
1-Is learning Java enough?don't I need to learn any other programing languages?And if I do,then what languages will I need to learn?
2-how can I learn to build or modify an android kernel (linux)?give me a good site or something?
3-how can i learn to decompile and recompile apks and roms?
4-What will I be needing to learn in order to buid a kernel?
5-What programing langusge is the android source code written in?I think it's java,am I right?
I hope you answer these questions before adding anymore information.
Thanks in advance,and I hope it's not any trouble)
1-No, you need to compile and modify kernels etc. therefore you need to program in C(I guess)
2- Well, buy books about Linux and Kernels etc. Its quite difficult to teach it. You gotta learn yourself.
3- Decompiling and recompiling is not an option. Its like stealing - Dont modify apks without permission. If you got permission then you modify apks with the SDK(Java).
Roms are often compiled in C(I think)
4 - Books and the will to learn.
5. Android Source Code is C(like Linux), Android Apps are Java.
Quinity said:
1-No, you need to compile and modify kernels etc. therefore you need to program in C#(I guess)
2- Well, buy books about Linux and Kernels etc. Its quite difficult to teach it. You gotta learn yourself.
3- Decompiling and recompiling is not an option. Its like stealing - Dont modify apks without permission. If you got permission then you modify apks with the SDK(Java).
Roms are often compiled in C#(I think)
4 - Books and the will to learn.
5. Android Source Code is C#(like Linux), Android Apps are Java.
Click to expand...
Click to collapse
Just making sure you mean c, not c# right??
Try visiting the android website. There is a tutorial on how to get started with android development.
There is a fee that you would need to pay per year in order for your application to appear on the android market where you will be able to sell your product.
Java will be advantageous when it comes to android programming and if you know J2ME that will be a bonus as well.
ps:Learn from examples, buy a good book for beginners: “Hello, Android” and “Beginning Android“.
(i’m not a developer)
Nilurun said:
There is a fee that you would need to pay per year in order for your application to appear on the android market where you will be able to sell your product.
Click to expand...
Click to collapse
I believe it is a one time fee when you sign up, not a yearly fee.
Ok,I'm already using the Android developer website,but the whole thing takes time to read all the guidelines and do tutorials and packages.
So all i'm asking here:
What programming languages do I need to learn in order to be able to understand the native android source code and develop everything starting from kernel down to apps,I already know that I need to learn Java for apps and thanks to "Quinity" I know I need to learn C to understand the native source code.
I can easily learn C at any professional training center.The questions now are:
1-how and where can I learn to edit the Linux kernel and decompile and recompile ROM and APK files?
2-why do I even need to learn Java ME (formerly J2ME)?
I understand that Java ME is the java environment originally running on small devices with limited processors and performance such as mobile phones and smart phones,but what is the use of it when it comes to the app development,or any Android development at all?
And thanks for all the replies.
One more thing,I have to make sure what the android source code written in.And Quick answers;PLEASE.
Is it C,or C#?
C
Check out the wikipedia article, which states at the beginning:
The Android open-source software stack consists of Java applications running on a Java-based, object-oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Libraries written in C include the surface manager, OpenCore[21] media framework, SQLite relational database management system, OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL, and Bionic libc.
Dark3n said:
C
Check out the wikipedia article, which states at the beginning:
The Android open-source software stack consists of Java applications running on a Java-based, object-oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Libraries written in C include the surface manager, OpenCore[21] media framework, SQLite relational database management system, OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL, and Bionic libc.
Click to expand...
Click to collapse
Thanks,the article really did help a lot.
So,now I need to learn Java SE (without question),but what about Java EE and Java ME,will they be useful in the app development process,will I need them?
And what If I can't learn C (it's extremely hard to find a training center that teaches C these days),will learning C++ or C# do me any good?
I know that the source code is written in C,but is it really a big difference between the three,If I learn C# or C++ will I still be able to do everything I need to do and fully understand the code?
note that i'm on a tight schedule for now and I need to learn only the stuff I can't do without.
speeed_demon47 said:
Thanks,the article really did help a lot.
So,now I need to learn Java SE (without question),but what about Java EE and Java ME,will they be useful in the app development process,will I need them?
And what If I can't learn C (it's extremely hard to find a training center that teaches C these days),will learning C++ or C# do me any good?
I know that the source code is written in C,but is it really a big difference between the three,If I learn C# or C++ will I still be able to do everything I need to do and fully understand the code?
note that i'm on a tight schedule for now and I need to learn only the stuff I can't do without.
Click to expand...
Click to collapse
I think you are missunderstanding something here.
You should start by just learning java, the different EE ME SE etc. are still java.
The difference is that those are sets of java platforms. They bring, as does the android platform, prebuild libaries along, these contain functions (i.e. print that, create datastructure X) so you don't have to write every tiny bit of code.
Forget about those.
You want to use java on the android platform, which still uses java, but brings along its own libaries with prebuild code you can use ( See http://developer.android.com/reference/packages.html ).
So just learn java, if you want to work with android you can learn java on the android platform, this way you will already be familiar with the libaries provided by android.
I would say C# is more similar to java and C++ is more similar to C.
I don't understand what you mean with "do everything i need to do".
What do you need to do?
"Understand code".
Understanding code does require more than knowing what each line does, you will have to see the bigger picture ,not just few lines of code, to understand what is does. Depending on how the code is written (tidy or confusing), is the code commented? It might take ages to understand it.
Programming is sometimes a bit like art . Code can be beautiful or horrible
You don't have to do everything in a training center either.
The internet, time and interest is enough. There are so many tutorials and pages available...
You could have also found most of the answers by just using google...
Wikipedia article about java holds the information about the differences between EE/ME/SE etc...
Searching for terms like "difference C C sharp" etc. holds the answer to that question...
So maybe a training center is better for you to learn those programming languages, as "google skills" will certainly be required to teach you those things yourself.
What tight schedule are you on?
Dark3n said:
I think you are missunderstanding something here.
You should start by just learning java, the different EE ME SE etc. are still java.
The difference is that those are sets of java platforms. They bring, as does the android platform, prebuild libaries along, these contain functions (i.e. print that, create datastructure X) so you don't have to write every tiny bit of code.
Forget about those.
You want to use java on the android platform, which still uses java, but brings along its own libaries with prebuild code you can use ( See http://developer.android.com/reference/packages.html ).
So just learn java, if you want to work with android you can learn java on the android platform, this way you will already be familiar with the libaries provided by android.
I would say C# is more similar to java and C++ is more similar to C.
I don't understand what you mean with "do everything i need to do".
What do you need to do?
"Understand code".
Understanding code does require more than knowing what each line does, you will have to see the bigger picture ,not just few lines of code, to understand what is does. Depending on how the code is written (tidy or confusing), is the code commented? It might take ages to understand it.
Programming is sometimes a bit like art . Code can be beautiful or horrible
You don't have to do everything in a training center either.
The internet, time and interest is enough. There are so many tutorials and pages available...
You could have also found most of the answers by just using google...
Wikipedia article about java holds the information about the differences between EE/ME/SE etc...
Searching for terms like "difference C C sharp" etc. holds the answer to that question...
So maybe a training center is better for you to learn those programming languages, as "google skills" will certainly be required to teach you those things yourself.
What tight schedule are you on?
Click to expand...
Click to collapse
Yes,I already know all about java,I read the articles on wikipedia,but why would I need to learn java enterprise? Isn't it mostly used around internet applications and servers? Can't I just use the APIs if i'm going to build an app that needs internet or server connectivity?
And why would I need to learn java Micro? Doesn't android use dalvik virtual machine to run apps? I mean,java Micro is mostly used to create feature phone apps,why would I need it with android?
There's something I don't understand though,on wikipedia the article about android says this:"Applications are usually developed in the Java language using the Android Software Development Kit, but other development tools are available, including a Native Development Kit for applications or extensions in C or C++"
So,the question is;what is the difference between apps developed in java and apps developed in C or C++?
The problem about C# is that I don't know anything about it;can't find any articles on wikipedia and other sites really don't help!!!
I meant by "understanding the code",having the ability to understand the command lines,what they do,what each line is responsible for and having the ability to edit or adjust something,.....etc.
And for the tight schedule;I need to learn everything about android within 6 months (I don't need to learn C as much,but it'd be a bonus),and that's why I go to training centers,faster and more efficient than self learning.
What did u mean by "google skills"?
And what did u mean by "learn java on the android platform"?
Thanks for the help and providing quick answers.
speeed_demon47 said:
Yes,I already know all about java,I read the articles on wikipedia,but why would I need to learn java enterprise? Isn't it mostly used around internet applications and servers? Can't I just use the APIs if i'm going to build an app that needs internet or server connectivity?
And why would I need to learn java Micro? Doesn't android use dalvik virtual machine to run apps? I mean,java Micro is mostly used to create feature phone apps,why would I need it with android?
There's something I don't understand though,on wikipedia the article about android says this:"Applications are usually developed in the Java language using the Android Software Development Kit, but other development tools are available, including a Native Development Kit for applications or extensions in C or C++"
So,the question is;what is the difference between apps developed in java and apps developed in C or C++?
The problem about C# is that I don't know anything about it;can't find any articles on wikipedia and other sites really don't help!!!
I meant by "understanding the code",having the ability to understand the command lines,what they do,what each line is responsible for and having the ability to edit or adjust something,.....etc.
And for the tight schedule;I need to learn everything about android within 6 months (I don't need to learn C as much,but it'd be a bonus),and that's why I go to training centers,faster and more efficient than self learning.
What did u mean by "google skills"?
And what did u mean by "learn java on the android platform"?
Thanks for the help and providing quick answers.
Click to expand...
Click to collapse
You miss understood again...
I will try to be clearer:
I meant by google skills, that you would find most answer yourself if you just use a search engine with the right terms.
You DONT need to learn Java ME/SE etc.
You can and will only use the APIs provided by the android toolkit.
So if you already know java, google "android developement tutorial" and start build some apps to get experience.
Forget C#, you don't need that, AT ALL for android.
Android apps, only need java.
If you want to understand the deeper layers of android, those are written in C.
But "int i=0;" is a variable i with value 0 in java and in C. So if you just want to read some of the code of the deeper layers and change small bits, you don't need to take extra courses in C.
So the conclusion is, you need to understand the android architecture and be able to write apps and have experience...
I would recommend to just think of some thing and write an app for that, learning by doing. Occasionally you can read some theory about the underlying concept of what you are doing.
An example would be to write an app that sorts values the user enters.
You would use already premade sort and array functions from the android api
Something like
Code:
Array x;
x.addAll(y);
x.sort(Descending);
To get deeper knowledge you could then browse the android sourcecode and see how x.sort actually sorts the array.
I think Android application is writen in Java ?
But maybe it is not that your question?
Dark3n said:
You miss understood again...
I will try to be clearer:
I meant by google skills, that you would find most answer yourself if you just use a search engine with the right terms.
You DONT need to learn Java ME/SE etc.
You can and will only use the APIs provided by the android toolkit.
So if you already know java, google "android developement tutorial" and start build some apps to get experience.
Forget C#, you don't need that, AT ALL for android.
Android apps, only need java.
If you want to understand the deeper layers of android, those are written in C.
But "int i=0;" is a variable i with value 0 in java and in C. So if you just want to read some of the code of the deeper layers and change small bits, you don't need to take extra courses in C.
So the conclusion is, you need to understand the android architecture and be able to write apps and have experience...
I would recommend to just think of some thing and write an app for that, learning by doing. Occasionally you can read some theory about the underlying concept of what you are doing.
An example would be to write an app that sorts values the user enters.
You would use already premade sort and array functions from the android api
Something like
Code:
Array x;
x.addAll(y);
x.sort(Descending);
To get deeper knowledge you could then browse the android sourcecode and see how x.sort actually sorts the array.
Click to expand...
Click to collapse
Ok,good,thanks.
So,I don't need EE or ME,right? But if I learn them later on (maybe next year or so),would they come in handy or would they be useless?
I've been developing in Eclipse and SDK with ADT plugin,it's very helpful and I've completed most of the tutorials so far (hello world,tom cat,......etc) and started building something of my own.I've been also using Titanium app accelerator,it's really good too (still mainly eclipse but the tutorials and help are better);but so far all i've done is just copy the code and that's all,I didn't write a single line of code (maybe a few lines,but that's it).
I also started a course a week ago (learning Linux kernel),so far so good,And I found a good site to teach me image files.
But a little hung up on the programming languages section,so,conclusion;I need to learn Java Standard,would enterprise or micro be any good?
And about the native source code,will java be enough? won't I need to learn C?
Thanks for the quick responses,it's a lot of help.
HuTcHx said:
I think Android application is writen in Java ?
But maybe it is not that your question?
Click to expand...
Click to collapse
I already know that,but that's not what i'm asking about.
The enterprise edition and what not just offer different sets of libary for other platforms, aslong as long as you program for android devices you will have little use for knowledge of the other editions.
Think of it as being a specialised technican for cars. They all have engines and 4 tires and a steering wheel and all technicans can work with that, but will you work in a VW repair shop or in the Mercedes repair shop?
In this case you will work on the android platform, as long as you don't want to switch to server programming in java (Java EE) or embedded systems (Java ME), there is no need to get familiar with that.
Java SE means standart edition and basicly already included in the android libaries.
If you don't want to keep copy pasting code, try something different that has not been done in a tutorial, or modifiy a tutorial to do something else.
But there is nothing wrong with copying code, if you have written a good piece of code there is no harm in reusing it elsewhere.
The android sourcecode is a mix of java and C, the lower layers are written in C the higher ones in java.
I don't know what you want to achieve with your knowledge? To write apps you don't need to learn C.
It is difficult to master all fields, easier if you choose one.
Dark3n said:
The enterprise edition and what not just offer different sets of libary for other platforms, aslong as long as you program for android devices you will have little use for knowledge of the other editions.
Think of it as being a specialised technican for cars. They all have engines and 4 tires and a steering wheel and all technicans can work with that, but will you work in a VW repair shop or in the Mercedes repair shop?
In this case you will work on the android platform, as long as you don't want to switch to server programming in java (Java EE) or embedded systems (Java ME), there is no need to get familiar with that.
Java SE means standart edition and basicly already included in the android libaries.
If you don't want to keep copy pasting code, try something different that has not been done in a tutorial, or modifiy a tutorial to do something else.
But there is nothing wrong with copying code, if you have written a good piece of code there is no harm in reusing it elsewhere.
The android sourcecode is a mix of java and C, the lower layers are written in C the higher ones in java.
I don't know what you want to achieve with your knowledge? To write apps you don't need to learn C.
It is difficult to master all fields, easier if you choose one.
Click to expand...
Click to collapse
So,learning java enterprise isn't really important;but is it important if I want to excel in the development process?
But what's the use of learning Micro edition AT ALL when it comes to android development???
Isn't it used to develop apps for feature phones and PDAs,not smartphones?
And after I learn Java standard will I need to learn any special libraries for android? I mean,will I be able to get to writing the code right away or do I need to learn about the android files and libraries? or are they java standard already? I know I need to learn to compile the packages,but is that it?
And what about XML files,I can do them with JDK or Apache Ant,right? so,I don't need to worry about them,do I?
I'm trying to learn as much I can from the dev guide and the tutorials on the developers site,but the dev guide is too long to both read and comprehend,and that's basically a huge problem,cuz I have a job and education and I can't find time to know everything in the dev guide.
I know it'll be difficult to master all fields,but the team I'm going to work with needs someone who's able to edit the deeper layers of the code and,so I think I'll need both java and C for that job,it don't matter anyways I have time to learn both.