What should a developer know before building cellphone apps? [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to start making cellphone apps with Android as first choice but not the only one. I have 10 years of experience with Java, C#, C++ in commercial applications and I know that many things and practices for this applications are not valid for cellphones. Where do I start reading? How do I adapt my way of thinking to this new environment as quickly as posible? I plan to make some money with it sometime in the future as an extra income or a career change maybe, who know. Any resource or advice you could recommend will be very welcome. Thanks in advance.

Just start with Android Developer site http://developer.android.com/index.html.
It contains all you need for the beginning. Also take a look onto Commonsware android books,
those are really great both for beginners and experienced programmers - http://commonsware.com/books.html.

You could start with two great books listed as reference [1] (Ableson F. et al., Unlocking Android, 2009. Manning Publications Co., ISBN 978-1-933988-67-2) and [4] (Conder S. and Darcey L., Android Wireless Application Development, 2009. Addison-Wesley, ISBN 978-0-321-62709-4) in my degree thesis. Both have an extensive walk-through of Android, which you as a developer should know. You'll get all you need from "Hello World" to deploy an actual application in the Android Market.
Android is the place to start, since you already know Java and C# and C++. You can even use native classes in Java written in C or C++ if you have some useful standard classes in your library. More on Natives you'll find in the reference book [9] (Silva V., Pro Android Games, 2009. Apress, ISBN 978-1-4302-2647-5).
The best of luck!

Only support the TOP os's which generate income. So at this moment IOS and Android.
Don't go down the path of Symbian and Java... it's dirty, and you won't like what you see down there.

What really got me going was the Hello, Views documentation. Will really get you up and running instantly.

I recently decided studying Android, and http://developer.android.com was a great resource. You should read the Application fundamentals doc first and User Interface documentations later.
There are some tutorials too.
I read the whole Application fundamentals, and that gave me a good idea of "how to program for Android" since it has its own architecture and environment. Get the idea of Activities, Services, Broadcast Receivers and Content Providers and try to adapt yourself to that structure. Then read about how Tasks work, and later go into UI.
As a subjective opinion, being Android so popular and growing, I don't think it's worth the effort to study Java ME or even C (I'd go for iPhone devel in any case with Objective-C). Android will probably give you more money and faster. Java FX might be interesting...

iPhone
Android
Samsung Bada
I would like to mention that iphone and Android communities are very much evolved and have a great developer community and resources. Samsung Bada doesnt have a good developer network nor does the SDK support many operating systems. I think it works only on Windows.
You need to first understand the mobile platform architecture, the different frameworks which the platform exposes to the programmers to develop applications.
There are emulators for you to test, however you have to have one of those devices to do a real time on-device testing.
With respect to programming, i think your experience is more than enough but one needs to come out of the frame of mind and think differently. A typical device has limited processing power, limited memory, limited screen space but the user demands beats expectations compared to desktop/enterprise software.
Lastly most important thing is the IDEA of the application. You may want to survey existing application on the stores and start thinking. You can also develop and application which would solve your problem with mobile devices and you know other users also may want such a application.

Related

What are the disadvantages of developing android using cross platform languages? [closed]

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 4 years ago.
Improve this question
I started to learn android development in Java and followed that path up to now.
Nowadays there are many cross platforms development languages such as Xamarin, React Native and etc.
I know that I can develop for both iOS and Android in cross platform languages which is usually requested by customers to develop mobile app in these two platforms.
Now my question is what is the benefit for developing in native android and iOS platforms over using cross platform languages?
I think if I have not enough reason to stuck to native development, I could not satisfy my customer to develop their app in native languages and I need to migrate to cross-platform languages.
So I want to know are there any bold benefits for native development or not?
This is one of those endless debates in development. There are so many reasons to go either way.
Native Benefits:
Best possible user experience
Access to all the features of the os and hardware
Smaller and faster applications (especially UI responsiveness)
Often easier to maintain (no need to deal with platform bugs)
Quicker response to o.s. changes
Cross-platform Benefits
Faster development to access the larger user base
Easier development - no need to learn as much about each native system
Powerful integration options (Cloud, Security, Game Engines, etc.)
For involved UI, I suggest that building your UI to target the native platform and everything else to be cross-platform. It is important to understand how important the user experience is to the success of the app you are making. Something simple like accessing some data from the web and showing a chart will look fine in a cross-platform app. Doing advanced image manipulation will likely require native UI to feel right.
The bottom line is "it depends on the project"
It depends on your project requirement to develop native app or hybrid app.
Choose native development if
High performance
You want a fluid, high responsive user interface
The user interface should feel familiar to users on each platform
Your application needs full access to all device hardware and functionality.
Choose cross-platform development if
You want to develop a quick prototype to test and validate a simple concept
Your application has a simple user interface and has limited user interaction, such as listing and showing news content
Your user interface has limited scrolling and swiping and users will not be affected by a sluggish screen response
Your application does not process complex data or work with audio or video
Cross-platform development is not a silver bullet.
Taking decisions about changing from native development to hip frameworks and cross-platform tools, you need to understand specifics of implementing same features in terms of this cross-platform tools. And this can be a problem in itself, because you will need experience with cross-platforming.
Cross-platform tools are cool as in "it will be a single codebase", but in some cases they are not. Different OS means different UI / UX, services and underlining implementations, as they form according APIs. It is baffling to see a React Native project with different set of modules written for specifics of Android and iOS, just to understand that this exact project should have been written as separate native applications all along.
So, before developing, take a quick dive into specific cross-platform tooling you think will be the best and you will understand implications of using this tooling for your project.
So just use Kotlin. Kotlin is interoperable with Java and working with JVM, but also has native compiler for iOS. Of course development for both platforms makes some limits, but if you want to create cross platform application it may be useful for you.

Why Android support java but not other languages? [closed]

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.

Why shouldn't an Android app be written in C/C++ because you "simply prefer to program in C/C++"? [closed]

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 4 years ago.
Improve this question
Updated(for clarity and to reduce ambiguity):
I'm going to start tinkering around with android apps. I was planning on writing the in C++ using the NDK (since I have more experience in C++ and prefer it to Java) but came across the following on the Android NDK page:
you should only use the NDK if it is essential to your
app—never because you simply prefer to program in C/C++.
I was under the impression that you should use the language that you prefer, as long as it fits the job. Could somebody explain why it is so heavily advised not to use C/C++ for android development?
Original:
I'm going to start tinkering around with mobile apps, specifically android which is the OS of my current phone, and I was wondering if writing the app in C++ (or at least the core, then wrapping in Java) was an acceptable option.
Some background, I'm a computer science major who has taken 3 C++ courses(intro, intermediate, OOP, and am taking an STL course in the spring) and only 1 Java course(intermediate). Because of this, I am more comfortable with C++ and prefer it to Java. I came across the following on the Android NDK page:
Using native code on Android generally does not result in a noticeable
performance improvement, but it always increases your app complexity.
In general, you should only use the NDK if it is essential to your
app—never because you simply prefer to program in C/C++.
I was under the impression that you should use the language the fits
the job as well as one you're familiar with
I may want to port the application to another mobile platform, such
as iOS, that supports C++ but not java
While Java is a high level language and thus should make development
faster, I feel like development would be slower because I would have
to relearn almost everything (since I have only taken one class on
the language)
Any advice would be much appreciate.
ps: many of the answers on this subject are from years ago and there are very few follow up answers that mention the NDK allowing the development of full native apps on android 2.3 and newer.
Think of it this way. You have the ability using the Java SDK to build a full working application that takes advantage of 100% of the APIs available to developers. There is nothing you can do with the NDK that cannot be done with the SDK (from an API perspective), the NDK just provides higher performance.
Now look at it in reverse. If you choose to write an application 100% in the NDK, you can still write a fully functional application, but you are limited in the number of framework APIs you can access. Not all of the Android framework can be accessed at the native layer; most APIs are Java only. That's not to say that all the APIs YOU may need aren't available in the NDK, but nowhere near ALL the APIs are exposed.
Beyond this, the NDK introduces platform-specific code which expands the size of your distribution. For every device architecture you intend to support, your native code must be built into .so files (one for armv5, armv7 and x86) all packaged up into the same APK. This duplication of executable code makes your app 3x the size (i.e. a "fat binary") unless you take on the task of building separate APKs for each architecture when you distribute the application. So the deployment process becomes a bit more work if you don't want your APK to grow in size significantly.
Again, while none of this is prohibits you from doing what you choose, it points out why Google describes Java as the "preferred" method for the majority of your code and the path of least resistance. I hope it sheds some light on why the documentation is worded the way it is.
If you're only going to develop one app in your life, use the NDK.
If you're aiming at learning Android development with the intention of developing more than one application during your lifetime - and want to be able to properly support them all - you're very likely to do better in the long run if you learn Java and use Android's Java SDK instead.
The programmers at King use C++ for their game logic. And they seem to be doing fine judging by their turnover.
In my experience, C++ is for problem solvers and Java is for problem avoiders. I love either language, but C++ is quite rewarding when you write good code. However, it may just take several moments of wizardry to get there.
You could recommend C++ for Data scientists as well, who would normally get their job done by, say, Python or R. C++ can do the same with as good or not better performance, but it just takes being a genius in the language. That is why I'd never not recommend C++ to the one that wants to do it - I'd just give a heads up to the treat that they're in for.
I found this interesting article from:
http://betanews.com/2014/07/22/why-c-is-the-perfect-choice-for-modern-app-development/
C++ was built specifically for platform independence and as such is found on every single operating system in existence. Your typical mobile user may know that Android apps are written Java and iOS apps in Objective-C, but what many don’t know is that there is more C/C++ code in memory on your devices than anything else. C/C++ drives much of the technology of small devices (like the kernel, which interacts with the hardware, as well as typical run time libraries) and the telecommunications networks that enable these devices. More importantly for a development team, is that there are C/C++ interfaces and libraries for anything you need to do on any device and platform. The Android NDK toolset is a great example of full C/C++ support that was added originally for game development teams to enable them to get the best possible performance out of the device by avoiding Java and the Android Java runtime Dalvik, the virtual machine on which Android Java code is executed on. It has been regularly improved to enable every Android service.
I would say use java for main app. But if you have some c++ code you need to port or some library you need that is efficiently implemented in c++, then use ndk for those bits
I don't see any reason to not use C++ for normal android development , If you have extensive experience in working in C++ and with complex OS like windows or any other such, then you can grasp android quickly and is not as much complicated as the other OS are. while learning java or working without learning it would be more frustrating and complex !
The most important consideration is that the compiled Java code will run on all android devices unchanged, whereas the native code will need to be compiled for all target platforms.
The general intent for both Java and Android is that you write the majority if not all your app in Java and use native things only when there is no other option... so everything about writing the app will lend itself to doing so in Java.
You'll spare yourself a lot of aggravation in bridging between the native and Java worlds by writing in Java.
As well, you will do yourself a big favor if you take the plunge and learn Java. Not only will your Android app be the better for it, but you will expose yourself to a significantly different approach to OO and you will be a better programmer for it.
Add to that the fact that you will side-step a whole bunch of security risks by writing in Java.
In my mind, this is a no-brainer - use Java.

Do you need a "complete" understanding of Java to program Android Applications? [closed]

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 9 years ago.
Improve this question
I am looking to start developing applications for Android and i was wondering if you could fill me in on the know how's and the requirements on a technical viewpoint.
I have the SDK, Eclipse and Java installed and even a handset to "real" test on.
My question is being a complete amateur to Java and having never used the language how much java would i have to learn to develop Android Applications ?
I would say you can just start with some tutorials the same way you would when starting with just Java. You'll learn along the way, just use a lot tutorials.
There is not much difference for the language, but there is a great difference in the framework, ie. the way you set up applications.
So just Java you would learn:
public static void main(String[] args){
System.out.println("Hello World");
}
In Android it would be:
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
System.out.println("Hello World");
// Or:
Log.v("MyActivity", "Hello World");
}
to print "Hello World" to the console respectively the log.
The short answer is no since nobody has a "complete" understanding of Java anyway.
The longer answer is the complexity of your Android apps will be limited by your knowledge of Java. You can probably learn to write a "Hello, world!" app on day one, but it will take several months before you can write simple but useful apps. It also depends on how whether you are new to Java or new to programming in general.
My suggestion is to get a good introductory book on Java and maybe another on Android apps and start there.
Barry
For basic applications - no, a "complete" understanding ist not essential. What you'll have to learn is to use the android framework, and I think, if you grab some android related tutorials and books, then it should be OK even if you start with basic Java knowledge.
(I assume, that you already know some other language and have a decent experience with object oriented programming)
You should have a good understanding of both Java and object-oriented programming.
You should have a firm grip of how Polymorphism and Inheritance work in java. These are pretty central to Android development. Also, having an understanding of java memory optimization and Threading are useful skills for writing more advanced applications.
Learn java up to understanding within reason the following concepts/implementations:
Object Orientation (this is a biggie)
Interfaces
Superclassing / Extending
Some ultra-common java APIs and syntax
Our good friend, mr. garbage collector.
Then you'll be ready to go in Android dev. I wish I had read the book "Head First" java development before starting with Android, it would have helped me immensely.
You would benefit immensely by learning Java first. All of the "Android" code is Java-based so you will handicap yourself by not going through a few tutorials (at the least) to get caught up on Java.
I would suggest NOT starting with Java first, as others have said the framework is so different you will be learning syntax that you will not use writing Android Apps. Get a good book on Android development for beginners and start from there. I've found Android Application Development for Dummies to actually be a very good book, as well as O'Rielly's Learning Android. As you come across the need for Java knowledge, then hit the Java Tutorials over at oracle.com, pick up what you need and then back to Android specific documentation.
You aren't going to be using System.out.println in a real Android App, you will be setting a textView either programmaticly or in XML, so learning the Java way won't be all that helpful.
Start here: http://developer.android.com/resources/browser.html?tag=tutorial and do all the tutorials.
You need to be familiar with the basic Java tasks
knowing what is a package, a class, some inheritance
understand the building of your app (compile, link and packaging)
debugging
You can start with building the tutorial sample, then going down in Java code progressively.
It depends on the complexity of your app. If you will be building complex and high quality apps like Google Maps or Angry Birds you do need to know Java very well. I would suggest you to learn Java because you can make lots of things with it not only make apps for Android. Good luck!

Is J2ME worth learning

I want to get into some mobile development. I studied a tiny bit of J2ME way back in the day and it wasn't too bad. But now with newer technologies like Android and so forth I ask myself if it is worth my while to (re)learn and invest in J2ME as there is this perception that it is 'old' and 'clunky', yet it's what still runs on most mobile phones. What do you all think? Thanks in advance.
I don't know, but this Google Trends comparison suggests that Android is far more significant:
http://www.google.com/trends?q=java+mobile,+android&ctab=0&geo=all&date=ytd&sort=0
You might also be interested in this:
J2ME VS Android VS iPhone VS Symbian VS Windows CE
Not an exact duplicate, but close...
It's not difficult if you already know Java so why not? Everyone focuses on consumer stuff like smart phones, but it's used in a lot of embedded systems, so it might pop up in a project.

Categories

Resources