Send messages to Iphone/Blackberry/Android on local Wifi without knowing number - iphone

I would like to send a messages to all iphones or blackberries or androids that are using my local wifi. Whether it be a bbm or a flash sms etc.... I am even willing to pay for texting etc....
Can I do so without knowing their number? Can I determine their number from their information (ie: mac address and or phone id) being sent a request for phone information?
I appreciate any help. I have a feeling like it is not possible for many reasons, but I am curious....

Overall there is a way to do it, it's called "broadcasting" (or UDP broadcasting). Your wi-fi AP should support and allow it. You also must make sure Android, iOS and BB support this (but there is no reason why they shouldn't).
It looks something like this:
Install your custom app on all devices.
When device is connected to specific wi-fi access point, you send broadcast message "device X is connected, my address is XA, send messages to port XP" every several minutes. You also start listening for such notifications from other device.
If another device is connected, it will send "device Y is connected, my address is YA, send messasges to port YP". Device X will receive message from device Y, and device Y will receive message from device X.
When third device is connected, it sends "device Z is connected, my address ZA, send messsages to port ZP". This Z device will eventually receive messages from X and Y, while X and Y will become aware of Z device as well.
You'll probably need to implement simple TCP protocol in order to actually send messages from one device to another.
To summarize, you'll need to make discovery via UDP and communication via TCP. Those would be two different custom protocols. And it shouldn't be hard to implement. But you'll need to implement this for all mobile platforms you are interested in.

No, it's not possible (not for the Blackberry at least unless you're the NSA, since the BBMs are encrypted and operate on RIMs internal proprietary network before they even get out to any other carriers).
For the iPhone and the non-military Android phones, you'd just need to purchase your own private cell phone repeater/tower. That at least is feasible (although quite unpractical and highly risky), one guy did it successfully at a security conference with every participant's signed consent and with an independent auditor present, but he was lucky he didn't get himself arrested.
You see, by saying that you want to send an SMS, you're automatically implying that you wish to use the SMS infrastructure (which by definition doesn't even operate on wifi, it operates on the cell phone infrastructure).
That being said, if you control the wifi hot spot, you could do something else that might get you 60% of the way there. You could force everyone who utilizes your hot spot to go through an initial web page, and through that, you could communicate to them (although, please be aware, this is highly annoying to the user, at least it is to me especially on a phone).

Related

Is there a way to connect my android phone over wifi to asterisk pbx so can I make make and receive calls via the mobile from my pbx?

I have set up my raspberry pi with Asterisk and FreePBX. I am now trying to get this to be able to use my android mobile phone to make outgoing calls while the phone is in the range of my wifi.
So a good start would be if the pbx could pick up an incoming call and send it to the voice mail. I.e. record what the caller had to say.
I have read that you can do something similar with chan_dongle but looks like its over bluetooth. Can we not just do this over wifi?
Fairly new to all this so will have undoubtedly missed out vital info so please just ask and I will try and keep an eye on the forum and respond.
You can't do termination on android softphone.
When call come you have no access to it, android core developers work hard to limit such access.
Phone call done in hardware, hardware gsm core have closed firmware/drivers and thoose interfaces specialy designed to not allow access.
That was done to prevent spy-like apps/viruses and termination too ;)

iOS and Bluetooth low energy, possibilities?

I want to connect a robot, via Bluetooth, with an iPhone (4S or more) via Bluetooth low energy (BLE) 4.0. This robots require to send all the notifications of the iPhone to the device.
For example: If the iPhone gets a new email, I must send the event to the robot, and it will blink an LED. Stop.
I want to know if the iOS Bluetooth APIs of the Bluetooth framework can do this, or better, can share the Internet connection or whatever that can do this work.
I'm asking this, because I have heard that the APIs have some restrictions.
PS: ANY solution that can do this is very accepted (no Wi-Fi connection solution).
Bluetooth LE would be the way you want to go here, because standard Bluetooth requires your device to be MFi-compliant. Standard Wi-Fi could also work, if you're able to require the presence of the supporting network.
As of iOS 6.0, you can set up your iPhone as a Bluetooth LE peripheral, which would allow it to send notifications to your device, if it is configured in a central role. That would be a pretty power-efficient way of updating your device with new data.
However, there's one large hurdle to doing what you want here. iOS applications have no access to system-wide notifications, so you won't be able to listen for incoming emails or other notifications like that. You'll be able to send data to your device via Bluetooth LE, but you're not going to know when emails come in so that you could send that to your device.
With bluetooth 4, you could control a robot, as well as create a "notification" bot. It could be done quite easily. However as mentioned, you can't access system wide notifications in iOS.
However, you could use an external solution to listen for system notifications and then an API to listen a singular encoded notification and have your app listen to that.
One such system is https://ifttt.com (no affiliation)
There are also some great plug and play BLE options for rapid prototyping.
You can do it. A simple solution would be let a phone check your email periodically. Don't rely or try to use external Apple applications to do that, but use services provided by your mail.
In the case of Gmail, try to go to https://mail.google.com/mail/feed/atom. If you are logged in your Gmail, you will see the unread mail in XML format. The way you would login using a URL is: https://username:password#mail.google.com/mail/feed/atom
So what you can do is periodically parse the output and when <fullcount>0</fullcount> value changes call your robot service via BLE which should act as a callback for this specific event.

Why do mobile devices have to periodically check servers for updates?

I understand that some applications need to check against a server periodically, but why don't servers let a mobile device know when it's time to update.
For example, let's say you receive an e-mail in gmail. As it stands now, there can be a delay between receiving the e-mail and your device notifying you. I assume this has to do with waiting until the device has checked the gmail server, at which point it sees the new e-mail and notifies the user. It makes more sense to me that when the gmail server receives an e-mail, it should ping (or however the creator wants to implement it) all registered devices to let them know that it's time to update. This way notifications would be synchronized and mobile device could save battery by not having to periodically check a server.
What you are describing is called a "server push". Some mobile applications does use server push. And Google actually have a technology in place to make this easier to implement, named "Cloud to device messaging" (C2DM). It works by having the servers sending a tiny little message, via googles C2DM servers, to the application running on the device, informing it its time for a update. And the device then retrieves the actual update from the original server (not from C2DM).
Its good stuff. It allows the service listening for C2DM manages to wake up the phone and everything. The downside is, the user of the application needs a google account. For android users, this isnt really a downside though.
Except they do, in some cases. In the "Mail, Contacts, Calendars" section of Settings on my iPod, there's a submenu labeled "Fetch New Data", which contains an option to have the mail server or whatever "Push" the data to the iPod. The Fetch aspect, which you can set the schedule for, is for when Push is off or you're syncing with applications that don't support push.
That is how Android does it. It pushes notifications to the device and that api is open to third party developers as well so they can push notifications to their users.
That thing is it is difficult to know the address of a mobile device at any particular time, the I.P address is dynamic, on a server the address is much more stable, so the device knows it will always find Google at google.com but Google has no real way of knowing where to find the device, it wouldn't know where to ping in the first place.
This is where push comes in, there are different implementations but i think they work by having the device maintain a connection to the server, and reestablishing it if its lost.
See http://en.wikipedia.org/wiki/Push_technology
This of course is much harder to implement and maintain then a simple client pull.

Can an iPhone app act as a server to send messages or push notifications?

I want to write an iOS app that can act as a client and a server to other iPhones over the cellular data network (i.e., without a typical centralized server). The goal is to share series of about 200 short event messages, one at a time, from the iPhone server to multiple iPhone clients by some means of notification. Apple Push Notification service would be fine for such notifications, but there is no need to use it specifically.
I think sending push notifications from one iPhone to another is possible by connecting to gateway.push.apple.com from the serving iPhone as described in the Local and Push Notification Programming Guide, but I can't find anyone else discussing this approach (maybe it's too obvious?).
The reason for all this is an attempt to avoid the overhead of infrastructure. If this isn't feasible, alternatives which minimize or avoid additional hardware are welcome.
Requirements:
Communication must be [strictly] over cellular data network
Wi-Fi isn't available
Bluetooth doesn't have enough range
Unidirectional communication with an iPhone server multicasting to many iPhone clients
No jailbreaking
Ideally the serving phone's battery will be able to handle this without a recharge
Update 5/4/11 2:12 AM EST: Just to be clear, I don't have any particular requirement to use APNs; I thought it may have been feasible in this setup, but from the discussion below, it sounds like that's not the case. However, I'm still interested in any other system that could help me achieve the same end result with some type of message passing or similar form of communication.
Theoretically you should be able to write a iOS app that can connect to the APNS and send notifications to other devices running your applications. However, your main problem will be to actually acquire the 'tokens' of other devices. When you have a centralized server doing the job, its always online and thus, the clients can 'talk' to it via http and register them self (giving their tokens to the server in the process). Thus the server knows the client token and it can use them to send notifications to the clients via APNS.
However this is not possible in the scenario you are talking about. But this is not to say its impossible. May be you could use an email account X, to store all client tokens. Every client will send a email to this account with their token in it. So when a another 'client' want to send a notification to another client, it can find out the token by reffering to the inbox of the email account (you can cache this stuff and optimize it in a zillion ways of course).
But the point is some how a (third party(ex: email service provider)/your own) server that is online 24/7 will be involved in the process.
Let us know how you progress with this. It would be interesting to know.

iphone app communication without using webservices

I want to send some Text plus a image from one iphone application to other iphone app but restriction is I should not use a web server in between communication,Is there any way to fulfill it ?
Details: There are two independent devices and could be far enough say out of network. My requirement one app adds some text with a image and sends it to another iphone which can be at any long distance , and the app installed in another iphone will read that info and image into itself.
Actually there is a solution that meets your needs — and that fits to bbums answer:
Create a HTTP-Server on the iPhone, using cocoahttpserver. than you will ask some webservice like whatismyip.com for your public ip. with this your iPhone can be connected worldwide.
But very likely ur wifi-network is not forwarding your port to the iPhone. Ash.
And even if: Now it gets difficult. How to publish your ip from one phone to the other? hmmm... — I got it: I will exchange the information in a centralized space! In the web!
... wait — that would be a Webserver.
You see: Without any kind of server in the Web the users would need to exchange ip manually and have full admin power and knowledge about the local network.
So IMHO bbums answer is the only way to go.
PS: I am working with http server running on iPhones. In local network that works great, especially with bonjour. And you can use them over distance network — but only with reconfiguration of your router — something you shouldn't force your user to do
There is far from enough information to provide a specific answer.
two apps on two different devices?
are the two devices on the same network?
are the two devices both on WiFi?
do you need the user to receive a notification or something if the app isn't running?
If on same device, you can define a custom URL handler in the destination app and then openURL: in the source app to pass the data over. Encode your image and text into the URL, but be careful of size limitations.
If on different devices, there are many possible solutions, but answering the above questions will be critical to actually knowing what solution is appropriate.
Given your comment -- two apps, different devices, arbitrary networks -- then you are going to have to have some kind of server in between. Note that the recently added Game Center does have the ability to rendezvous two users, but it has a very particular user experience that may not be appropriate to your needs.
I would suggest that you investigate using push notifications to notify the receiving user of the availability of content. As for moving the content between, no direct connection is possible and you will have to have some kind of store-and-forward server in between. And, yes, a web server is going to be the easiest possible solution simply because HTTP is ubiquitous these days.
If there's no network of any kind available, but both parties have amateur radio licenses, then hooking the two devices up to HF packet radios might work.
THIS is super EASY.
I would code up some software that can turn data into modem signal, like the good old dial up modem. The device would actually make those annoying buzzing sounds.
You get the phone number for your friends nearest landline and call him.
He places his iPhone near the phones receiver in listen mode and you connect to his phone using your audible modem.
Bingo, via the power of sounds you have sent data which is decoded on his device and all for the very cheap price of a phone call, there are pretty cheap these days especially if you use Skype.
Easy Way (relatively speaking)
A way two apps on different networks can communicate without setting up a web server of some sort is as follows.
Use an existing third party storage system like DropBox.
Each app would need the login and password for your DropBox. Then both apps can read and write files that the other app can see.
An existing app that does this is a shopping list app called ShopShop.
The app on my phone and my wife's phone both link to the same DropBox account and the app keeps the shopping list synced up when one of us adds something to the list.