Android(5)
-
갤럭시 워치4 버스 어플 만들기 #2 Custom Listview 만들기
결과화면 버스 이름과, 버스 시간 사이에 글씨체 차이가 있기를 바랐기에 Custom Listview를 만들어서 구현했다. 먼저, mainactivity 안에는 listview를 하나 생성해서 넣어둔다. 그리고 그 아래에다가 listview Layout.xml을 생성 구현한다. 내가 원하는 점 : 버스 넘버, 첫 번째 버스가 오는 시간 , 두 번째 버스가 오는 시간을 원하기 때문에 String은 3개를 넣었다. 그 뒤에 뭐.. Adapter 만들고, listview를 채우고... 자세한 내용은 Github로 대신하겠다. Github 주소 https://github.com/Bsoyoung/GalaxyWatch_BusApplication.git
2022.04.30 -
갤럭시 워치4 버스 어플 만들기 #1 환경세팅
Android Studio Activity 생성 후 Project 이름 등 설정하여 프로젝트 생성. 워치4 Android Studio와 연동하기 1. 워치4 설정 -> 연결 -> 블루투스 끄고, 와이파이 연결 (PC와 같은 WIFI) 2. 워치4 설정 -> 워치 정보 -> 소프트웨어-> 소프트 웨어 버전 연타. 개발자 모드 켜기 3. 개발자 모드 - ADB 디버깅 ON, WIFI로 디버깅 ON 하면 ip 주소가 나옴 OFF 상태일 때 Unavailable 라고 적혀있는 부분에 ip 주소가 나옴 * 만약 ON 상태에서도 Unavailable이면, 워치 - 배터리 - 절전모드 상태인지 확인해봐야함! 기본 모드여야지 ip주소가 제대로 나옴. Terminal에서 Android platform-tool 이 설치된..
2022.04.03 -
[JAVA] Foreground Service, send Intent object and thread
*Foreground Service를 동작하면서 Thread를 돌리고 Foregroudn Service를 동작할때 Intent에 Intent Object를 전달하는 방법 *MainActivity Intent getIntent = getIntent(); testSerializable testSerializable = (com.example.myapplication.testSerializable) getIntent.getSerializableExtra("userIntent"); if(testSerializable != null){ Log.d(TAG, "NUM : " + testSerializable.getNum()); }else{ Log.d(TAG,"userObject Null"); } 1. getInten..
2021.02.20 -
[JAVA] Add Button in Notification
Notification에 Button을 Add 하는 방법 1. Notifcation을 눌렀을때 일반적으로 반응할 Intent 선언 2. Notification에서 Button을 눌렀을떄 사용할 Intent를 선언 3. Notification에서 addAction을 추가 (Notifcation EXIT 기능 Action) createNotificationChannel(); Intent notificationIntent = new Intent(this, MainActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); //end option Intent notificationca..
2021.02.20 -
[JAVA] Foreground Service & SMS Broadcast Example
*Foreground Service Example https://androidwave.com/foreground-service-android-example/ Foreground Service Android Example - AndroidWave In this Post, I'll explain about foreground service android, How does work? What are the advantages and implementation? At last, I will prepare a foreground service sample app. androidwave.com 해당 예제를 베이스삼아 Foreground Service가 도는 상태에서 SMS Broadcast 를 받는 예제를 만들어보..
2021.02.19