Android - making audio call through the internet - android

I'm developing an android application. The app should be able to make audio calls to other users using the app. I don't want to call using phone numbers, but I want them to go through the internet. Like Skype for example. Maybe using VoIP ? I don't really know.
I was reading about SIP, but I don't understand it perfectly.
On this link, under Requirements and Limitations it says:
Each participant in the application's communication session must have
a SIP account. There are many different SIP providers that offer SIP
accounts.
What exactly is a SIP account ?
I was also looking for SIP providers, but I couldn't find any free ones. Does anyone know any ?
The main problem is that I want my app to be free and also I don't really want to spend any money making it. So am I able to make this app for free ?
Thanks for helping!

Not really clear about your use case. You may try to use rtsp and stream the voice to a media server like Wowza and then listen to it just like you do on youtube. The user listening it may also have another session and translate his voice stream to you via an standard media server like I said before. Not exactly a phone call but... doable in android and interface may hide all the tech specifics. It will look like a call. I did something like this + video couple years ago for android 4.0+

Related

How to verify http call is being made from IOS/Android/Kindle/Windows devices

I have an app on multiple platforms and i want to add a check to make sure the call is happening from the app. How can i verify this?
The app is a video game which is trying to post high scores back to the server which receives https calls.
The calls should be as secure as possible since i dont want people to post insane scores by decompiling any of the apk.
Update...
I found something for android : http://developer.android.com/reference/com/google/android/gms/auth/GoogleAuthUtil.html
I am still looking for IOS and Kindle.

Get WhatsApp messages

Is it possible to create a listener to get a message from whatsApp in android?
I mean like you have a broadcastReceiver to listen to incoming SMS in android...
Is any API is needed for that thing, or is it legal thing to do or I need to get any permission from whatsApp?
Whatsapp did not publish any official APIs.
There's this open source API for communicating with whatsapp, it's not official and might stop working if Whatsapp update their protocols.
https://github.com/venomous0x/WhatsAPI
Regarding the legality of using this or other non-official API, it depends on the service agreement that you agreed to with Whatsapp. Read it and see if they frown upon using their communication protocols with clients other than theirs. My guess would be they do not allow it.
UPDATE: This GitHub repository seems to have been taken offline due to legal threats.
It is possible, an example of an Android app that does this is Snowball - basic notification manager that can access WhatsApp message content. I'm not quite sure on how that works, but research Snowball to get more information on how it works.
It is also possible without Android, the source repository on GitHub has been taken down and put back up a few times due to legal threats.
If you do, however, manage to connect to WhatsApp's servers to access incoming and outgoing messages with a desktop app and you don't hide it well, your account will be blocked. WhatsApp notices accounts that send messages faster than it would take for a normal person to send - easy to notice because a human takes time to type, try delaying messages by a random number of seconds to try and hide this. Also note that WhatsApp's terms of service state that you may not run any automated system using the service, i.e. any external app. You may not use the service to advertise or spam (raises red flags pretty fast and gets your account blocked).
There is also another library written in Python which you can use write custom application.
It also has terminal client and you run it in interactive mode and also supports group messaging.
There are lots of issues to fix.However you should not be abusive with whatsapp service.Don't use it to spam users.This is reverse engineered library and therefore unofficial.
Here the link:-yowsup

Send text to app (not specific phone number)

I don't know if this is even possible, couldn't find anything usefull on the internet.
I wanted to make an app, that me and some of my friends could send a message trough "my app" and that everyone who has that app, receive the message, without using a phone number.
So basically, same as WhatsApp GroupConversation, but then without using a phone number.
Is this even possible?
If it is possible, could you put me on the right track to start with.
Hope I am clear enough, if not, tell me :)
Edit:
This just pops up in my head (didn't look on internet yet), but what I want, is a kind of a shoutbox.
This is possible, in fact WhatsApp does not use your phone number for this at all.
You simply provide your phone number to asure a unique ID and proof that you are indeed in possession of this phone with the validation SMS.
From there on, your phone number isn't even used anymore.
You can go 2 ways with this;
Create a simple webservice with a database on which you just save and request messages. Maybe make a little difference between get all or get latest message. Anyone, hooking into the group, can just fetch the same data. With the use of GCM push notifications, you can make this pretty instant.
Use XMPP, which is a chat protocol kinda all the chats use. Whatsapp, Google talk, FB messenger... This will provide you with instant messaging just like any other chat app or program you know.
Option 2 is by far the best in final functionality, but be warned that XMPP is quite complex and error prone.
You can look into the asmack and asmackx libraries for Android, which will give you the basic functionality with ease. Going a bit deeper, you'll have to dig into the protocol and really get to know it though.
ps. For both you'll need your own server, however with asmack(x) you are also allowed to use Google's Talk servers for free. Communication will go through your Gmail account. Basically with this you just make your own version of Google Talk.
It is possible by implementing server-client architecture. Your app will use a common database for all the users. whenever an user install your app, he will achieve an unique user ID. if anyone uninstall it, his id will be destroyed. You can track the users from those ID in database. You don't need phone numbers.

Android phone to Chrome communication and Google OAUTH

Alright I have two questions which are interrelated.
Using Google OAUTH can I send communications between an android phone and a chrome browser extension? I was thinking that I could write some info somewhere and it would be stored in the account info or something? This was just a theory (not really supported by any info I have read)
If that doesn't work I was going to use Android to node.js communication idea using http://static.brandedcode.com/nws-docs/ documentation for an android to websocket server communication then a chrome extension to the websocket server. I was then going to use the gmail from each device to verify they belong to each other and pass the message that way.
Does anyone have any knowledge about how feasible this is/how challenging it is? I also need to know how secure the communication is if I only rely on a gmail account. Is there any information done by using OAUTH or another method that I could use to secure it more?
Finally is there a method to turn a chrome extension into a websocket server? That way I could just bypass the need for an external server and any sort of verification method.
I'm willing to do some work and/or research if necessary so list anything you think I should look into and any ideas you might have. I'm thinking of having a nice coding weekend so I will be playing around with this A LOT!
I appreciate any help that anyone can give.

Android two player game to be played in internet

I have developed a simple two player chess game in android to be played using Bluetooth. I want to extend it by making it possible to be played through internet. whenever a player makes a move, the move should be transferred to the other player via internet.
How to make this possible?
I have heard of C2DM mechanism.Does that suites the scenario i described and is it reliable?
Thanks:)
Yes, C2DM is ideally suited to this type of game. This is what I am using for my own game (http://www.chesspresso.net) which is a correspondence chess client for android.
Things to consider when using C2DM:
You don't send the info to the devices, you notify the devices that a move has been made. You don't use C2DM to transfer data, you use it to notify that something has changed.
Its available for 2.2+ Android, which is the majority of devices. But if you wanted to support older devices you'd have to consider an alternative. I am using polling for older devices.
You have to request for developer access, then once your app is ready you have to request production status. If you don't do this you'll hit the developer status quota very quickly once its released! They are very generous with production quota, but you have to explain what you're using it for and it also can take a few weeks to get accepted!
Your users will have to have a google account that is authorised, otherswise C2DM won't work. Most users will have an account associated with their device, but some don't so this means that you'll possibly want to validate for the presence of an account to notify the user.
Its reliable, but every now and again a device will have to wait for the message. Sometimes a few minutes. Usually its instant.
Hope that helps!
UPDATE:
C2DM has now been deprecated, and replaced by Google's GCM.
Also, I strongly suggest looking at other options as tying yourself down to a Google specific API means you won't be able to support external marketplaces. For alternatives, I am currently evaluating Amazon SNS and I will also be looking at Urban Airship. There are possibly other alternatives I have not considered evaluating yet.
UPDATE:
Evaluation update of non google based push notifications:
Amazon SNS is just not a project for this task and Urban Airship for the vast majority of apps is too expensive. Unfortunately all the other alternatives are all very expensive also, especially if your app (like mine) relies heavily on push.
A good way of doing that is using a simple direct TCP connection between the peers.
If you're new to socket programming on Java, try this:
All About Sockets
Another option is to use some sort of IM as a communication medium for app. For eg. Use Asmack to connect to XMPP Im like GTalk. Prompt user to create an account there, for your game.
And use it to send and receive commands via IM. This way you won't need to setup your mediating server.
This works if user knows who he is playing with. To collect the user data and let them search for available players, you still need to setup a server. IRC chat room may be an option to avoid this also.
GTalk was just an example. You can use any IM or IRC also.
C2DM it's not design to transfer informations, even if they are small like "horse in b4" or things like this. It's designed to inform the device of something, maybe a newer version of a document or more articles on a website.. Stuff like this.. It's not designed to communicate device to device. And also it may be not fast enough for a real time chess play.
You should look for a more traditional way of communicate via internet or to search for some libraries (I'm pretty sure that something exists..) that will help you.
IMHO, C2DM is exactly the kind of thing you would want for a chess game; to be notified when the oppo has made his turn (which may be minutes /hours / days later ?). I have discussed my game with a few google android devs and they've stated that C2DM is ideal for this. You'll need to go via a centralised server though (well, not essential but very advisable) as there may be issues with resync'ing game state etc. Worried about "hitting the limit" ? Well, for a start my c2dm acct is restricted to "just" 100,000 messages per day. I guess you're buying the drinks if you hit that !!
Chess is often played by email. You could do that.
Of course, any centralized/federated messaging system will work.
What might be better for your use is to add a jabber client to the application and have the program generate an account name that is used for automated messaging. You could host the jabber server or generate the accounts on a free provider.
Google App Engine if you know Python or Java.
Alternatively there are two web app API styles in wide use today: SOAP XML and RESTful web services.
If you know RoR I would recommend using JSON/REST, because you can just use Phusion Passenger with Apache to deploy your app. Free, extremely easy, and makes your server very reliable.
You could, and I only mention this because my friends do this all the time, use twitter as a server between the games.
I also found a lib called mages which looks quite promising.
Good luck.
I did this for my online 2D rpg: http://developingthedream.blogspot.com
Basically, use a middle-man server to co-ordinate data between all your clients.
You simply open a socket and communicate with the middle server and it takes care of passing on the information to any other connected clients.
I wouldn't recommend C2DM because of the message limit, and because the latency is still to big. Using your own server you can optimize it, plus you'll be the only one using the service so your data will be delivered faster.
I think that C2DM is not right way for playing chess because there is no warranty that messages will be delivered. You need more reliable way for data transfer

Categories

Resources