Push-To-Talk (PTT) App using Bluetooth HFP between iPhone and Bluetooth device - iphone

We found PTT apps on iPhone store. Now I would like to make one for myself.
For the past 1 week, I have been reading all the posts here regarding how to achieve this in coding. Lets say, we paired the BTdevice with iPhone (The BTdevice supports HFP and A2DP).
When we make a call pressing the button on BTdevice to iPhone, in our iPhone app,
we would like to recognize this EVENT or data in the app, then route the audio to iPhone-speaker.
When the button on the BTdevice released, user presses on-screen Button on iPhone to speak to BTdevice. The audio should be routed to BTdevice speaker.
Please through some procedure to achieve this in coding. Also libraries, classes and samples if available.
I understood this application can be achieved without MFi NDA with apple as HFP and A2DP are open in Apple ( I do understand the documentation available is limited).
I have found the following post EXACTLY addresses what I'm trying. Please take a look.
Intercom with Bluetooth headset

My experience has been, and as your link indicates, pairing with Bluetooth connects the microphone and speaker of one device as dedicated input/output pair for another device, so you can't mix and match a microphone on one end with a speaker on the other.

Related

Sending data via bluetooth on Iphone (iOS 5.x)

I have been searching and searching, but found nothing yet. Is it really true that there isn't a straightforward way to establish a BT connection from my iPhone to another (3rd party) BT device, i.e. an audio receiver. I know this is possible through the OS (I own a Belkin BT music receiver that works this way - it appears in Settings and from there I can connect to it). Note that I am not interested in pairing to iOS-devices, but an iPhone and my custom made hardware.
I've managed to find Google's BTStack at code.google.com, iBlueNova, Celeste and more, which all must be run through Cydia or similar and also I stumbled upon Apple's MFI-program, which seems fairly complicated.
Does anyone have any experience with bluetooth and iOS, if so, how and where do I get started?
If one might be interested, the project I am developing involves a piece of hardware with a BT device attached on it. The app should be able to send simple commands via bluetooth (basically just ASCII characters) to the device, which will react depending on what it receives.
If you are developing accessories that need to connect to iOS devices and want to use your own communication mechanism then your only option is to join the Apple MFi program.

Is it possible to build a smartphone app that stream a screen to a TV, while allowing you to remote control it with the phone itself?

Is it possible to build an Iphone/Ipad app (and Android app) that can do two things: stream an interface and the respective content (particularly video) to a TV and then let me use the phone itself as a remote control for this interface?
Basically the idea is, you don’t need a smart TV anymore or some kind of set-top box or other connected device, just the smart phone which you carry around all the time anyway and which is connected to your local wireless connection. Maybe a docking station with a HDMR connection to the TV, so you are not emptying your battery.
Do you know any comparable implementation or use?
If it is theoretically possible, can you anticipate any performance problems, bottlenecks and how those could be resolved?
If this it’s not possible, which links are missing, what technology would have to be developed first?
Thank you for your thoughts on this!
Jacob
The iPhone/iPad would work for this. It allows you to output to a second screen. You can stream video, audio, whatever. A cool example I saw was using the TV as the primary display and the phone as a controller for a game.
There are two ways to do it. You can use an hdmi output or a vga output. There is also a AirPlay, which will let you do it wirelessly. You would need an AirPlay capable device (like an AppleTV) for it to work though.

Detect Bluetooth answer/end-call button on iPhone

Is it possible to detect and respond to the answer/end-call button presses from an HFP Bluetooth device on iOS? Has anyone seen this? Where should I look for answers? I understand one could get access to lower level bluetooth if you register for the device manufacturer (MFI) program but I'm hoping I don't have to dive this deep. I also know that you can respond to AVRCP commands but I am not wanting to use this option. Can anyone help?
UIResponder has a -remoteControlReceivedWithEvent: method that you can use to receive events from external devices, possibly including Bluetooth headsets. From the docs:
Remote-control events originate as commands from external accessories, including headsets. An application responds to these commands by controlling audio or video media presented to the user. The receiving responder object should examine the subtype of event to determine the intended command—for example, play (UIEventSubtypeRemoteControlPlay)—and then proceed accordingly.
To allow delivery of remote-control events, you must call the beginReceivingRemoteControlEvents method of UIApplication; to turn off delivery of remote-control events, call endReceivingRemoteControlEvents.
It’s not clear whether the answer/end button on a headset is considered equivalent to the play/pause button on, say, the earbuds’ remote, but this might be worth a try.
Sadly, there are no available bluetooth public APIs for developers, so no way to get that access in the conventional means.
As of my research, some person received some event from their bleu-tooth devices via "remoteControlReceivedWithEvent" but not all of them! Some are receiving none! And very few are receiving all of them!
I also tried Core Bluetooth but it only supports LEB (Low Energy Bluetooth devices)!
https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothOverview/CoreBluetoothOverview.html#//apple_ref/doc/uid/TP40013257-CH2-SW1
Also, some posts suggest it is possible to use Classic bleutooth instead of "Low Energy":
How to use bluetooth classic instead of le
But it has limitation as well (the post is taking about "MFi accessory"! MFi is it for "made for iphone" ?!?!?!)
from the post above:
"A non-LE Bluetooth device needs to be MFi-approved to be used with the External Accessory framework (it needs to use a specific Apple chip and a proprietary communication protocol). You won't be able to build applications to access this device unless it either uses the more open Bluetooth LE or has this chip in it for standard Bluetooth. There might be ways to do this via jailbreak, but pretty much everyone I know has moved over to Bluetooth LE." !
more post: Connecting to a Bluetooth device from iOS, no MFi
Regards.

Can iPad know when your iPhone is close by?

Is there a way to create a background app( once this is available on the iPad ) that can detect when your iPhone is close by? So I'm thinking that it would require the use of bluetooth. I'm thinking you could use this for syncing and such.
Ignoring the aspect of backgrounding (which isn't really what you were asking about in totality):
The way this would work on a running application is that both devices would need to have the application running. Then, they would both have to register themselves through Bluetooth using Bonjour/GameKit.
With traditional bluetooth iPhone/iPad games, the game checks bluetooth and displays local bluetooth players, and then the user can select another player.
Your application would retrieve that list of local bluetooth iPhones, and compare the device name to the device name which you have determined to be your iPhone.
Here is some: GameKit Documentation.
You can do this with two actively running apps. But backgrounding these apps... of course: NDA.

Is it possible to output video of my iPhone application running on a device?

I am working on an app for a client where he will be showing it in a board from to a group of directors for a serious presentation. Because the iPhone is so small, it wouldn't make sense to have him demo the app on the actual device because no one would see anything.
Is it possible to have the screen output on a computer or tv so that everyone in the room can see what is going on?
http://dragonforged.com/DFVideoOut.shtml
For outputting video off an App from the iPhone/iPod.
Demo of the software http://www.youtube.com/watch?v=upfTZRlszJo
UPDATE: The AV cables described below will not work. Apple only enables TV output for YouTube, iPod Video and iPod Photos.
From Apple's support site:
All you need to get TV out is a compatible iPod or iPhone and the correct cable. If your device works with the component and composite cables, then the choice depends on the TV(s) you will be connecting to.
You need either the Composite AV Cable or the Component AV Cable. Both cables connect to the iPhone's dock connector.
Not unless you're Steve Jobs.
Use the emulator to demo the app via a laptop.
Then pass around an iPhone for the 'hands on' time.
If it's not a phone app, but suitable for the iPod touch, then buy a dozen of them to pass around as demos.
Its not exactly what you want but:
www.projectaphone.com
You cant pass the phone around, but in reality - you need to see the finger interaction anyways.
I wonder if an overhead projector would work - with the projector light turned off of course. Maybe the light emitted from the iPhone would be sufficient in a dark room?
You could demo it on the simulator.
Some applications for jailbroken iPhones exist to let an AV cable work in any application. The ones that come to mind are iPhone-TVOut (http://code.google.com/p/iphone-tvout/) and ScreenSplitr.