Hi all!
Im working on a project but im in way over my head..
If it were easy it wouldnt be fun...
First of all; im not the average joe, i have some learning difficulties, witch in essence makes it very hard for me to learn programming in general since its such a huge piece of knowledge to acquire by reading before its getting useful in practical terms.
I do however learn well by doing, so by following guides and so on makes the components much more clear to me compared to reading about them in a generalized manner.
This has been working quite well for arduino, there are numerous easily approachable guides to do pretty much anything, so i generally just have to modify and knit together two or more open-source projects in order to achieve my project goals.
But with Android and the Android Studio application, im hitting a brick wall..
The issue is mainly that the android studio guides expects a certain degree of understanding of java (i have none), and the java guides are too general in nature, and mostly oriented towards web or PC enviroments, so nothing looks similar to what the android studio is creating as a new project.
So im on the verge of giving up on learning java (ive been at this for a while now and literally not getting anywhere) but i figure i give the community a cry for help..
Now, the project is quite ludicrous, it started as a simple turn indicator controller for my recumbent bike a few years ago and im getting pretty close to finishing the version 2, with a number of additional features (high/low frontlight, brake light, trailer connector and so on).
The project 2.0 is built around a central arduino, controlling a number of pin extender (mcp230x) ic´s, to spread out the functions while simplifying the cable installation, going from 1x cat5 (for buttons) + 1x vga (for lights) to a single 4 core cable.
There will also be battery monitoring and a few hall sensors involved, for brakesensing (hydraulic brake system) as well as speed and cadence (rpm on pedals).
The initial idea was to use a tiny 0.92" super-sharp white oled display, but that turned out to be too much for the arduino to handle in a single sketch, so i ditched that idea and started thinking of using my cellphone as a bike display.
The basics are quite simple; i would build a USB-OTG Y-cable, with external power (to charge the phone from the bike battery while in use) that would allow me to connect the phone to the arduino with USB, then use available android usb -> serial libraries to simplify the workload.
The arduino is then ether connected thru its built-in usb or more likely, a usb-serial adapter (FTDI) cable, to prevent anyone from using the easily accessible usb port to write new software to the arduino.
The arduino would "publish" the bike status as a single message, say 4 times/second to a pre-defined serial interface (see above), regardless if the phone is connected or not.
The phone would then parse the bike status message into each function, right/left turn indicator on/off and so on..
Now, the android app would not need much, even if more features would be awesome, the bare minimum required by the project is a simple vehicle dash-board, with speed, distance and a few status icons (icon grayed out when function (left turn indicator for instance) is not active).
Also, a auto-on/off timer would be a neat trick, to toggle the phone display on only when needed, but turn it off when nothing has changed for say 5 seconds.
Future goals would be to have the above mentioned dashboard on top of google maps for navigation with a simple mp3 player integration (play/pause/next), but lets not get ahead of ourselves..
I still dont know how to program android apps..
So what would i need and where would i start?
Any hints, suggestions and ideas are more than welcome!
As i wrote earlier, i really "must" learn by doing, so suggesting that i "read some java" is unfortunately not so helpful, while a specific suggestion, "look up x, y and z and things get clearer" is gold!
xarvox said:
Hi all!
Im working on a project but im in way over my head..
If it were easy it wouldnt be fun...
First of all; im not the average joe, i have some learning difficulties, witch in essence makes it very hard for me to learn programming in general since its such a huge piece of knowledge to acquire by reading before its getting useful in practical terms.
I do however learn well by doing, so by following guides and so on makes the components much more clear to me compared to reading about them in a generalized manner.
This has been working quite well for arduino, there are numerous easily approachable guides to do pretty much anything, so i generally just have to modify and knit together two or more open-source projects in order to achieve my project goals.
But with Android and the Android Studio application, im hitting a brick wall..
The issue is mainly that the android studio guides expects a certain degree of understanding of java (i have none), and the java guides are too general in nature, and mostly oriented towards web or PC enviroments, so nothing looks similar to what the android studio is creating as a new project.
So im on the verge of giving up on learning java (ive been at this for a while now and literally not getting anywhere) but i figure i give the community a cry for help..
Now, the project is quite ludicrous, it started as a simple turn indicator controller for my recumbent bike a few years ago and im getting pretty close to finishing the version 2, with a number of additional features (high/low frontlight, brake light, trailer connector and so on).
The project 2.0 is built around a central arduino, controlling a number of pin extender (mcp230x) ic´s, to spread out the functions while simplifying the cable installation, going from 1x cat5 (for buttons) + 1x vga (for lights) to a single 4 core cable.
There will also be battery monitoring and a few hall sensors involved, for brakesensing (hydraulic brake system) as well as speed and cadence (rpm on pedals).
The initial idea was to use a tiny 0.92" super-sharp white oled display, but that turned out to be too much for the arduino to handle in a single sketch, so i ditched that idea and started thinking of using my cellphone as a bike display.
The basics are quite simple; i would build a USB-OTG Y-cable, with external power (to charge the phone from the bike battery while in use) that would allow me to connect the phone to the arduino with USB, then use available android usb -> serial libraries to simplify the workload.
The arduino is then ether connected thru its built-in usb or more likely, a usb-serial adapter (FTDI) cable, to prevent anyone from using the easily accessible usb port to write new software to the arduino.
The arduino would "publish" the bike status as a single message, say 4 times/second to a pre-defined serial interface (see above), regardless if the phone is connected or not.
The phone would then parse the bike status message into each function, right/left turn indicator on/off and so on..
Now, the android app would not need much, even if more features would be awesome, the bare minimum required by the project is a simple vehicle dash-board, with speed, distance and a few status icons (icon grayed out when function (left turn indicator for instance) is not active).
Also, a auto-on/off timer would be a neat trick, to toggle the phone display on only when needed, but turn it off when nothing has changed for say 5 seconds.
Future goals would be to have the above mentioned dashboard on top of google maps for navigation with a simple mp3 player integration (play/pause/next), but lets not get ahead of ourselves..
I still dont know how to program android apps.. [emoji14]
So what would i need and where would i start?
Any hints, suggestions and ideas are more than welcome!
As i wrote earlier, i really "must" learn by doing, so suggesting that i "read some java" is unfortunately not so helpful, while a specific suggestion, "look up x, y and z and things get clearer" is gold!
Click to expand...
Click to collapse
I would invest in taking some Java courses at that point. Also learning Java is a never ending deal. You are always learning and adapting as code changes every day. Even Android as coded changes, deletions, additions and subtraction almost on a daily basis. Then you also have to work with closed sourced sensors so it will not be overly easy by any means.
zelendel said:
I would invest in taking some Java courses at that point.
...
Then you also have to work with closed sourced sensors so it will not be overly easy by any means.
Click to expand...
Click to collapse
Im not sure what sensors would be "closed source", as far as im aware, everything im using is ether open source or have very well documented libraries.
All exept the android part that is...
The android library needed for the arduino interface is also open-source, but not overly documented for a newbie...
https://felhr85.net/2015/01/09/a-dirty-and-quick-example-of-serial-port-communication-in-android/
In any way, im unable to attend any programming classes, and as i wrote in my first post, its really (!) hard for me to learn by reading about things, so thank you for your suggestion but as stated earlier, its not a solution for me..
xarvox said:
Im not sure what sensors would be "closed source", as far as im aware, everything im using is ether open source or have very well documented libraries.
All exept the android part that is...
The android library needed for the arduino interface is also open-source, but not overly documented for a newbie...
https://felhr85.net/2015/01/09/a-dirty-and-quick-example-of-serial-port-communication-in-android/
In any way, im unable to attend any programming classes, and as i wrote in my first post, its really (!) hard for me to learn by reading about things, so thank you for your suggestion but as stated earlier, its not a solution for me..
Click to expand...
Click to collapse
The classes I was talking about are more like interactive labs. So more hands on. Or even watch some tutorials from android developers site.
As for what I meant about closed source is the binaries for things like the GPS, gyro and other sensors to get the info you need. Some have great documentation and api openly developed. Some others not soo much.
Related
Hello, this is my first post here..
(was not sure where to put it, so I posted here)
So, it happens that I'll be getting an i9001 soon (as a gift), to replace my old W810i..
Android was always my preference, if I ever were to take the leap, and possess a smartphone..
I must say that ever since I researched about this OS; and the possibilities it can offer, I am highly interested in getting involved with it's development..
I've searched and found a similar thread that pointed to "developer.android.com/index.html", which I believe I can use to get me started. But before I do so, I have a few questions to ask, regarding on what kind of knowledge will be needed beforehand.
I'm currently a university student, at informatics and computer science. So I'm no expert in coding, nor I can create commercial-ready stuff as of yet.. However I do believe that I can slowly learn the ropes, and produce something useful, since I can understand the basic principles. (Patience included )
I've also read numerous articles regarding the knowledge prequisites, most of them say either Java or C++/C#, yet there's no definitive answer.. So my first question is in regard as to what do I need of the following, and what kind of knowledge "gaps" do I need to fill first, before I can get started with android development.
I currently have:
Some slight experience with Java through NetBeans and JDK (on the next semesters I have subjects that cover more of it)
A significant experience with C/C++ through DevC++ (I can comprehend functions, arguments, structs, pointers, file pointers, and various tricks: such as passing values by reference)
Basic knowledge of simple search, sort and data structure algorithms (such as binary/interpolation search, bubble/insertion sort, linked lists/binary trees.. To name a few)
Basic knowledge of Unix (such as shell commands, fork, pipes, sockets)
Basic theory knowledge on Operating System algorithms (such as cpu scheduling, memory management, disk management and some MPI simulation)
Basic knowledge of Assembly (through SPIM and MPLAB)
Some noobish/entry-level knowledge regarding MySQL and PHP
I may have forgotten a few things, but I suppose this is the core of my currently acquired knowledge.
To this point, I might add that I'm most comfortable in C/C++ than Java.. Namelly because it's the first language I bothered more with, and because I find Java a bit more confusing..
[Because it's similar to C, but it has various alterations.. Or it might be because I was forced to learn it simultaneously while also learning C, and I ended up hating it, because it caused me to mix up the two languages]
I might also say that I've never worked with projects that had more than one *.c/*.cpp file, and I have yet to figure out how these combine..
I may also have some knowledge gaps regarding "classes", even though I can write programs just fine (they were more apparent in Java, than C/C++, I guess)
Plus, all the programs I ever made, were console/bash.. I have no experience or idea, on how to put graphics on screen and how to hook them with my code.
As to what I want to do with Android? Well, at first creating simple apps to get the hang of the situation.. Then maybe bothering with GUI/Graphics to enrich my progress.. And ultimatelly, acquiring the knowledge/skill to mess with the OS/Kernel itself.. (And why not re-inventing the wheel by myself, and creating them from scratch)
Second question would be about safety.. Say that I do gain the knowledge, and I come at a point that I can comfidently mess with operation-critical things like the Kernel.. Is there a way to "failsafe"-test or simulate it, before uploading it to the device?
[As I mentioned, I'll soon be getting my very first android device, and I'm rather very cautious about not damaging or bricking it.. Because it's expensive, and I might not afford a replacement]
Lastly, my final question is about: potential danger of damaging the phone's hardware; when exposed to various things (Since I want to be very cautious, as I said)
However I understand this is definatelly not the right section for this last question; so the actual question for that, is: where can I post/ask about that?
Sorry for my wall of text, I just like to be detailed, in order to be completelly comprehensive. I hope I might get the attention of an experienced developer, maybe get some tips on how I can improve my current knowledge; and lastly how to get involved with this wonderful OS.
Thanks!
You may want to brush up your Java skills a bit on classes and packaging. Then, you can download the Android SDK which comes with an emulator to test your programs. To design GUIs, you will have to download and install the Android Eclipse plugin, which is available alongside the SDK.
There are many explanations that people will tell you to the answer to the "what is a kernel?" Like this great one from Omnicide
Spoiler
Omnicide said:
The best way i seen it put was, think of the kernel as the engine and the rom as the body of the car. The body of the car (rom) just makes the car look nice and user friendly. Now when we talk about the engine (kernel) simply put red lining the engine will get you to go fast but burn gas. Keeping the rev down low will make you run slower but saving lots of gas. Thats just one way to look at it, rpms being the cpu.
Click to expand...
Click to collapse
or this great one from androidcentral.com
Spoiler
What is a kernel? If you spend any time reading Android forums, blogs, how-to posts or online discussion you'll soon hear people talking about the kernel. A kernel isn't something unique to Android -- iOS and MacOS have one, Windows has one, BlackBerry's QNX has one, in fact all high level operating systems have one. The one we're interested in is Linux, as it's the one Android uses. Let's try to break down what it is and what it does.
Android devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of Android specific code built in, and Google's Android kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent Android developers and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software.
When software needs the hardware to do anything, it sends a request to the kernel. And when we say anything, we mean anything. From the brightness of the screen, to the volume level, to initiating a call through the radio, even what's drawn on the display is ultimately controlled by the kernel. For example --when you tap the search button on your phone, you tell the software to open the search application. What happens is that you touched a certain point on the digitizer, which tells the software that you've touched the screen at those coordinates. The software knows that when that particular spot is touched, the search dialog is supposed to open. The kernel is what tells the digitizer to look (or listen, events are "listened" for) for touches, helps figure out where you touched, and tells the system you touched it. In turn, when the system receives a touch event at a specific point from the kernel (through the driver) it knows what to draw on your screen. Both the hardware and the software communicate both ways with the kernel, and that's how your phone knows when to do something. Input from one side is sent as output to the other, whether it's you playing Angry Birds, or connecting to your car's Bluetooth.
It sounds complicated, and it is. But it's also pretty standard computer logic -- there's an action of some sort generated for every event. Without the kernel to accept and send information, developers would have to write code for every single event for every single piece of hardware in your device. With the kernel, all they have to do is communicate with it through the Android system API's, and hardware developers only have to make the device hardware communicate with the kernel. The good thing is that you don't need to know exactly how or why the kernel does what it does, just understanding that it's the go-between from software to hardware gives you a pretty good grasp of what's happening under the glass. Sort of gives a whole new outlook towards those fellows who stay up all night to work on kernels for your phone, doesn't it?
. You probably didn't get it at all, so let me tell you what a kernel is in about 15 words. A kernel is "what makes the phone work, and with out it the phone will not function."
I don't want to be thanked for this, thank omnicide, and androidcentral.com for the great explanations.
~~~~~~~~~~~~~~~~~~~~~
Samsung galaxy s2
Rom: Jedi knight 6
kernel: Jedi kernel 2
~~~~~~~~~~~~~~~~~~~~~
And you thought celebrities weren't smart! =P
A kernel is a ring master who commands hardware and software.. Like it takes input from hardware and feeds to software and vice versa..
sent from cyanmobile powered Beni
Hi xda-developers,
I am an Embedded developer with vastnexperience in Firmware development in C programming (for microcontrollers), pcb designing, corel draw/photoshop (intermediate level) . Now I am looking to stretch my self a lil further by trying my hands on Android Programming. I have no prior experience in Software development. It would be kind of experienced developers out here to guide me with possible approaches that I can give to Android development without a much steep learning curve. As I would be practicing android development mostly on weekends (as of now), I would like to get started with things that I can relate with already. That way it would keep me going. Help me out with:
1. Possible applications I should work on. Something that can also be helpful for the community of users and developers.
2. Starting point and other obstacles I would come across while development.
3. Application ideas.
P.S: I also have a rPi lying around catching dust.
Some of the features still cant use on this. Libraries could be use.
Start with "Hello World"
Regardless of your software development capabilities you should always just mess around with the tools that are available and see what you like and what you don't like.
Try every tool you can, when you feel like you know those inside out have a go at extending the functionality of one of those.
For me when it comes to learning a new technology like Android SDK just playing with it inspires me to want to create real and practical applications.
Goodluck and have fun.
PS: I would stick around and see what happens with the release of Qt 5.2 Hint hint...
Yea. Android like embedded requires you to set up a Dev environment so get that up first. ROM building vs app developing are hugely different. Decide which and download the tools. (May require you to install a whole new os and tweak it heavily. Last time I ventured to compile a ROM it was a day to set up my Linux distro of choice)
And like what was said before start with hello world and move up in small bites. You will gain better understanding of how things work and will be less frustrated. Don't expect a full featured app to appear. Once you play around with all the little components eventually you will see a big picture and the building blocks for the "big app" will be there ready to use.
Sent from my One using xda app-developers app
I'm looking into building a custom android device to be embedded in a project I'm working on. I won't need GSM/cell service, so this would be more of a 'tablet' with wifi that's the size of a phone. The first version of this project used some lower level embedded controllers, but for a better user experience (capacitive touch screen, full featured app, etc), I'm looking into using an embedded android device and having a friend (who told me to post here about this) write an app to run on it for me. This project is starting to scale, so buying a cheap tablet and tearing it apart isn't really a good option; I'll need to build something from the ground up. My problem is that I'm more of a microprocessors guy, so I don't really know where to start with this kind of hardware.
I found this thread which was a good start, but the info is like 3 years old now.
Has anyone tried to do something like this? Should I be trying to find a manufacturer who already does this type of thing to work with? If so, how do I find someone like that? If I am going to do the design myself, what kind of processors can run an Android OS? Where's a good place for learning that type of info? Are there any reference designs out there I can use to get started? Is running Android on RaspberryPi a good starting spot, or is that simply not scalable?
Thanks for the help, I hope I'm in the right spot. Apologies if not!
Hello All,
Will try and keep this short: Am an old time developer, since 1979. I was self-taught, as a kid, never one class. The weakness there is that I never learned most of the terms.
So when learning new languages, it was harder since I didn’t have a reference point. i.e. may no longer be used, but I created “linked lists”, just never knew they were called that.
Anyway, I never got past using C and WinSDK. And I learned just enough Perl on the fly as I needed it to create some backend parts to some of my apps.
I am desperate to start a new project, preferring to do it on Android first. As hard as I looked for LOCAL developers with serious programming experience, and preferably some Voice SDK experience I failed. I tried Craigslist and Meet Up. Nothing.
So I need to do this MYSELF. Or at least start it and come up with the alpha-prototype on my own.
After all that explaining, what’s the BEST (and least expensive) means I can purchase to teach myself programming an Android device?
I always loved forums, we’re talking back when NEWSGROUPS were the way to go. Because out there was always someone who knew…and was willing to share their point of view.
Currently using a PC-Windows environment, so any IDEs in that arena would be preferred.
So any help, any direction would be so appreciated.
Many thanks ahead all,
Sergio
I would definitely recommend grabbing Android studio and looking through Androids developer docs. If you're familiar with java all you really need to know is the Android framework and how everything works together (lifecycles, passing data around, working with various sensors/hardware, etc).
Android studio is free so no cost to you there. If you're not familiar with java there are tons of good resources online
Sent from my XT1254
Hi!
I agree with @blackangus, i started programming for android with eclipse at that time and some tutorials i found online.
In my experience is a little bit frustrating at the beginning because is has some hard to understand concepts if you come from low level languages.
you can try to follow a basic lessons to start understanding the different parts like,
1) Views ( it cost me pretty much to understand how views and activities work)
2) Networking and async threads (restfull services calls and json manipulation)
3) Play services (push notifications, account registration and such)
this was the approach i took and it helped me a lot, i hope my humble guide helps you too.
5 years ago I got my intro to Android via Android App Inventor: http://appinventor.mit.edu/explore/
Good intro to Android concepts but drawing pictures instead of writing code still can't produce professional apps.
So I dove into learning Android Java. Nice...
My background was in C ; I never quite figured out C++ and have heard since that Java is superior anyway, written for OO instead of adapted from C.
I still program plenty of C for Android NDK low level code.
Before C, I did various assembly/machine languages, including the first CPUs in the mid 1970's and in early 80's front panelled a simple OS into an old PDP-11/05 to use an Apple clone keyboard and a "TV Typewriter" type 6847 Video board I built...
Now I'm wondering about iOS Objective C. Much more money still it seems in iPhones/Pads.
I am a newbie too. My background is microcontroller programmer, so i use C very often. When i start learning android programming, i begin with learning java and eclipse first, after i got the OOP concept, i begin learn to use android API and Android Studio....when we start from low level language, learning Java is easier... Java basic first then android API....
I am a serious coder, usually working with enterprise applications at my job. In my experience, if you need to learn something new, it is better if we get help from some friends or professional trainers. Saves us a lot of time and trouble. If you want to learn the basics of OOP and are going to build something, I suggest you get help of a professional trainer. You will be clear about the subject matter easily and with your experience, you will achieve progress within no time.
Wow. I don't feel so bad now. I'm and old geek too. I'm looking at trying to develop a simple game for Android. My last coding was in 1988 using COBOL. I'm a System Analysist but most of my experience was in medical systems and Digital Radiography. I'm basically a College Freshman.
Thanks for the information.
Can we keep this thread open or create another for Q&A from you wiz kids?
A funny note: I was involved with Search and Rescue in 1979. We were a driving force to get SAT phone's going but our budget only allowed for 2 satellites that year. We tested with a fellow driving in California while talking to us in Milwaukee. We only had a 20 minute window , then had to wait till the next.flyover 3 hours later. We've come a long way. Let's keep the momentum going!