**GitHub - X-Messenger **
After 2 years working on this app I’ve decided to make it an open source on GitHub, hope for more people contributes to it and show smack library power and how beautiful is.
This app is not meant to be an open source and doesn’t take into account that other developer may work on it, so the code is not organised or clean and kinda messy (this will give an idea about how messy it is: https://github.com/wmhameed/X-Messenger/blob/master/XMPPManager.java.
I have two choice now whether to submit the app code as it is uncleaned and has many unused code lines and classes which I don’t like because it will make other developers confused, or to wait couple of months to start work again on the app, this is the only reason make me holding the source code and not sharing it yet.
Part of the files tree :
Note that the app is doing almost everything that other messengers do except group chat which is under development.
List of some app features
- Registering with phone number
- Syncing contacts.
- Maintain a TCP connection and working in the background to receive message (can relay on it without using push notification)
- Custom emoticon.
- Send out of band files
- Making WebRTC voice and video calls
I really want to share the source to help other developers , hope this app will became as a show case for smack and as sample Android App for it.
the app is borrowing some GUI and native code from Telegram and I’m planing to replace it in the future.
Current used smack version : 4.2.0-beta1
Is the messenger avalable in the play store?
Sharing the whole code wouldn’t hurt. Other could compile it, fix things if needed and create pull requests to cleanup the code. There is likely no need that you do this all on your own.
Yes it was, but I removed it since it was an alpha version. I will make a quick small cleaning for the code which is not enough and submit it to GitHub soon, and I will made pull requests for more clean code, new features and bugs fixes later.
Omg, you’re an angel fallen from heaven. Accept me as your apprentice senpai
I’m learning smack for almost 1week but i’m still stack on creating an account!
I will wait for this, yes you don’t need to shoulder it all on your own… Thankyou!
You are really a nice man.
I’m expecting your open source.
I wish to get it ASAP, and I pray you to complete this work SOON for everybody in the world.
If possible let me know when you can do it.
It is very nice to hear this. I am working to learn smack API for past 1 month and spending till late night to do this.
I am eagerly waiting for this and i am checking this post twice a day. Hoping that u have released the code.
And a LOT LOT THANKS in advance for having this idea to help other developers
Thank you all .
You can check the source code on github, hope we will see more contributors to this app in the future, I will try my best to back work on it in the near future.
GitHub - wmhameed/Yahala-Messenger
Thank you Wael!
It will certainly be useful to all those who want to start a project! thank’s for your job! Respect!
A lot lot thanks for you…
I am currently in office, I am very eagerly to leave office and have a look at this.
Thanks Thanks Wael.
Hope I will reach you out in any issues
Good to see another project come to live. Make sure that you submit a pull request for this page on XMPP.org, so that your client gets listed there: XMPP | XMPP Clients
Thanks for your great help, I have configured the Jabber OpenFire Server, downloaded this code, now I want to test the chat interface then which file need to call, cross checking, what changes needed for review the complete working.
tnx wael for share this source but i have trouble in android studio for opening some layouts make rendering version error, i set it on api-23 . how i can fix it?
how sms verify users worked? too send image and videos?
i want register my tell number but no sms received my phone for code activation!
please help me anyone knows. tnx
For the sms it’s not free you need to subscribe with a 3th party SMS gateway company like “clickatell” and “nexmo”.
The verify number stored in the phoneHash variable which is already shown to you on the debug console so u can register by entering the phoneHash manually: see Yahala-Messenger/LoginActivitySmsView.java
To send and receive files u need a server code to handle the file upload request from the messenger :
server side code “ASP.net MVC” file upload controller:
using System.Web.Mvc; namespace MVCFileUploadSample_01.Controllers
public class FileUploadController : Controller
// GET: /FileUpload/
public ActionResult Index()
var fileUploaded = false;
string from_jid = Request["from_jid"];
string to_jid = Request["to_jid"];
string type = Request["type"]; foreach (string upload in Request.Files)
continue; string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "uploadsssss" );
path = Path.Combine(path, from_jid);
path = Path.Combine(path, to_jid);
string filename = Path.GetFileName(Request.Files[upload].FileName); if (!Directory.Exists(path))
Directory.CreateDirectory(path); Request.Files[upload].SaveAs(Path.Combine(path, filename)); fileUploaded = true;
} this.ViewData.Add("uploaded", fileUploaded); return View();
} private static bool HasFile(HttpPostedFileBase file)
return (file != null && file.ContentLength > 0) ? true : false;
Some views relay on variables and work only in runtime and u cant see them in the designer view cuz the variables still null.
Change variables like host, domain port,etc to match your server Yahala-Messenger/XMPPManager.java
also at the meanwhile u need to save your server certificate in the asset folder Yahala-Messenger/XMPPManager.java at master
later we will use JavaPinning
tnx wael for your tutorial replay
you not have php code for uploading image and video on server side? asp hard for me to use
can send your phone number in private message? i want talking with you on telegram or whatsapp for completing this project
tnx, you are best
i tested this source with sms gateway but failure to receive Activation Code by sms. for this action need openfire server is start or not?
My web service Url is ok and no problem when enter it webbrowser, my phone get sms
Make this line to return false Yahala-Messenger/LoginActivitySmsView.java
Yahala-Messenger/Utils.java at master
to make this line executed Yahala-Messenger/LoginActivitySmsView.java
Thank you for your answer.
Thank you Wael,
Respect for your this job.
Now I am going to apply server certificate in the asset folder, please cross check Is the below links need to follow up or some thing differ-
1-Create a bks keystore. I used KeyStore Explore 5.1.1
2- Export cert from keystore of the Openfire
3- Import certs to new bks keytore.
4- Copy keystore to android project.
After that i will test the server connection .