This is something that I'm wondering about at the moment and I know that it's pretty much a beginners question, but do I have to do something with the code? How am I supposed to do? I want for example my application to be able for downloading on the internet on my own home page. Am I supposed to have a .jar-file to do this or something?
In short - how can I use my Java app on my Android phone.
Any advice?
How to use Java application on Android
The app needs to be built targeting the platform.
There is a tutorial here with links to instructions on building your first app, and also with links to the tools you will need.
There is a tutorial here with links to instructions on building your first app, and also with links to the tools you will need.
android does not run java. It runs dalvik. For all intents and purposes dalvik is basically java (source code is the same etc) but they aren't compatible. Dalvik also compiles to a .apk not a .jar. Dalvik bytecode is altered from standard java bytecode in order to be more efficient on mobile devices, there were some pretty fundamental changes though so java bytecode will not run on a dalvik VM or vice versa.
Most handsets if you just stick a .apk on the SD card or internal memory somewhere (downloaded from dropbox, mediafire, wherever) and then find it in the file browser will install the .apk to the device and add it to the app screens as normal. Some cell operators distribute handsets with branded firmware which may disable this functionality however that is very rare (I have come across one HTC handset on the vodaphone network with it removed).
So really if you want to bypass the play store entirely you would compile your application to a single .apk file. Stick it on a file sharing service. Users would find it in browser, it would be downloaded into their downloads folder on their SD card. When they tap it on the SD card it will prompt for install, they click yes, it installs it, done.
Most people just use the google play store as 99% of users rarely venture outside of it to obtain their apps.
Most handsets if you just stick a .apk on the SD card or internal memory somewhere (downloaded from dropbox, mediafire, wherever) and then find it in the file browser will install the .apk to the device and add it to the app screens as normal. Some cell operators distribute handsets with branded firmware which may disable this functionality however that is very rare (I have come across one HTC handset on the vodaphone network with it removed).
So really if you want to bypass the play store entirely you would compile your application to a single .apk file. Stick it on a file sharing service. Users would find it in browser, it would be downloaded into their downloads folder on their SD card. When they tap it on the SD card it will prompt for install, they click yes, it installs it, done.
Most people just use the google play store as 99% of users rarely venture outside of it to obtain their apps.
Soo...I don't really need to follow the tutorial that frob linked me to - I can instead use my finished code piece and compile it with something else in short?
Soo...I don't really need to follow the tutorial that frob linked me to - I can instead use my finished code piece and compile it with something else in short?
The application model is quite different as well, Android apps are not written in the same way as normal Java apps.
Well your existing java application will use libraries not available on android. You can't just change a compile setting. A full port will need doing although a fair amount of program logic will be re-usable.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement