While I am not new in any way to Java programming, I am still quite a novice at Android development. Regardless of this, I took it upon myself to mobile-ify a custom chat applet for a website I frequent. The question here is, what would be the best way of going about this?
The application needs to be able to store login info on the device for ease of use. Every time the user joins the chat, it will send a POST request to the website's login.php with the stored username and password, to get an SID back which will be used to login to the chat. For this I plan on using a simple SQLite database.
After it has the SID, the phone will establish a connection with the server and, once connected, send it a message containing "/login [sid]". From then on, the user is connected to the chat and will receive messages and be able to send them. How I'm currently going about this is to use a background Service which will actually handle the connection, so the user can put the chat on hold while they do something else, and when they return will still be connected and receiving messages.
This second part is what I'm not sure about: since the Service handles the connection, the Activity which handles the UI needs to be aware of it. I'm having trouble wrapping my head around this aspect of Activity-Service communication. Would a BroadcastReceiver or some other class be more suited for this purpose? It's hard to decide when the examples provided in the Android Dev Guide don't quite match up.
Any helpful tips or suggestions are always appreciated.
Activity-Service interaction is tricky, hope this helps:
http://developer.android.com/reference/android/app/Service.html#LocalServiceSample
Related
hello,
i wondered if it might be possible to develop an application which enables one to send an sms directly to another phone (running this application)
one may wonder, why i want to do such a thing, but for the better understanding, i will it explain it right here:
i moved to another city two weeks ago and i ordered my phone- and dsl-line at "1&1". 1&1 activated my phoneline and dsl 16000kbit/s connection. additionally they sent me a sim-card for my mobile phone. it enables me to call any fixed line number without any cost. and after a bit of research on the 1&1 website i found, that i can buy a second sim. i would be able to call this sim without any cost, too.
but the sms would be, as everywhere else 19€ct/sms.
so i wondered, if it might be possible to write a windows mobile-software that would be able to send some text directly via the cellular line. without passing the sms-gateway.
i thought of: text-to-tone conversion-software which then calls the other phone, which auto-pickups on certain phone-numbers, and then receives the tone-sequence, and converts it back to readable text.
of cause, the better solution would be to send the text digitally, but i don't even know if that might be possible.
any suggestions and ideas are very welcome.
sorry for my bad english, and sorry for the fact, that i will not be often online, cause my own pc is broken, so i have to go online in school.
greetings
garfield
Wouldn't this be similar to a fax machine?
Not being obnoxious, but it just sounds difficult since SMS is rather just a quick way to send messages from one phone to another. Calling and sending messages via text wouldn't be fast at all. I'd rather just say what I have to say...
i'd say if it was possible it would require both phones to have the program to interp the data recieved as the right type of sms
it's much like the sms over gprs thing
lemme get this straight, this is essentially an analog modem emulator, so not only would "messages" be able to be sent but files could aswell.
Would it also be possible to make "said" communications when your already on a call? that would be cool
Carnivor calls Rudegar on the phone,
Carnivor really says, "Hi Rudegar, im gonna send you that excel file now"
Rudegar really says, "Ok Carn"
you could have a signal that it sent to trigger the other phones running app to be ready to listen for the signal, then handshake and transmit and recieve data,quick ok msg on the screen, or even have it so you get "transfer completed" in the earpiece once completed you can carry on speaking over the phone.
Rudegar really says, "Thanks Carn, this is really good info, chat chat chat
intresting concept!!
you could intergrate "send data" into the phone app skin so when your in a call its easy to start up,
so it'd be good for small file transfer, or a chat app for ppl that have spare minutes to burn and dont mind not being able to make and recieve calls whilst its running.
but it could have its uses
Hi,
yes it seems to be a modem emulator, while being on my way home yesterday i thought about the problem bypassing that gateway... i thought about an own sms-gateway.
anyone has some information on how a sms gateway works? so i could write one and integrate it into my Fritz!Box or run it on my computer. this would enable me to send sms without cost, because calls and connections inside of the 1&1 VoIP network are costless...
the analog modem emulator would be an excellent idea, too... as it would allow to transmit files and "realtime" chat between one or more people.
so, any ideas on the modem emulator and the gateway are apreciated.
greetings
garfield
just Get mxit it doez dat
Get mxit it does what u mean but both phones need have this Client and you need to be online at the same time and if you not it has offline message storage and it doez filesharing to www.mxit.co.za/wap and try smsbug www.smsbug.com
defcomg said:
Get mxit it does what u mean but both phones need have this Client and you need to be online at the same time and if you not it has offline message storage and it doez filesharing to www.mxit.co.za/wap and try smsbug www.smsbug.com
Click to expand...
Click to collapse
so mxit is a chatrelay for other instant messaging protocols, and one has to be online via GPRS/3G/UMTS/EDGE ... this produces extra cost and is not exactly the thing i wanted to have.
smssbug is a great alternative, if you're sitting in front of a pc, but no alternative for me, as it also produces cost although this is secondary when talking about 3ct/sms.
what about that "modem" emulation? is there any software out in the internet? i haven't found anything via google.
and the next thing i am thinking about is, if it might be possible to digitalize the phone-to-phone communication. or is it limited to analogoue transmission of data, because of the way it is transported over the network?
i haven't looked into the idea with the sms-gateway, but i will look that up as soon as possible, when i have my internet-connection at home.
greetings
garfield
I'm working for a research project at my school and I figured this might be the best place to ask some questions. I'm a seasoned programmer, I've worked with Java, C/C++ and C#. I got thrown onto this branch of the research project and I'm looking to tie a widget individual contact's calling information.
Basically, I need to be able to add a option to send a type of notification to said contact (e.g. Going into the contact menu and sending a text message to a specific cellular line - I need to make a custom entry there). Is there an easy way to do this?
Also where would be the best place to read up on the API with tying into the calling system and SMS system? The research, unfortunately, ties heavily into the fact that I need to be able to send information based upon phone calls received and calls being placed.
Lastly, would I be better off writing native code in C++ or does the .NET SDK allow for such access?
Thanks guys. I hope to be able to help the community out during my stint on this research project.
Hello,
I would like to try to design an add-on to use VoIP services that offer callback services (Voipbuster, Voipcheap, jajah,...) in a more convenient way.
I don't mean to use the VoIP feature that requires making calls through the data connection of the phone, but I would like more to use the callback feature that allow such service to call me back on my mobile and then establish a connection to phone I want to reach.
This can be easily achieved from the Web account panel : enter your phone, enter phone to be called, then click "Call".
Although this works from PocketIE, this is not integrated with the contact data base so we have to copy the phone we want into the web form and submit. Not a great user's experience.
So this is where I want to go : initiate the call in the most transparent way from the contact manager application.
I imagine that different methods are possible and I would appreciate your opinion of feasability of each one, and if possible, to some pointers to documentation and/or sample code :
Method 1) Make my own app with make its own list of contact from contact data base (SJ Phone do this for example).
+: easy, probably best for prototyping
-: Have to write a GUI for it
Method 2) Like Skype, adding a context menu for "Call with Xxxx service".
+: no specifc GIU, use standard contact manager
-: works only with standard contact manager and not with alternative such as Contact CM
Method 3) Hook in some way the phone's call-initiation process.
How could his be done ?
This will really be my 1st project for WM after Hello World, a little ambitious, so please be patient for it to come out but I am pretty sure that with your support this can come a great app.
Thanks in advance for your help.
Regards,
~barbudor~
could be good
i was lloking for thi for a while ,but only could find the java version, and as you mentioned it was little crappy, without integration of the contactlist.... hope your project works out ok.
good luck!!
Well, i'd like to develop a security program that if your pocket pc phone gets stolen, you'd be able to do something different than just get the logs, gps coordinates, and number--i'd like to develop something that where if it gets stolen and you text the persons new number with a special word (like camera), it'll take a picture of the current setting of the phone. Sure at times, it might be in there pocket, but as long as you text that word, the phone takes pictures without the jacker knowing it and sends you the picture. I've never developed something so i'm asking if anybody here has, to what the first step would be. I chose this (got it from a convo with a friend) because i've yet to see something of this sort. Thanks
That would be slick.....hahaha..... that would be crazy if the ass taht stole it was in the same place u were....the club or something! NICE...I wish I had some programing skills....ONE
Yea, that's why i'd like to develop something like this--there would be a lot of interest and i've already heard that it would be super nice to have. Just need a cushion to start
I have two thoughts on this:
The phone side of it could be a simple MMS automation process. It would cut out a lot of work, because the MMS app already has the ability to interact with the camera and add the picture to the MMS and send it, even video and audio.
Secondly, there are programs out there, such as Vito FindMe, that provide the necessary code for making your phone run an automated process when it receives a specific word via SMS. In the Vito FindMe case, if it receives the word, it connects to GPS if available and then sends the phones GPS coordinates to the Sms'er. If a similar but open source type of Vito FindMe software could be found, most of the work would be done already. Then all you would need to do is tweak it to run the automated MMS script instead of GPS.
PS I am aware that Vito FindMe is free, but I don't think it is open source Etc I don't think the code is available.
What programs would i start off to develop this?
There is one more thing to think about. When someone stoles your phone, he probably won't use your sim-card (=phone number). To achieve all of this you need to find thief's phone number. You'd need some app to let you know the new nubmer when someone changes sim-card.
Dear Members,
I am working on an application in C# for WM which connects to saynoto0870.com website and fetches the alternative geographical No. to 0845,0870,0844 etc.
How this application works is as follows:
When user dials an 0844 or 0871 No. this application intercepts and provides with options to either go ahead or check for an alternative geographical (landline or 0800) No. from saynoto0870 website. (this option disappears after 5 second if no input is provided by user and tries to reach the dialled No.)
If user allows the application to connect and search for alternative No. it fetches the company's name, alternative No. and description of alternative No.
It then lets the user call the alternative No. by clicking on it
It also keeps track of retrieved numbers in history(application specific) and provides option to add the No. to contact List.
What I would require from respected members is to provide their comments and suggestions. I will be much obliged to receive suggestions to improve the application. I will soon post the screen shots. but first I need to make sure there are enough users to utilize this application. and no doubt this application will be free to use and redistribute.
Thanking you,
Ittar
P.S. Please do not forget to write down your suggestions.
Did you get anywhere with this ? i use the service all the time, would save loading up a browser and messing about.
I second that! I hadn't even noticed the first post!!
Definately a great idea!