Android Question Starting out, with a simple program to learn Basic4Android

MikeMyers

Member
I need some advice on programming a phone/tablet running Android. Douglas Adams once wrote “My strategy is to find a car… which looks as if it knows where it’s going and follow it.” Well, I have no idea of what I'm doing, but with a head start from some of you, maybe a few months from now I'll know what I'm doing (and all the misteakkes I made along the way......) Apparently you guys not only know where you're going, but how to get there.

I'll give a greatly simplified question that includes the types of things I need my program to do - don't laugh at how silly this sounds, but I need to learn how to do these things, before I try it for real. From what I've read so far, the Basic4Android software seems like a reasonable way to go about this.


I will have a micro-sd memory card with new medical pictures taken every few hours. When I run my program on the phone/tablet, I want it to start with a form to fill in, with several questions including:
date?
time?
What is the photo of?
Did you use the flash (yes/no)

I would want to save this form in a new folder, with the folder name being something that I select.

I would then want to copy several photos into this same folder.

When done, I would click <finish> or something similar, and the folder would be closed.

------------------------------------------

In doing this I need to learn how to create a form.
I need to have fields that are filled in automatically (such as time/date)
I need to have some fields that are entered manually (person's name), and
I need to have some fields that are from a multi-choice list.

I also need to find a way to copy the selected jpg images into the folder I've just created.

------------------------------------------

Can any of you suggest some options for how to write a program like this? Can it be done in Basic4Android? This would just be a test program, to learn how to use the tools, and how to write an Android app.

I do have a real purpose in doing this, but I'd rather start with a very simple program, to learn how to do the basics first.

I guess part of the question is to find out what I need to buy from BAsic4Android, and maybe a guide to getting started.
 

NJDude

Expert
Licensed User
Longtime User
If you are starting with B4A, I would suggest you start by reading the documentation (look at the link at the top of the screen), there you will find 2 PDF Basic4android Beginner's Guide (v2.5) and Basic4android User's Guide (v1.2) they contain samples, guides etc that will help you achieve what you're looking for.

Note that to use libraries you must have purchased a B4A license.

Welcome to B4A!!
 
Upvote 0

MikeMyers

Member
Thanks for the quick reply. I planned to purchase the license, but my friend Balaji suggested I start off with the trial version to get started.

I will do as you suggested - I was going to start with the download page, and follow the suggestions there to get everything going. I'm really ignorant about this, so if i say anything stupid, maybe I'll eventually catch on.

My very first question is whether B4A will let me do what I described. I think that what I'm after is really simple stuff, so I'm pretty sure the answer is "yes".

In the past, I used to start with a simple example of a program, get that running, and then work on modifying it. Eventually I got to where I could do things from scratch, once I "learned the language". In this case, I would be perfectly happy to start with something as simple as clicking on a button, and opening a window that said "Hello Mike, the time is 8:46pm".

My concept of what is going on, is that I would download B4A to my PC, which would get me some kind of emulator, and I would write the code to get something working on the emulator. When it worked properly, I would transfer the 'apk' file to the tablet or phone, and with a little luck, and if the stars are lined up properly, the program would work. Is this correct so far?

You mention that I need to purchase the license in order to use the libraries. Do I need the libraries for doing what I've described so far? If I need them, I'll get them, but I'd like to start out simple.


Balaji has already gotten me a small tablet to work with. I'll probably buy one if this starts to work out.

Again, thanks!!
 
Upvote 0

MikeMyers

Member
Actually, I won't be "using" a camera; what I'll be doing is transferring images from a "digital camera" (essentially, that's what it is) onto the tablet, and storing the photos in the same folder that my "data sheet" will go into. At some point I'd like to be able to view the photos, and delete any rejects, but that can come later.


I think I'll start by checking out the sample programs I read are stored here, and get that running. It should be "a start". Thanks again!
 
Upvote 0

MikeMyers

Member
Well....

If I properly understand the information on this website, I can either go for "local" or "remote" for working with the B4Asoftware. I assume that "local" means the development, compiling, etc., gets done on my PC, after which I send the file to the Android device - and "remote" means that work is done on the device? I guess that doesn't matter to me too much - the big thing is that when I purchase the software, it will only work as "local", so I might as well start off that way.

a) Have downloaded the trial version of B4A and installed it on my PC.
b) Have downloaded the B4A-Bridge and installed it on an Android device.
c) Am now downloading jdk-7u40-windows-586.exe on my 64-bit PC (as recommended)

(My network connection right now is very slow - it's supposedly going to take almost an hour for the download. I'm guessing that if I get this far, my PC will be communicating with my phone, via the USB cable.)

If I get that far, I will try to find one straight-forward sample program, copy it to my PC, and see if I can compile it and get it to work on device - presumably I will be creating an 'apk' file which I will copy to the device, and install that file on the device just as if I were getting it from Google Play (and yes, I've already configured the device to accept software from places other than Google Play. Hmm.... I guess it doesn't work that way - I guess I will just be downloading "jdk-7u40-windows-i586-demos.zip" which will get me a collection of demo programs to try out.

To Be Continued...... (...and if you see I'm making a mistake, please feel free to correct me.)
 
Upvote 0

BALAJITAC

New Member
I am working with Mike Myers on developing the tablet programming using B4A. I'm at Aravind Eye Hospital, and we already have a license for the B4A software. With help from some other people at Aravind, we have now written around 10 programs.

I'm the one who told Mike about B4A, and he's just starting to learn how to install it - then to start using it.
 
Upvote 0

MikeMyers

Member
Things are happening very slowly, thanks to a slow internet connection.

I downloaded the documentation, including the Beginner's Guide, which I am now following.
As this is written, the "Android SDK" is downloading, and will be installed to the root directory of the drive I have set aside for Android development.

Gradually, I'm learning what all the bits and pieces are supposed to do. Apparently the next step will be to download "Platform Tools".

When all this is done, I'm hoping there is a very simple Android app source code posted in the examples, that I can re-create and verify that it actually gets transferred to my device where it will run. To me, that will be the first indication that I've actually got something capable of working.....


(Hopefully I'm not wasting everyone's time, but this thread is exactly what I'd have loved to have found when I first came here, something so easy to understand that even a novice can follow it.)
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Well, we had a Doctor Evil as an avatar (but he is now a pirate with a hook and parrot), pls use Austin Powers (or Fat Bastard will do)... Ya Baby Ya!. Please allow myself to introduce.. my... self...

All kidding aside, Don't wait to purchase - best "x" bucks you will ever spend on a dev environment. 41,000 members speak to that.
Have a look at "Share Your Creations" section - all written with B4A! Easy and very Powerful.
 
Upvote 0

MikeMyers

Member
Hi Harris - maybe I wasn't clear. The question for me is not whether or not the software is worth the purchase price, but whether I am capable of using the software. After watching this video:

....I am feeling a lot more confident today than I was when I first got involved.

Nice to meet you!!
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
I was a bit freaked out at first - like with anything new. It was hard to get used to the new lingo - Activity (a form), service (say what?), code modules, resume, pause and the like. I personally had a heck of a time with designer scripts. Now it is all old hat and very logical. What a joy it is to program something that works and not have to fight with it to make it work. This is the essence of a fine development product - we shall call it B4A.

I simply can't imagine using Eclipse and Java to accomplish the same - my eyes glaze over looking at the code and it's complexity to accomplish something - well - Basic.

Enjoy the ride and many newcomers will look forward to your expert help in the future! It won't take long for you to reach that level by reading and reviewing tutorials like this - along with your own coding experiences.. Good luck.
 
Upvote 0

MikeMyers

Member
"A bit overwhelmed" is the best way to describe how I feel right now, but as soon as I get a bit of free time, I will replicate the above video exactly, just to get my feet wet.

Am I correct that we're just getting this running on the emulator now, and getting it to run on a device comes later?

I need to find some completely free time - every time I start on this, I get interrupted. :)
 
Upvote 0
Top