Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,964 members, 7,806,787 topics. Date: Wednesday, 24 April 2024 at 12:12 AM

How To Build An Android Chat Like Whatsapp For Absolute Beginners - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / How To Build An Android Chat Like Whatsapp For Absolute Beginners (24184 Views)

Guys Help I Want To Build An App Like Whatsapp! / How To Implement Firebase In An Android Chat App / Qt 5 Tutorial For Absolute Beginner C++ (2) (3) (4)

(1) (2) (3) (4) (5) (Reply) (Go Down)

How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 4:42am On Jun 20, 2015
The purpose of this tutorial is to show newbies how to build a simple chat android application.


Requirements:
- Zero knowledge of programming, I am assuming you have never heard of PHP, SQLite, MySQL, Wamp server, Java, XML, Android studio, Eclipse, Eclipse, Web service, Android Emulator, Bluestacks Emulator
- You do not even require an android phone

By the time we are done with this tutorial, you will have learnt all the above technologies enough to be able to build something simple or even more complex. The purpose of this tutorial is to give people more insight into what programming is all about especially newbies.

Profile: I am a web application / desktop application (windows/mac) / mobile application developer (android,ios,bb,windows mobile).

Please if you are just joining us - the thread has been moved to https://www.nairaland.com/2424208/creating-group-chat-html-javascript#35436895

3 Likes 1 Share

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by moscyt(m): 4:52am On Jun 20, 2015
Go on
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 5:11am On Jun 20, 2015
Good morning bro. I'm very much interested in this.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 5:55am On Jun 20, 2015
You guys dont sleep ni?

Getting started:
Please note that you can run this tutorial on any pc be it mac/linux/windows, however I shall use windows as the standard.

You need to have the following installed on your pc:
- Notepad++: https://notepad-plus-plus.org/ (optional but recommended)
- wamp server: http://www.wampserver.com/en/ (xamp, easyphp, zend server, ISS or anything that can run php/mysql is fine)
- Java SDK (not JRE o): http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html (compulsory)
- Android studio: http://tools.android.com/download/studio (optional)
- Eclipse: Download Eclipse for JAVA here http://www.eclipse.org/downloads/, go here to learn how to install the plugin to do android stuffs https://developer.android.com/sdk/installing/installing-adt.html (optional)

Please note that you need to have either Eclipse / Android studio as the Integration development environment for android. This tutorial will make use of both android studio and eclipse.


The idea is that we are going to run everything on your PC, and even test the chat on PC. The final step will include how to setup a web server
online so that multiple users can signin with their devices remotely to chat.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 6:17am On Jun 20, 2015
dhtml18:
You guys dont sleep ni?

Getting started:
Please note that you can run this tutorial on any pc be it mac/linux/windows, however I shall use windows as the standard.

You need to have the following installed on your pc:
- Notepad++: https://notepad-plus-plus.org/ (optional but recommended)
- wamp server: http://www.wampserver.com/en/ (xamp, easyphp, zend server, ISS or anything that can run php/mysql is fine)
- Java SDK (not JRE o): http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html (compulsory)
- Android studio: http://tools.android.com/download/studio (compulsory)

The idea is that we are going to run everything on your PC, and even test the chat on PC. The final step will include how to setup a web server
online so that multiple users can signin with their devices remotely to chat.
You cant build a chat app like whatsapp using an http server. It wont scale. You can build a very basic chat app though.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 6:26am On Jun 20, 2015
^^^I know exactly what you are talking about brother. You can build it and it will work at the basic level, but of course to scale it to thousands and millions of users, you will need something larger like google app engine (i guess we will have a part 2 later on featuring google app engine).
However, this tutorial is targeted at beginners, and the aim of the tutorial is to expose them to technologies. The most important thing in coding practices is your algorithm - once you get it right the first time, it becomes easy for you to scale up.

2 Likes

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nairalander01: 6:26am On Jun 20, 2015
Runs to front seat with my pen and notepad. Ride on sir, we're all ears.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 6:38am On Jun 20, 2015
You are welcome, hope you got all your tools. I do know for a fact that you might be spending like 1GB of data to get all those tools above in case you dont have them. Eclipse will be an alternative to android studio, but if you are not familiar with using eclipse to build android apps, you might get stuck.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nairalander01: 7:12am On Jun 20, 2015
dhtml18:
You are welcome, hope you got all your tools. I do know for a fact that you might be spending like 1GB of data to get all those tools above in case you dont have them. Eclipse will be an alternative to android studio, but if you are not familiar with using eclipse to build android apps, you might get stuck.

Yeah I have all the tools except wampserver(getting that ASAP) and I have eclipse in place of android studio. Hope I'll still flow?
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 7:14am On Jun 20, 2015
If you can use the eclipse to develop a simple android app, you should be fine. Wamp server should be around 22MB if i am correct.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Afam4eva(m): 7:26am On Jun 20, 2015
This will be nice to follow as I have never built a mobile app ever. This may just be a start.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 7:36am On Jun 20, 2015
Nairalander01:


Yeah I have all the tools except wampserver(getting that ASAP) and I have eclipse in place of android studio. Hope I'll still flow?

Note that I have modified the requirements. I am going to be using both android studio and eclipse in this tutorial. I started mobile development with Eclipse, and proceeded to run away to android studio.

Afam4eva:
This will be nice to follow as I have never built a mobile app ever. This may just be a start.
You are welcome.

@moderator, I am hoping we will have gone far a bit before moving this to frontpage, I have made frontpage many times so it does not freak me. I dont want trolls to start coming here to scatter everything before we even get started.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by blueyedgeek(m): 8:01am On Jun 20, 2015
I might finally get to use my installation of android studio. Brother mi, will we be learning Java along the way as well? To what level does one need to know java in order to get started building android apps? Hope you get to finish this tutorial.

1 Like

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 8:09am On Jun 20, 2015
I shall complete it. No, you do not need any knowledge of JAVA per say. I shall try to keep everything simple and explain as you go.
Once you know programming, there are just very little differences:

To declare a variable called "age" to hold a number like 10 for example

PHP
$age=10;

Javascript:
var age=10; //as noted by seunthomas (la expert)

Java:
Integer age=10;

Once you know at least one programming language - even javascript, you shall be able to follow.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 8:47am On Jun 20, 2015
dhtml18:
^^^I know exactly what you are talking about brother. You can build it and it will work at the basic level, but of course to scale it to thousands and millions of users, you will need something larger like google app engine (i guess we will have a part 2 later on featuring google app engine).
However, this tutorial is targeted at beginners, and the aim of the tutorial is to expose them to technologies. The most important thing in coding practices is your algorithm - once you get it right the first time, it becomes easy for you to scale up.
YOU CANT USE HTTP TO BUILD A LARGE CHAT APP. Its very wasteful. HTTP is stateless. You need to use something like ejabberd(xmpp) or any socket server based system(web socket can work). Also i assume you will be using a RDBMS which would increase latency . So if i send a message now my friend may get it next week if the chat company has 1 million users(just a joking way to explain the reality of this approach). Its a good way to understand how apps work but chat apps are in a different terrain. I know a chat app company that used http and couchbase right now they are going socket server because they know it wont scale.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 8:52am On Jun 20, 2015
dhtml18:
I shall complete it. No, you do not need any knowledge of JAVA per say. I shall try to keep everything simple and explain as you go.
Once you know programming, there are just very little differences:

To declare a variable called "age" to hold a number like 10 for example

PHP
$age=10;

Javascript:
age=10;

Java:
Integer age=10;

Once you know at least one programming language - even javascript, you shall be able to follow.
Javascript:
age=10;(bad coding using a var is good)
var age=10;

Java:
Integer age=10;
(bad coding using a built in object where possible)
int age=10;

1 Like

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 8:52am On Jun 20, 2015
OP I appreciate what you are doing though. Good job.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by ballantyne: 9:06am On Jun 20, 2015
seunthomas:
OP I appreciate what you are doing though. Good job.
Shut up. You aren't. If you were, you wouldn't be on this thread.

2 Likes

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:09am On Jun 20, 2015
seunthomas:

YOU CANT USE HTTP TO BUILD A LARGE CHAT APP. Its very wasteful. HTTP is stateless. You need to use something like ejabberd(xmpp) or any socket server based system(web socket can work). Also i assume you will be using a RDBMS which would increase latency . So if i send a message now my friend may get it next week if the chat company has 1 million users(just a joking way to explain the reality of this approach). Its a good way to understand how apps work but chat apps are in a different terrain. I know a chat app company that used http and couchbase right now they are going socket server because they know it wont scale.
.
Oga ThomaS watin be your own?
He wants to teach us something and you are trying to be a hindrance, if you think you know better and can do better go and start up your own thread and tutorial and stop harassing to this beautiful tutorial going on here!!!

My boss DHTML18 please ride on, I am following.

2 Likes

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:22am On Jun 20, 2015
I shall proceed to ignore everyone that wants to side-track this thread. For those interested, please ignore them.
GET THEE BEHIND ME SATANI! THere IS RAMADAN IS OUTSIDE.

Thanks guys for all those encouraging me. Please note that I actually made a simple chat like this and it works - just that I cannot broadcast it due to certain work ethics code of conduct.
NB: I dont make tutorials on something I have never done. And I dont copy and post stuffs anywhere.

seunthomas:

Javascript:
age=10;(bad coding using a var is good)
var age=10;
Java:
Integer age=10;
(bad coding using a built in object where possible)
int age=10;
You have just given yourself anyway as being foolish. If the codes do not work, then you say it is bad. In JAVA INTEGER IS MORE POWERFUL and is recommended THAN INT (a relic of the old age, in fact it is primitive and IS NOT AN OBJECT). YOU ARE SO VERY OUTDATED BRO, GO AND LEARN. And there is nothing wrong with my JavaScript - I am one of the best JavaScript coders on the whole of this Nairaland (and possibly in Nigeria) - and I have a lot of work to show for it, so don't even go there at all - i don't wish to embarrass anyone here but i will if i so wish.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 9:31am On Jun 20, 2015
dhtml18:
I shall proceed to ignore everyone that wants to side-track this thread. For those interested, please ignore them.
GET THEE BEHIND ME SATANI! THere IS RAMADAN IS OUTSIDE.

Thanks guys for all those encouraging me. Please note that I actually made a simple chat like this and it works - just that I cannot broadcast it due to certain work ethics code of conduct.
NB: I dont make tutorials on something I have never done. And I dont copy and post stuffs anywhere.


You have just given yourself anyway as being foolish. If the codes do not work, then you say it is bad. In JAVA INTEGER IS MORE POWERFUL and is recommended THAN INT (a relic of the old age, in fact it is primitive and IS NOT AN OBJECT). YOU ARE SO VERY OUTDATED BRO, GO AND LEARN. And there is nothing wrong with my JavaScript - I am one of the best JavaScript coders on the whole of this Nairaland (and possibly in Nigeria) - and I have a lot of work to show for it, so don't even go there at all - i don't wish to embarrass anyone here but i will if i so wish.
There is nothing wrong with your javascript and i did not say there was. But for any of the programming languages you mentioned above(except php), it requires you must do a forward declaration of types. Yes the interpreter would execute your code and infact we all ignore it as developers but trust me whats bad is bad. When you are teaching beginners about programming you need to always state types. As for the Java part, you totally goofed. You may be one of the best programmers on nairaland but you are definately not a good programmer. I am not side tracking you just sharing my views. And next time try to see things from a balanced view. Not everyone who criticises you wants to destroy you. Programming is about criticism the better way of doing things. If you dont know that then you chose a wrong calling.

5 Likes

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 9:32am On Jun 20, 2015
ballantyne:

Shut up. You aren't. If you were, you wouldn't be on this thread.
Ok sir.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 9:33am On Jun 20, 2015
AkunneObinna:
.
Oga ThomaS watin be your own?
He wants to teach us something and you are trying to be a hindrance, if you think you know better and can do better go and start up your own thread and tutorial and stop harassing to this beautiful tutorial going on here!!!

My boss DHTML18 please ride on, I am following.
I only expressed my view when he said like "whatsapp".

1 Like

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:35am On Jun 20, 2015
This is landed property
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:37am On Jun 20, 2015
seunthomas:
I only expressed my view when he said like "whatsapp".
Oh sorry. But do it more gently next time.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:37am On Jun 20, 2015
This space is not for sale
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 9:38am On Jun 20, 2015
Doctor, i excuse myself from this discussion. Na only me waka come.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:39am On Jun 20, 2015
dhtml18:
Suite yourself, for the viewers interested in learning - please let me know when you have your tools all sets so we move on. We shall let our codes do the testing - as long as the machine does not reject our codes, we are fine.

I have all the tools except the android emulator. But will get it.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:39am On Jun 20, 2015
This land is for sale
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:39am On Jun 20, 2015
dhtml18:
Suite yourself, for the viewers interested in learning - please let me know when you have your tools all sets so we move on. We shall let our codes do the testing - as long as the machine does not reject our codes, we are fine.

I have all the tools except the android emulator. But will get it. But please go on, I will catch up.
Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by seunthomas: 9:42am On Jun 20, 2015
dhtml18:
Na only you waka come o! And I wont mind if you take over the tutorial sef, since you obviously know JAVA/JAVASCRIPT/PHP/ANDROID/IOS BETTER THAN ME.
Bikonu. No vex. grin You can continue with ya tutorial. I don dey go.

2 Likes

Re: How To Build An Android Chat Like Whatsapp For Absolute Beginners by Nobody: 9:46am On Jun 20, 2015
^^^Dont go anywhere o, I have added you to my ehm whatchyacallit follow/tracking list. Besides, we need an online JAVA DEBUGGER (And that will be you) to assist us as we move along BTW have you worked with GAE before?

2 Likes

(1) (2) (3) (4) (5) (Reply)

Why Most Beginners Quit Programming / Sam Altman Visits Nigeria On AI Tour / Celestial Church Of Christ Hymns (cccmyhymns) Now On Android with pictures!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 65
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.