Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'd like to do some development of smart phone apps and my native programming language is java.
The first application I'd like to write will need to be able to (attempt to) connect to a network (LAN or WiFi) automatically in the background (on a schedule).
would an android phone be the best path or are there competitive purer java options?
I would definitely go with Android, extensive SDK, community, and increasing popularity. I think the What is Android answer on the developer web site says it all.
"Android is a software stack for
mobile devices that includes an
operating system, middleware and key
applications. The Android SDK provides
the tools and APIs necessary to begin
developing applications on the Android
platform using the Java programming
language."
I think Android is the best start path today.
The main options would probably be BlackBerry, J2ME for Nokia ect, or Android. I personally would recommend Android. BlackBerry is overall a little more work than Android and the pure J2ME option is incredibly underpowered in comparison to either.
Blackberries use java applications, so that wouldn't be a bad choice.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I was developing an android app using ionic framework and planning to convert the app to native. I have read few articles on the internet and still couldn't get a better answer for my question.
Since there are two languages to develop android apps, what would be the recommended language between Java and Kotlin for large scale android app development?
Google is going kotlin-first in its documentation, even saying that you "Write better Android apps faster with Kotlin". So you should be using Kotlin. Furthermore Kotlin has some advantages:
less verbose
strong interoperability with Java (you can still use java libraries)
Coroutines (Improve app performance with Kotlin coroutines)
But of course, you will find less tutorial than in Java on certain topics (but it will catch up, the community is growing fast).
Edit 2021/03/09
Another reason you might consider Kotlin for android is the kotlin extension for gradle which provide auto-completion and an object like approach in configuration files. You can find a few resources here and here. Even though this is not pure development keeping a consistent language throughout the all project will make the process easier for everyone.
Edit 2021/03/18
With the announcement of Jetpack Compose (see here) Beta Google also pushes its use by saying "Jetpack Compose is Android’s modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs." and using descriptions as "Less code", "Intuitive", "Accelerate Development" and "Powerful".
Resources
Modern Android development: Android Jetpack, Kotlin, and more (Google I/O 2018)
Google I/O'19 - Chet Haase Interview on Jetpack Compose
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Can I create simple programs for Android using Kivy or do I have to learn Java?
By simple, I mean some graphics (some rotating lines, a timer, a highscore), a memo etc not real-time games.
I've created this kind of programs for Windows/Linux and I'd really like to extend to Android.
On Google, most of the answers say that I should learn Java, whereas the remaining answers say that Python is pretty good. I also asked this question on chat, and some said 'yes', while others said 'no' and finally someone said "All programming languages get to be translated to JavaScript, so it is not much of a difference".
No. And may be Yes. Let me explain.
No:
The app will not look native if you use Kivy
There will be a lag in startup
You can call native Java API using Pyjnius but sometimes it won't work fine or you will need to work very hard to get simple things done.
Because you can not use the native UI, crafting a good looking android app might be a lot of work.
Yes:
You can build an app that works
Many games and apps don't use native UI but they are still very usable
You can use projects like Plyer and Pyjnius to get the common android functionality
Kivy might be an excellent choice for games
My recommendation:
Please do check out the apps and games built with Kivy on Play Store. Play with them on your phone or tab. See how they look and feel. Checkout the Kivy docs and see what they offer.
PS: I am a big time Python fan and I do like Kivy. I hope and believe that it will offer better widgets and UI integrations in the future. I wish Kivy offered something like NativeScript where I could use Python to create native widgets.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I see the statement below on Google in one form or another
Most of the Android development is Java based because Android supports
a large number of Java libraries
I am coming from Java based web application background. I have never heard the statement "Windows supports one specific language but Linux does not". Then why in context of mobile OS we say android supports Java. The role of any OS is to execute the commands and not to support the specific language, right?
I know I am missing something basic here, but what's that?
Then why in context of mobile OS we say android support java.
I do not know who "we" is. Experienced computer programmers would not say that, and even your made-up quote does not say that.
Role of any OS is to execute the commands not to support the specific language right ?
Correct. And, given a rooted Android device, you are welcome to try porting any language you like to Android, and in a custom ROM mod, you are welcome to arrange to allow the user to run any program they want in any of those supported languages.
However, most people do not have rooted Android devices.
On a normal Android device, the Android frameworks put some limitations on what you easily can use for programming.
For example, you can divide the world of Java-capable servers into two main categories:
Those where you have complete control over the server, which is roughly equivalent to running a rooted Android device
Those where all you can do is upload a WAR and related files (e.g., static assets), which are run on a Java-powered server managed by somebody else
In that latter scenario, you are not going to have complete flexibility in programming. Presumably, you could integrate JVM-based scripting languages, but you may have difficulty in using C++. That is not an issue with the OS — the server itself is probably perfectly capable of running a C++ program. It is an issue of the framework in which your code is running (whatever people use for WARs nowadays, as it has been a long time since I worked in server-side Java development).
The primary framework for Android development is based on Java. Courtesy of WebView, this also opens up hooks for hybrid development (HTML/CSS/JS). NativeActivity makes it possible to write full Android apps in C/C++. Various toolchains allow you to write in other languages (e.g., Kotlin) that compile into something that works with Android's frameworks, and you can embed scripting languages. But you still need to stick to the frameworks, which puts some limits on what you can do and how you can do it. This is not the fault of the Android OS, but rather the frameworks.
Yes, Android is based on Java. But recently the grandpa Delphi acquired fire monkey, which is supposed to transform Delphi code in to native Android code. That way it supposedly run just like a native application.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Are there any libraries or methods that would make sharing code between C++/Java and IOS/Android easier? I realize we have JNI and IOS can use C++ pretty much directly, but it seems like it could be easier.
Microsoft Universal Windows Apps and Chrome Apps are (sort of) doing this.
Open Source is preferable.
I'm using Qt Creator a lot. With the latest versions, you write your whole application in C++, using Qt toolkit, and you can compile it targetting PC, Android and iOS (never tested this last one). If you need to call some SDK functions not available in Qt API, they provide wrapper objects to create and manipulate Jni objects, and you can also execute pure Jni code (loading a java file) if you want to.
If you are looking to share Java, you could try to use this: https://github.com/google/j2objc. I am not certain I'd say that it is easier than using C++. Each option will have some challenges. The downside to j2objc is that it is a translation of Java to Obj-C. So if there is a bug in it (note the comment in the desc which indicates it is between alpha and beta quality), you will need to figure out how you deal with it.
Admittedly, I have only done limited Android dev, and for that, it used the NDK and had a C++ lib which was shared between iOS and Android. I've also developed apps for iOS that were probably 95%+ C++.
BTW, your question is actually a bit vague. If you are talking libs, you should specify what areas you are looking to solve for. Your solution will vary based on your goals.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
After I downloaded the Google Mail and Google Maps application into my mobile phone I got an idea about a service that I want to implement.
My problem is that I never did any programming for the mobile platform and I need someone to point me out some resources for the Hello World on a mobile and then something a bit more complicated.
Let's make it a bit broad, as in J2ME in general for the moment. I'll dig into Android once I get the non Android/*Berry/etc out of the way.
Clicking here would be a pretty good place to start, it's where the best J2ME programmers have started before you...
Install NetBeans with J2ME - you can test your mobile applications on a variety of target device emulators. Easy development model - you can develop GUIs rapidly with the Visual Mobile Designer.
I would really recommend looking at Blackberry as a target platform to play with, for the following reasons:
Lots of documentation
Access to cheap devices for testing
No walled garden (approval system or closed marketplace), you can distribute your app via over the air downloads (user just has to point their browser to the appropriate JAD file and download/install begins)
Large user base (at least within the US)
Quality forum support for blackberry developers
Supports J2ME. You can either develop Blackberry specific apps of J2ME specific apps, both run on blackberry devices.
Blackberry specific apps have a more elegent UI library (lots of J2ME witdgets you need to roll your own or use a library like LWUIT) and you won't be able to run Blackberry specific apps to other devices (though the underlying logic will be the same)
Both Blackberry and J2ME specific apps can still access and use underlying non-ui classes of each framework.
The only cons:
Not as sexy as Android or iPhone development
Initial setup can be clumsy
Tough to monetize because no formal blackberry store to manage transactions and installs
You can get more info about Blackberry development here:
http://na.blackberry.com/eng/developers/started/
Starting from Sun's JavaME (former J2ME) website you can find a lot of documentation and examples (even if i must admin, they are a little old).
If you want something more complex yet more advanced, you can have a look at GEAR Java Mobile Framework. It's a lightweight JavaME framework and it's hosted on sourceforge.
There is also a blog containing some usefull tutorial on how to start a new application from scratch.