일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- TypeScript
- 알고리즘
- network
- git
- BFS
- Algorithm
- java
- LeetCode
- 자바
- frontend
- Python
- db
- 동적 계획법
- 리트코드
- react
- DFS
- 다이나믹 프로그래밍
- Redux
- Data Structure
- Javascript
- 프로그래머스
- DP
- 그레이들
- Database
- Graph
- 백준
- VIM
- 안드로이드
- CS
- vscode
- Today
- Total
목록Programming/Android (28)
늘 겸손하게

안녕하세요 besforyou입니다 이번 글에서는 BluetoothAdapter로 블루투스 기기 검색이 안될 때 해결책 한가지를 소개하겠습니다 문제 상황 android manifest에 Bluetooth, Bluetooth_ADMIN 퍼미션을 주고 BluetoothAdapter를 생성한 뒤 startDiscovery() 메소드를 호출해도 기기 주변 블루투스 장치가 검색이 안 되는 오류가 발생했습니다. 왜 그러나 싶었는데 스택 오버플로우에 해결책이 있었네요. 출처 : https://stackoverflow.com/questions/16184420/bluetooth-on-android-startdiscovery-not-working-cannot-scan-devices Bluetooth on Android: S..

안녕하세요 besforyou입니다 이번 글에서는 안드로이드 logcat 사용법에 대해 소개하겠습니다 Log 사용법을 몰랐을때 저는 디버깅할때 Toast로 변수값을 기기 화면에 출력시켰습니다. 하지만 더 간단한 디버깅 방법이 존재합니다. 바로 Log를 사용하는 방법입니다. 안드로이드 스튜디오 하단에 보면 Logcat을 볼 수 있을겁니다. 사실 Logcat을 처음 본 사람은 뭐가 뭔지 알기 어려울겁니다(나만 그런가) 프로그램 실행 중 특정 변수값을 알고 싶거나, 출력 메세지를 Logcat에 보내고 싶을때 Log.출력필터(TAG,MSG)를 추가해보세요 예시 코드에 Log를 추가합니다 그 후에 프로그램을 실행시키고 Logcat에서 태크를 Info로 바꾸어주면 수십가지의 Info가 계속 출력될겁니다. 첫 번째 사..

안녕하세요 besforyou 입니다 이번 글에서는 Drawable 변수를 생성하고, Drawable resource를 변수에 연결하는 법에 대하여 소개하겠습니다 1 Drawable drawable = ContextCompat.getDrawable(context, R.drawable.리소스이름); cs 위 코드로 drawable 객체와 drawable resource를 연결할 수 있습니다. 이제 drawable 객체를 함수의 인자로 주는 것도 가능합니다.

안녕하세요 besforyou입니다 이번 글에서는 주변 블루투스 기기 신호 강도 찾는 방법에 대하여 소개하겠습니다 출처 : https://stackoverflow.com/questions/15312858/get-bluetooth-signal-strength 1. 블루투스 어댑터 생성 BluetoothAdapter BTAdapter = BluetoothAdapter.getDefaultAdapter(); 위의 명령으로 BluetoothAdpater를 생성 가능합니다. 생성한 후 onCreate 하단에 registerReceiver(receiver, new IntentFilter(BluetoothDevice.ACTION_FOUND)); 를 추가하여 블루투스 리시버를 등록합니다. 리시버는 아래에 따로 생성해줍니다..