Using an android phone for development on the go - android

I'm always tinkering with new ideas, and sometimes I only have my phone with me. I played with ASE awhile back, but had a hard time typing much code with the limited editor, and only dynamic languages were available then. I have seen touchqode, and I think it's a neat concept to be able to compile and run on a server.
Are there any usable toolsets for doing development directly on android? Particularly, it would be nice to see a basic android development environment entirely on android as the host.

Are there any usable toolsets for doing development directly on android?
You already rejected all of them in your answer. IOW, the only significant on-device development that I am aware of is SL4A (formerly known as ASE).
Note that with SL4A, you are not limited to it's own editor, so you might wish to poke around the Market and see if there's an editor that you like better.
Particularly, it would be nice to see a basic android development environment entirely on android as the host.
You are welcome to start porting the JDK and the Android build chain to ARM. This may take some time.

AIDE lets us compile apps from Android. Looks like it didn't take as long as some thought.
Things have changed, so I wanted to update my original question to reflect a better answer.

Considering the limitations of these devices I think it's wishful thinking to have a full-blown development environment. But SL4A + python is quite amazing. Not a toy.
A small improvement to SL4A is to use the "Hackers keyboard" available from the market which can be customised to take much less vertical space than other keyboards. For me, this makes a large practical difference. Plus you can do the bulk of scripting from a computer: adb has a port forwarding option that integrates with the android python module and SL4A in server mode so that you can develop in a python environment on your pc but have the android stuff execute on your phone. You can also shell into the phone from adb and use vi to edit scripts. And then you can do tweaking from your phone, having done most of the scripting in a more comfortable environment.

Related

How to predict performance of a program for smartphones developed on a pc

I am developing a program that is going to be very performance-intense for Android/smartphones. Because I do this on a pc (Windows) I do not really know how my application will perform on a mobile device. I do not want to port this program to android until I have a good working version for Windows (this will be my first Android-app and I don't want to try to troubleshoot something when I'm not even sure whether my program is working).
I am searching for some database where I can compare pc-GPUs with mobile GPUs. I know that an accurate comparison is difficult between such different architectures, however, a small hint about the expected performance would be very helpful.
By the way, I am developing on a machine with an integrated Intel® HD Graphics 4400 and ideally, I want to compare it to something like an Adreno 306.
Rather than using benchmarks for the GPU, look at existing cross-platform applications with similar performance and see how it compares. Install it on your computer to make sure the intensiveness is similar (using whatever benchmarks you want), then install it on your android device to see if it can keep up to your expectations. You can find benchmarking apps or you can use the profilers on Android Studio to see how the device in question is handling the application.
This is about as good as you're going to get. Like you said, so much relies on the implementation and the vastly different architecture. Lastly, if you're building on a framework that builds to other platforms (libgdx, xamarin, etc), you should present a specific question to other users of that framework.

Tablet development for a dedicated system

I need to make an architectural decision for developing (actually porting) my embedded solution.
I will try to present my case as clearly as possible, and any advice I can get will be appreciated.
Introduction
I have an embedded system, currently developed on ARM11 architecture and ArchLinux OS. It is implemented using all kinds of technologies available under Linux, including C, C++, Bash and Python.
At this time, I would like to port my solution to a tablet, so I am trying to make some decisions about the architecture, based on the requirements of my system.
Requirements
The system is modular, and it runs multiple processes and threads. It also communicates to remote servers and controls the hardware peripherals. These are the basic requirements, at the moment, I will update as discussion develops:
Primary:
Dedicated system (minimum amount of other applications running, even in the bg)
Multiple processes, ability to set priorities
Ability to assign a process to a single CPU Core (cpu affinity)
Inter-process communication mechanisms
Complete hardware control (WiFi, 3G, GSM, mic, speaker, display, ...)
Creating sockets, etc.
Other:
Ability to connect a microphone directly to a 3.5mm plug (TRRS connector)
Mainstream solution to ensure reliability
Future-proof: minimize the porting effort for new tablets and HW
My questions
What tablet and OS combination would meet these requirements?
How to approach the "dedicated solution" requirement?
How to approach the software development, what language and tools to use?
My investigation so far
My investigation so far has been concentrated on the OS choice. The main options seem to be Android and Ubuntu Touch. Here are my thoughts:
Android
Android wins in the mainstream category obviously, but...
I have no experience of Android development, but as far as I can tell, I can either develop a Java application that runs on top of Dalvik, or I can go native via Android NDK. Maybe I can even bypass the whole thing and go native side-by-side of Dalvik, and develop in Python? I guess then I will lose the access to the API for HW access. Not sure how I would access the HW then. But if I go with Java development, this is a sandbox solution, and I am not sure if I can have such a control over the processes, HW and CPU core affinity?
Ubuntu Touch
Developing on Ubuntu Touch would be more like Linux development I am used to, since it uses Qt. The issue here is that the applications are developed using the SDK that restricts me to HTML5 and QML, which I'm not sure can allow me the same control over the system I need. If I use Python and avoid the SDK, same issue arises - how do I control the HW? Of course, there is a way to do it like on a regular embedded system I guess, but I don't want to reinvent the wheel if I don't have to.
Also, it seems that Ubuntu Touch hasn't been ported to many devices yet, only a handful of them are supported.
Finally
I am not sure how well I have presented my case, but I will update the question as needed with further explanations and requirement details. Thank you for your patience, your time and any help you may offer.
I am in the same boat as you, we are developing embedded system on ARM CPU. Currently the system is written in Python on custom built linux distro from hardware vendor.
We have been looking at Android and Ubuntu Touch for a few months. So far we didn't get any decision yet. But here what we found out from our incomplete analysis:
Android is quite heavy system, that also brings JVM into the mix. So you HW and memory requirements will significantly increase.
Android likes to take over the entire system, so sometimes you might be fighting with Android.
Android has very good IPC mechanisms, not available on mainstream linux kernel, such as Binder. Of course you can port it to another system. But this would be considerable effort.
Android has very rich GUI interface, also with things like NDK view you are not confined into the JDK box.
Android doesn't use standard GNU C library, it uses something called BioniC which is a port of C library from BSD. Usually it is not a problem for most software, but if you are using some linux specific low level features, like working with serial ports you will need to tweak your code. See what I had to do to port Java RXTX library to android https://github.com/vladistan/gnu.io.android
You can find a lot of Android developers out there who will do basic GUI programming for you, while you are concentrating on your app specific stuff. Interfacing between GUI and low level things is quite easy using binder. And of course you can bring in whatever mecahnism you want via NDK.
We have considered Ubuntu Touch. But so far it doesn't seem to be mature enough.

Writing a custom Android OS

I hope this is the right place to ask this.
I would like to work on an Android build with a completely custom OS. I was inspired by this project that ported Inferno to Android.
I would like to do this legally (obeying all terms of service and what-not) if possible, and I have no problem with disclosing my source code to a carrier.
Do any of you have experience with this? What are the considerations for getting a custom build to work with a carrier?
Since I am building on Android, I probably won't have to worry about cell/3g/4g hardware drivers, and I would like to buy a phone from the carrier anyway just to make sure it will be supportable.
I'm one of the creators of the Inferno project you mentioned. Anyway, making a completely custom OS for an Android phone will be difficult; a lot of the hardware will be undocumented or only drivable by Linux binary blobs. What we did (and what Boeing has also done recently for a commercial project) is strip away all the Java from an Android system, leaving a basic Linux upon which you can build your own custom interface. This lets you use all the hardware (since the drivers are in Linux), but everything that the end users see will be your stuff. There are a variety of ways to go from there. Inferno implements a virtual machine, so we can abstract the Linux stuff into our own Inferno-style world.
I don't think there should be any problems with the carriers. We started with a Cyanogenmod ROM and hacked on that; custom ROMs are just fine! I never had any problems, even when I was swapping my little pay-as-you-go SIM card among several phones running Gingerbread, ICS, and Inferno.
Head over to the AOSP source, and clone it. Strip out what you don't need in your branch and begin the kernel patching! You'll need to modify the kernel in portions to make it compatible (fairly) with the device you're on. The Android kernel is in fact a very close cousin of the Linux Kernel, and in Linux 3.3, they've begun merging the two. After this is done, write your interfacing mechanisms (be it a display, web interface, etc) and you can test it out on your platform.

Convert Windows Mobile 6.1 app to Android

I have a fairly large windows mobile app (written in NETCF 3.5). Those in power at my company are wanting to convert this app to run on Android.
What similarities are there between Android development and Windows Mobile (not Windows Phone) development? Specifically:
Window Forms (ie the UI)
P-invokes (my app has a lot of these)
WCF/SOAP web services support
C# and Visual Studio Development tools
Also, if you feel inclined, I would like a general statement on how a conversion would be from someone who has done it. (Keep in mind that I have never made an Android app.)
Background:
Someone (a non-programmer) here did a Google search and found a "tool" that converts Windows Mobile apps to Android for you (push of the button kind of thing). That person now has everyone believing that this conversion will take no time at all.
As a developer that has worked on several platforms, I just find that really hard to believe (though I would be happy to be wrong).
check out Will Google Android ever support .NET? as it might be what you're looking for. Not sure how well it works, but if the non-programmer is willing to front the money, I say give it a try
Update:
Looks like mono switched companies:
http://xamarin.com/monoforandroid
The short answer in NONE. Android is running Linux that is restricted to Java applications. If you want to port an application from .net to Android, you are looking at a total rewrite.
Sam
There is the monodroid project, which takes .NET applications and makes them run on Android's OS, but it's still very experimental and in no way ready for production applications. Otherwise, to mirror "Sam's" comment above, there are no similarities really. I've been building mobile apps for 11 years (delivered over 60 on various Windows flavors) and the Android model is very different than what you might have done in the past on Windows CE 5 or Windows Mobile 6 type systems.

Android or iOS for mobile development?

I would like to learn mobile development for fun and as well to enrich my resumé.
I'm currently developing in C/C++ at work on Windows (and sometimes with C# that I don't like too much). I have a nice Android phone and an iPod touch, so I wonder what is the best enviroment on which work.
Sure iPhone/iOS now has huge user base and a lot of attention, but it is used just i
on 3 devices from a single vendor (iPhone + iPod touch + iPad), Android instead is used by a lot of vendors, however is not gaining the attention it deserves.
I own a MacBook white so I can develop for iOS (I even have installed XCode but it seems a mess to me), but I prefer to work on Windows and I downloaded Android SDK + Eclipse and it seems much more easy given my Visual Studio background. I also know some Java and I'm already resigned to Linux.
So... which one should I learn, also given my background?
I don't think there is a real Answer to your question but since you already have the Android SDK and Eclipse set up why not try that first. Then if you don't like it try something else.
I found it very easy to deploy application on the Android Market and the registration fee is very small.
Android programming is a little bit difficult. Apple provide, in its development tool, a storyboard system that make very simple to control the flow of the app. Android is a bit more complicated.
On the other side, Apple programming is expensive: you need at least a Mac Book, an one between Iphone or Ipad. Last but not least, you need to sign to the apple developer program if you want to publish the app or to test it on a real device, which means 80 dollar/year. You can develop even without the program, and without a real device (iphone or ipad), but this means no possibility to test on a real device, which provides some characteristics that the simulator doesn't provide. And still you need a Mac, for Xcode (the apple developer tool) is only for Mac.
I believe though that is only your choice. Personally, i would begin with Apple in order to start with something that is simple at the beginning, but only if you have all the instruments listed above. For fun, Android is better: more complicated but free.

Categories

Resources