• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How complicated will it be to build this app?

fernandq

Lurker
Not looking to have this built for me but rather get an idea of how complicated this proposition might be.
I have written code using tcl/tk for quite some time and I would not have much problem writing this code (actually, I have written a very similar code before) but since Android is Java I will have to educate myself before I try to build this app. What I am trying to find out is how much will I have to educate myself before I can pull this thru. Learning to write code in tcl/tc did not took me long and I actually did a lot of learning while writing code so again, not having experience in java I am seeking the feed back of those that are currently way ahead of me to give me a better feel of what I am getting into...
victory.gif


This app will be based in a program built for windows. I have thru the years ask the vendor if they are going to port it to android and I always get the same response, "in a few months"...

Here is what I am looking forward to build...

Overview

Need to create an Android app that will consist of an UI and data processing terminal to communicate with a serial device. The terminal will be capable of sending commands to the serial device to gather information, process the information and then display it in human understandable terms.

Goals

Basic program:

* Create communication with a FTDI chip at 1200 Baud Rate, 8 data bits, No Parity, 1 stop bits and xon/xoff flow control, I have prove it to work with no control since the amount and rate of data is so small.

* Capable to send hex ascci commands, receive a dump in hex ascci then translate that hex ascci dump into decimal format for processing. The serial device communication and hardware cannot be changed. Most all commands are set but there is one command that the value will change depending on previous data found.

Example of communication:
send :000000037D (status command)

Response:
Hex/ascii -> decimal
:0401010C2A0094 -> 4 1 1 12 42 0 148
:0401010C9A0489 -> 4 1 1 12 154 4 137

In this example column 2, 3, 5 and 6 has the data I need and will have to process to display the final values.

* Status command should have option to be controlled with a timer with options for 1, 5, 20, 40 sec and Timer off. There should be a button on the UI to send that status command, also, the ability in the future for the command to be microphone driven (x amplitude loud noise will trigger command).


UI:

* Dark colors to keep the display from eating up the battery.

* Should turn off the display every 10 seconds and should come up on new data, mic driven or phone shake.

* Should have a display where the last data numbers will be displayed. Also to have the ability to create a second larger display with the same last data numbers.

* Need 8 buttons for commands, drop down menu for settings (timer settings) and exit button.

* There should be a space (table) to display data, up to 99 records. It should look more like a excel spread sheet with just 2 column. These columns will bet the data location and the data itself. The table should be able to hold about XX amount of records, if it gets larger then a scroll bar should be used to navigate up and down the table.

Enhanced program
Display altitude/barometric pressure on request(capable phones).


Future:
Right now the device talks to the computer via a serial/usb dongle but I am planning to build the hardware to make it Bluetooth capable but in very few odd instances I might have to run it with the dongle due to the distance between the device and the phone might exceed the most common 30 feet Bluetooth maximum distance.



Im tired of taking my pc to a dusty and pc unfriendly environment so I have decided to take the plunge and build the app myself. Learning Java and android will be beneficial as I can see me in the future building more apps for personal use .

As it is now I can control this device using a hyper-terminal in my Samsung Note. Problem is having to type the commands manually, getting the responses back, translating those hex responses to decimal then building the response... too much work by hand...

Currently im using Slick USB Serial Terminal. Although they have a paid version that could help with the commands it will still leave me with processing the response by hand. It is useful when all I want is to advance the display on the device as it is the most used command but still at times it is imperative to get the status from the system and I am back to square one. And if I wanted a full status report It would take me nearly an hour to process by hand...

I have bought these books:
Java All-In-One for Dummies 3rd edition.
Programing Android, O'Reilly, 2nd edition.
Beginning Android 4, Application Development, Wei-Meng Lee, seems to be 1st edition.
Android application development for java programers, James C Sheusi, also seems to be 1st edition.

Anyone care to comment or recommend a book or a website?

Thanks everyone!
 
Effective Java by Joshua Bloch (it's like the Java Bible)

Do the tutorials on the Android developer website to start.

Have a look at the API demos that come with the SDK (in the extras folder I think)


Good luck!
 
yep, that's the site.

You can learn Java as you learn Android. That's how I did it. Although I came from a similar language (Flex/ActionScript w/ a small bit of php/js) so already knew OOP / design patterns / how to use xml modules for layouts and the syntax was nearly the same, and the class system was similar. I mostly struggled with concurrency and passing objects around (aka Marshaling).

For you, I would imagine you might have trouble with Java's strict nature. But at the same time your low-level understanding of serial ports and sockets will do very well in helping you through any IO stuff.

But the tutorials on that site start with very simple Java, like 5 lines for "Hello World" and increase in difficulty as you go along. It's actually all about eclipse and the tools and XML until like page 5 of the 1st tutorial.

I highly recommend you use Eclipse (or at least Android Studio).

Java is a very different beast than a dynamic language like tcl. An IDE can be very powerful due to Java being strongly typed and run in a VM. Jumping to reference, finding all references, project wide refactoring tools, step debugging, continuous build and error checking, and so on.

These are different advantages than what people are used to who develop with dynamic languages. Not better or worse, just different (I work with a lot of Ruby guys)


//just a bit of fun but...If I had to guess I would bet you use some type of text editor like vim, emacs, notepad++, Sublime or TextMate?
 
I did just a few things in perl... cant even remember what. I used emacs back in the day when I was working on SUN station but sometimes I found it easier to just open a text pad and go at it. Later own when we move away from unix and into the microsoft world I started using another text editor which it's name escape me. I havent wrote anything serious in a long time since my job description does not really include software development but back in the day we were our own development group. We do have one but those guys develop for the entire company now so they dont have time to answer anything. Bad thing, they are all very strong in Java...
I will look into that. I might end up taking those other books back. They are close to $200 and even know they might be of use and one can never have too many books but it seems I will not need them in a long time...
Thanks for your advise.
 
I have try both the book and website and it seems reading and getting the basics on Java before trying to program will be of best results for me. anyway, anyone care to comment on how complex this app could be?
thanks!
 
The Android Developers site gives u step by step instructions on getting started & to make sure it was done properly
 
Back
Top Bottom