« first day    last day (144 days later) » 

6:54 AM
room topic changed to Trying to learn: (no tags)
 
 
3 hours later…
9:49 AM
busy in learning
 
Hey.
 
how are you?
 
Im good, thanks, you?
 
am also fine
have you worked on chatting app?
 
Anyhow, I saw you commented another ConnectionConfiguration variable with contains an argument, somehting like "192.168.0.1"
 
9:52 AM
yes
 
Is that from a tutorial or blog that you read?
 
i was searching for solutions on stack n i found this resolution
so i tried that
but i was unable to connect
 
I haven't worked on mobile chatting apps really, however, I do have some experience with Sockets and what not and basicaly chatting is done through sockets. Sending bytes back and forth.
What's the server ip? Like the IPv4 of your server?
 
i am not having much knowledge regarding this
 
For example, your android phone is identified as 192.168.0.12 and your server is 192.168.0.25, you'd need to connect with 192.168.0.25. Pretty straight forward actually :P
 
9:55 AM
 
That's okay :P, do you actually have a server running that the app could connect to?
 
its i think 127.0.0.1:9090
 
127.0.0.1 is localhost which is basically the phone itself if you're going to try to connect to it.
Could you open up command prompt and type in: ping pc
 
just open on desktop?
 
Yes.
 
9:57 AM
 
Oh that's IPv6, not really what we'd need. No worries, there are other ways to figure out the IP of the server.
Is Openfire server running on your computer?
 
yes
how you come to know its IPv6?
 
Way too many characters for an IPv4 plus, if you're not getting a reply from an IPv4 address, either it's a domain name or it's an IPv6.
 
ok
 
type in command prompt: ipconfig
You'd get similar results like mine and search for something called IPv4
 
10:02 AM
got
now?
 
If you could make a screenshot of the results, that'd be great :P
 
sure
 
You're not running Openfire server on your VirtualBox right?
 
means?
 
Virtualbox, it seems you've got a virtualbox adapter to run another OS on your current. Anyhow, if you're not running the server on any Virtualbox image, your IP that you'd need to fill in on your app would be 192.168.1.2
 
10:08 AM
ok gimme a min lemme try this
in place of host i use this
sorry here
ConnectionConfiguration config =
new ConnectionConfiguration("192.168.0.1",5222,"pc");
 
ConnectionConfiguration config =
new ConnectionConfiguration("192.168.1.2",5222,"pc");
 
genius
it worked thanks
 
No problem, I will post the answer on Stackoverflow as well for others if they come across the same problem :)
 
kindly post answer there lemme upvote that
and can you 5 mins from your precious time
@kevto
@kevto there?
 
10:29 AM
Hi @devil
 
hey
i joined here 1 month ago
 
so how much is your total experience?
ohk..where?
k k..do one thing..let me tell the HR to call you up..
oho waha kaise fass gye tum
sahi reviews ni sune hue waha k..internally pata ni kaisi hai
 
@kevto busy?
 
Oh sorry, didnt see your new messages. Im back, what's up?
 
actually i am trying to make a chat app
 
10:32 AM
@devil give me your email id or skype id or better mail your resume to hr@codetreesolutions.com
 
@kevto this is my first exp on this
'ok i'll email, thanks @iPhoneDeveloper
 
you are welcome..let me know if any of your other friends are also interested in joining..
 
i have connected device to server
now firstly do i have to register devices n then getting them login, n them messages will be transmitted
is it the flow? @kevto
 
Usually in most flows, yes. However, I never worked with Openfire. Let me check their documentation for you.
 
nah pls don't
i'll study self
i was just asking if you were knowing
i don't want you to work for me
 
10:36 AM
Ah okay.
Uhm, yeah in most cases, the flow would be like that. It makes most sense that way.
 
so now i work on registring n getting them login
 
Yes, indeed.
 
ok thanks for your help
do you come in these chat rooms?
 
I never been in a room before actually :P I'm quite new to contributing to stackoverflow and such :P
 
from where are you?
 
10:40 AM
The Netherlands.
 
ok
n can you confirm one more thing?
 
Sure.
What's it?
 
when i will register user
it will be registered on xmpp there
i will show him signin also
till he don't call logout
he will be login right?
 
If someone connects to the server (Openfire) and the user is logged in successfully, he will be shown as an online user until the moment he loses connection with the server or logs out manually.
 
ok
 
10:49 AM
That's so wonderful about sockets, it's easy to see who's online and who isn't. :)
 
bro 1 thing
have you used whatsapp?
 
Yep.
 
suppose you are login
then you exit whatsapp without doing logout
but in the background still its running
as the message comes it notify us
what can be scenario behind this?
ok got the thing
 
I know their architecture, well at least some of it and that's how most chat apps work on Android and iOS.

When you exit whatsapp and open it again, it relogs without your knowledge. It's going to check your device ID plus phone number and compare it with their database, it's a simple and quick check up. Chat conversations are saved locally as welll and that's why it looks like you don't seem to logout.
 
can we get whether connection is lost?
 
10:52 AM
Regarding the notifications, they have a service running in the background which checks whether you received new messages or not.
Services can run from the moment you start your device.
 
means you want to say as we exit, they do logout ??
 
Yes, they lose connection with the server. Without actually seeing it.
In my country, everyone uses WhatsApp :P
 
and as we open the whatsapp again it login us again
 
Yep.
 
ok i understood
 
10:55 AM
It looks like you never lose connection with their servers because conversations are saved on your device locally :P
 
so i register user with device id and phonenumber
 
Yep.
 
take deviceid as username and phone number as password
and i'll let the login occur with these params
 
Well, what you could do is let them create a password only which you can save in sharedpreferences and fetch it upon connecting with the server after being registered.
Regardless, it will work the same way and you will get the same results.
 
so I match password on server?
n 'them' here is?
let them create a password
 
10:59 AM
Yep.
Them are the users.
 
but the device id and phonenumber will be required
to do entry on server
so if user changes the phonenumber it can be changed there
and users can be visible with the phone numbers only who are registered
as whatsapp is showing
and the registration id will be auto generated
pls lemme know if i am disturbing you
 
Numbers can be changed indeed but just like whatsapp, when you've got a new phonenumber, you've got a new account.
Nah, I got a little distracted and completely forgot about the chat room :/
 
ok
can you pls suggest what must i do
that will be easy n better?
 
The user downloads the app -> The user registers an account with a password or not, your choice -> The user logins for the first time, could be done automatically and manually up to you. -> User data such as password can be hashed/encrypted in SharedPreferences which will not be removed from the device unless the user does it himself. -> The user is connected and successfully logged in and may broadcast messages to another user through your server.
That's basically how it's done in most chat apps.
 
ok i'll also follow this way
 
11:13 AM
Security is not much of a problem in the beginning but when your app gets more reputation, hackers will be aware of your app and on lookout to move on your server.
 
simply save the deviceid as username and phonenumber as password, by asking user in starting his phonenumber
deviceid, will it be autogenerated?
 
Yeah, it's done by Android itself.
 
ok
thank you somuch
 
No problem mate.
 
11:36 AM
548
A: Is there a unique Android device ID?

Anthony ForloneySettings.Secure#ANDROID_ID returns the Android ID as an unique 64-bit hex string. import android.provider.Settings.Secure; private String android_id = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID);

can't it be change ever?
yes it can be change
written in cooment there
 

« first day    last day (144 days later) »