자동으로 블루투스 켜기를 하고 싶습니다.위치기반으로요
시나리오 두가지가 있는데, 블루투스가 자동으로 켜질 수가 있나요?
혹시 개발규격이나 문서(android developer)있으면 알려주시면 감사하겠습니다. 아무리 찾아봐도 없는지..
구글링도 마찬가지구요.
1.앱 따로 실행하지 않은 상태에서 특정 위치에 진입시(GPS, Wifi등으로) 블루투스가 꺼져있으면, 켜기
켠 이후에 다른 동작을 앱에서 자동 설정할 예정(시럽처럼 BLE통해서)
특정위치 진입은 서버에서 판단해도됨
2. 1번이 불가하다면, 특정위치 진입시에 서버에서 보고있다가 푸쉬보내서
해당 푸쉬 누를시에 블루투스를 바로 키거나 or 블루투스 메뉴로 보내서 On하도록 유도.
블루투스 전문가분들께 확인 부탁드립니다!!
----------------------------------------
아래 구글개발자 문서를 보니, 2번은 가능한것 같긴합니다만..
http://developer.android.com/guide/topics/connectivity/bluetooth.html
(요 페이지 중간쯤쯤.. 2번에)
To request that Bluetooth be enabled, callstartActivityForResult()
with the ACTION_REQUEST_ENABLE
action Intent. This will issue a request to enable Bluetooth through the system settings (without stopping your application). For example: