I've got a lot of experience in Java but none developing mobile apps. I'd like to write an application using Java/Swing and then convert it for use on an Android phone.
Is this feasible or do I really need to develop from the ground up for the Android platform?
I don't own an Android phone as I can't afford one at the moment, and the Android emulator is so slow that I find myself wasting a lot of time sitting around waiting.
Alot of the code from Java is the same in Android but I would say don't. Android uses its own UI system and it would be hard to transfer from swing. Also when you get deeper into the Layouts the Android system has the application would be completely screwed up. Not to mention the whole Intent, Receiver, Content Provider aspects would not transfer properly. Then you need to think about memory. Simple answer in my opinion... no.
With Intent/Activities, in many ways Android applications need to be designed like web apps with pages connected by links. It's quite a different paradigm, so until you know it well I would develop straight onto Android.
If you use the control-model-view paradigm so that your application logic is separated from your display logic, then you should be able to port your application logic from ordinary Java to Android with few or no changes. As for the display logic, that will have to be rewritten using the Android SDK.
If you consider, J2ME may not support fullest functionality of swings. So, it breaks on the first step. Secondly, Android native development method uses XML for its presentation layer and java for Application and Business layers. If you can write the extending methods for android tags, then you may achieve your target at the basic level.
Rather I suggest use the phonegap and develop everything in HTML5, DOJO and CSS3. This would work on any mobile, any platform.
Related
Does anyone know a framework to develop a mobile application for Android with Java and HTML?
I mean develop UI with HTML (to reuse it with an other OS) and native functions with Java.
For the moment I am trying to develop multiplatform apps with Qt but it's quite complex to use native functions from Java, that's why I'm looking for an easier way to do it.
I don't think you can find this kind of framework.
If you meet some problems to use native functions with Qt I recommend you to watch BogDan Vatra videos and pdf
https://www.qtdeveloperdays.com/sites/default/files/BogdanVatra_Extending_Qt_Android_Apps_with_JNI.pdf
Besides, you should look at the QtAndroidNamespace class and runOnAndroidThread function.
Edit : You can find the videos in the Tutorials part of QtCreator
I am not sure about the Java but using javascript,we have alot of Frameworks like Titanium, Sencha Touch and PhoneGap etc.In this you can simply use the html,js,and css3 bundle to creates the IOS Android and as well as web.
I would strongly advise against reusing the UI on different mobile operating systems - it will always look as if it doesn't belong on one of those systems. Creating an Android UI isn't that complicated, you should try it.
That said, you could have just one big WebView on your native UI, displaying your HTML UI. You might need a web server in your app, serving the UI, though - I'm not sure.
I have a multiplayer Chess program and I wanted to know if there is an easy way to make an app for it. If I worth with Android SDKs on Eclipse, do I have to code the whole thing again or I can just use the Java code for making the app?
It depends on what libraries you're using in your game and their support in Android.
If you use Java for the existing implementation, you'll hopefully, have to write the UI bits, and the erst of the logic should simply work.
If this is a desktop app you're trying to port, you may have performance issues (given you're running on a mobile device now), so there would be some changes necessary.
If you're using any graphics libraries, check their support on Android. Some libraries have a reputation of having issues on Android.
I solved it myself. You just need to insert your JS files or you could use the Url of your uploaded app.
I am getting ready to start a little Android development and need to choose a language. I know Python but would have to learn Java. I'd like to know from those of you who are using Python on Android what the limitations are. Also, are there any benefits over Java?
Most of the points mentioned by Andrew stand, I just wanted to mention that python can be and is used for full fledged Apps published on GooglePlay and even iOS. I can't speak for other frameworks but here are some examples of Apps published using Kivy.
Process Craft Google Play iOS
Fantasy War hammer
PreseMT is a multitouch presentation maker
Memo robots
Ground Truth
Kaleidoscope
Showcase demo example from Kivy project
DefelectTouch game iOS
Bargenius and many more...
On Packaging we have tried to make it as simple as possible, we also provide
A pre-built VM that can be used to make your apk with you having to do nothing except
copying your project dir over and running one command.
On GUI, yes the ui is custom, by default(tries to match Android's Holo theme). However it can be customised to resemble other look and feels, although I haven't tried it personally.
Oh and as long as one is talking about python based apps on android, I found this project mentioned on stackoverflow PyMob, their apps page mentions some interesting apps .
I investigated this recently for similar reasons. My conclusions were that I could not use Python to develop a native-looking application, which is what I wanted at the time. Specifically:
Python can't receive callbacks from the Java UI classes, so you can't use any native Java UI elements such as ListView, etc. Only dialog boxes etc. are easily available. If you have a totally custom UI such as a game, you can try PyGame for Android, or you could look at Kivy, which also uses PyGame.
Packaging of Python applications is very difficult, especially because the Python interpreter is not included on Android by default. The Kivy and PyGame teams are making some intermittent progress on this.
Because of the aforementioned issues, Python is essentially never used to make full fledged applications published in the app store, and so the literature on how to handle the many sundry issues with SL4A (Scripting Layer For Android) is very thin.
So, if you want to make an application that uses native UI elements, that you can actually distribute in the Play Store, or both, Python is regrettably not an option.
I have developed Android Apps on the market, coded in Python. Downsides:
Thus far my users must download the interpreter as well, but they are immediately prompted to do so. (UPDATE: See comment below.)
The script does not exit properly, so I include a webView page that asks them to goto:Settings:Apps:ForceClose if this issue occurs.
I'd like to build an android application for a school project but I'm a bit confused, I saw that i can build an application using Java or using Jquery mobile.
Do they have the same capabilities?
If i build an application using Jquery , can i pack it and have it installed like a java application (as apk) or is it only used for building websites?
If so, what tool do i use to pack it?
jQuery Mobile needs an intermediary framework that communicates between JavaScript and Java. PhoneGap is a popular one of these frameworks.
PhoneGap is also actively maintained and they roll out new versions almost every month.
The main reason to use PhoneGap/jQuery Mobile is that it makes development easy if you already know HTML/JS/CSS. Another great reason to use PhoneGap is that you can use your existing website as the base for native applications, yeah, plural, not just Android but also iOS, Blackberry, etc. It also gives you a pre-built UI with some widgets so you don't have to roll your own.
The jQuery Mobile documentation talks about some of the caveats to creating a native application with PhoneGap and jQuery Mobile.
I don't know what you have already tried or what your skill set is (based on your stackoverflow history you may know more about java than I do), but you would be best off just using the Android SDK. I was able to design and complete a custom business project and learn java while doing it. I can't comment much on jQuery since I've never used it. jQuery seems like it might be a nice for the reasons Jasper listed but might add layers of complexity you don't need to deal with if you don't need to run your app on other platforms.
Jquery Mobile Framework provides the way how you web application looks on different hand held devices simply but this can not use the native device capabilities like picking up an contact from the contact book/application. while native application has the capabilities to handle all the system generated events or broadcasts.
I am basically a embedded systems programmer on linux. However, I would like to try my hand at writing Android applications. With no previous Java experience, are there GUI toolkits or something that can help me. Or is it mandatory to learn Java.
Any links, tips for newbies like me will be very helpful
There are various app builders available for those who do not want to do any programming but they are very limited in the apps they can produce. Basically, such builders offer the developer a series of templates which the developer personalizes before building the app. For instance with a video player template, the developer would choose the look and feel such as background colors etc but the rest of the app would be fixed.
Here is an article that looks at some things to consider before using a No-Programming app- builder
http://hypernextandroid.wordpress.com/2012/09/04/coding-and-no-coding-app-makers/
As you are already a programmer and the Java route is extremely intensive then you could try Basic4Android, HyperNext Android Creator etc. These have much easier learning curves than the Java/Android SDK approach and can still produce native apps.
I am 2 months late, but I have been using a software called Titanium Studio to develop android apps. You cannot write advanced apps like games, but its good for developing simple apps. If you have a mac, then you can develop for iOS as well.
You will basically use javascript and PHP to write your app, which are much easier than learning JAVA.
Cons-
It includes most of the commonly used functions from android, iOS SDK but it is missing a lot as well.
The size of the apps will generally in range of 10-20 MB.
Apart from that, If you want to create a simple app and want to do it quick Titanium is the software to use.
Yes you can. You just require an Android tutorial to get started. Try foolowing links:
One
Two
Three
Four
Its better if you first try learning some basics of Java and then try for this.
Hope this helps.
yes.
App Inventor for Android - its simple and easy, no need of any prior Java programming knowledge
Eclipse with ADT plugin - the better way to develop applications - start with Hello World
For UI development - try inbuilt UI editor with ADT plugin or DroidDraw
Gotta learn Java. But if you're familiar with C then the syntax will be familiar. It's object model is pretty simple and it's libraries are great, so it should be fun. Android, of course, has it's own constraints and best-practices.