목록블루투스 (32)
투케이2K
[개발 환경 설정] 개발 툴 : AndroidStudio [AndroidManifest.xml : 소스 코드] [C_Permission : 소스 코드] import android.Manifest; import android.annotation.TargetApi; import android.app.AlertDialog; import android.app.AppOpsManager; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm...
[타이틀] 구 분 : Library / 라이브러리 제 목 : [Android] Android-BluetoothSPP (Java / Bluetooth / SPP / Serial) 사용되는 곳 : Android / Java / Bluetooth / SPP / Serial [설 명] 1. Android-BluetoothSPP 란 안드로이드에서 블루투스 시리얼 통신 (SPP) 을 할 수 있는 라이브러리 입니다 2. Bluetooth SPP 통신을 사용하면 무선 저전력 양방향 통신을 수행할 수 있습니다 [참고 사이트] https://blog.naver.com/kkh0977/222912866501 362. (android/안드로이드) 블루투스 SPP (Bluetooth Serial Port..
[타이틀] 구 분 : Library / 라이브러리 제 목 : [라이브러리] [Android] altbeacon (Java / bluetooth / beacon) 사용되는 곳 : Android / Java / bluetooth / beacon [설 명] 1. altbeacon 은 비콘과 상호 작용하는 API를 제공하는 Android 라이브러리입니다 2. altbeacon 을 사용해 근처 주위 비콘 신호를 감지하고 스캔 한 정보를 확인할 수 있습니다 [참고 사이트] https://github.com/AltBeacon/android-beacon-library GitHub - AltBeacon/android-beacon-library: Allows Android apps to inter..
[개발 환경 설정] 개발 툴 : AndroidStudio [설 명] 1. Android 플랫폼은 블루투스 네트워크 스택에 대한 지원을 포함 하므로 기기가 다른 블루투스 기기와 데이터를 무선으로 교환할 수 있습니다 2. SPP 통신은 Android 에서 블루투스 기능을 사용해 저전력으로 실시간 스트리밍 및 소켓 통신 같이 양방향 데이터 통신을 사용할 수 있습니다 - SPP 는 블루투스를 이용하여 시리얼 통신을 무선으로 대체해 사용할 수 있습니다 3. SPP 통신을 사용하기 위해서는 서로 블루투스 장비가 연결된 상태로 유지되어 있어야합니다 4. SPP 통신을 사용하기 위해서는 디바이스 간 통신을 위한 UUID 설정이 중요합니다 (UUID 값을 다르게 설정하면 통신이 되지 ..
[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : OBJECTIVE-C [사전 info.plist 설정] [ViewController.h : 소스 코드] // MARK: - [import 정의] #import #import #import #import // MARK: - [블루투스 권한 import] #import @interface ViewController : UIViewController { // [클래스 딜리게이트 정의] /* ----------------------------- // [지역 변수 정의] ----------------------------- 1. self 키워드 없이 접근 가능 ----------------------------- 2. 메소드 내에서 사용 필요..
[개발 환경 설정] 개발 툴 : AndroidStudio 개발 언어 : java [요약 설명] /** * // ------------------------------------------ * [블루투스 신호 활성 필요 사항] * // ------------------------------------------ * 1. 퍼미션 권한 부여 실시 : * * * * * * * // ------------------------------------------ * 2. 디바이스 블루투스 및 위치 권한 활성 상태 필요 * // ------------------------------------------ * 3. 로직 설명 : * - 블루투스 및 위치 권한 퍼미션 요청 * - 블루투스 및 위치 기능 활성 상태 ..
[개발 환경 설정] 개발 툴 : AndroidStudio 개발 언어 : java [소스 코드] // TODO [사용자 모바일 디바이스 블루투스 장비 연결 상태 확인] public static Boolean bluetoothConnectState(Context mContext){ /** * // ----------------------------------------- * [bluetoothConnectState 메소드 설명] * // ----------------------------------------- * 1. 사용자 모바일 디바이스 블루투스 장비 연결 상태 확인 * // ----------------------------------------- * 2. 호출 방법 : if (C_StateC..
[설 명] 프로그램 : Android / Java 설 명 : 블루투스 , 위치 권한 , 네트워크 연결 상태 , NFC , 가속도 센서 활성 상태 확인 [소스 코드] package com.example.testapp; import static android.content.Context.KEYGUARD_SERVICE; import android.Manifest; import android.app.KeyguardManager; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.Context; import android.content.pm.PackageManage..
[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [필요 설정] [소스 코드] import UIKit import CoreLocation import CoreBluetooth class ViewController: UIViewController , CBPeripheralManagerDelegate { // MARK: - [클래스 설명] /* 1. 블루투스 신호 활성 및 블루투스 신호 활성 종료 실시 2. 블루투스 신호 활성 시 블루투스 신호를 스캔할 수 있는 장비 목록에 표시됩니다 (안드로이드 폰 및 기타 하드웨어에서 확인 가능) */ // MARK: - [블루투스 신호 활성 필요 변수 정의] var centralManager: CBCentralManager! // [블루투스..
[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] [소스 코드] import UIKit import AVFoundation import Photos import CoreLocation import CoreBluetooth class MainController: UIViewController { /* MARK: - [블루투스 목록 스캔 및 블루투스 연결 수행] 1. 필요 권한 요청 [info] : - Privacy - Bluetooth Always Usage Description - Privacy - Bluetooth Peripheral Usage Description 2. 필요 import : - import CoreBluetooth - import UIKit ..
/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : AndroidStudio 개발 언어 : java /* =========================== */ /* =========================== */ [소스 코드] [AndroidManifest.xml 파일] [JAVA 파일 : A_BluetoothScan] //TODO [전역 변수 등록 부분] BluetoothAdapter mBluetoothAdapter = null; ArrayList bleList = new ArrayList(); //TODO [BluetoothAdapter 객체 매핑 부분] mBluetoothAdapter = BluetoothAdapter.getDefa..
/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : AndroidStudio 개발 언어 : java /* =========================== */ /* =========================== */ [소스 코드] //================== [AndroidManifest.xml 네트워크 연결 상태 확인 퍼미션] ================== //================== [블루투스 상태 확인 위한 전역 변수 선언 실시] ================== public static final String BLUETOOTH_DISABLE = "DISABLE"; public static final String BLUE..