how to monitor when the iPhone has conneted to the car bluetooth?

how can I know when the user get in the car (When the IOS device conect to any paired car) and when the user get out of the car ( When IOS device disconnect from any paired car ).

I dicovered that it is possible by going to "Reminders" on my iPhone and setting a reminder then going to "details" and press "Remind me at a location" and then I have the option to select "Getting in the car" or "getting out of the car".

It works well on my car with no CarPlay set. It seems that iOS system just monitoring the connected/disconnected events of car bluetooth(classic bluetooth, BLE is not required).

Is there any APIs that I can use to develop my own app? when users get in their car, my app can be notified by the system and do some task I defined?

Post not yet marked as solved Up vote post of iamyimiao Down vote post of iamyimiao
1.9k views

Replies

HI, do u have a solution?, I'm trying to detect when the iOS device is connected to a paired car but I can't find a way to do that

not yet

Resolved?

Hey,


if i understand right, then your iphone is a peripheral right?


if yes: the iphone connects to the central(car) the car is able to activate the notifications -> then you get the following callback:

peripheralManager(_:central:didSubscribeTo:)


if you disconnect then you get the

central:didUnsubscribeFrom



you understand what i mean?

The peripheral(ios) dont support the didConnect and didDisconnect so you need to write/read to a charakteristik or you subscribe to a charakterisik.



Hope it helps you.


Best Regards,

Roman


More Information about Notifications and Configuration under Core Bluetooth 5.0 in 3.3.3.3

Car Bluetooth is version 3.0.


It is impossible