
1. Android Studio 코드 추가 1-1. MainActivity override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) FirebaseApp.initializeApp(this@MainActivity) firebaseToken()} private fun firebaseToken() { FirebaseMessaging.getInstance().token.addOnCompleteListener(OnCompleteListener { task -> if (!task.isSucc..

오늘은 안드로이드 스튜디오 Firebase FCM 사용법을 포스팅 하겠습니다 . Firebase 프로젝트 추가. https://console.firebase.google.com/u/0/?hl=ko 로그인 - Google 계정이메일 또는 휴대전화accounts.google.com 1. 앱 등록 : 자신의 안드로이드 패키지 . 2. 앱 닉네임 : 자유 설정 가능 3. 디버그 서명 인증서 : 터미널에 입력 keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android 4. google-services.json 다운로드 5. 안드로이드 -> 프로젝트로 변경..
xml style activity private fun regionCodeInit() { val regionArray = resources.getStringArray(R.array.license_drop_down_list) val arrayAdapter = ArrayAdapter(this, R.layout.item_license_drop_down, regionArray) binding.autoCompleteTextView.setAdapter(arrayAdapter) binding.autoCompleteTextView.setOnItemClickListener { parent, view, position, id -> when (position) { 0 -> Toast.makeText(this, "Expose..
전에 포스팅 했던 ScrollView 의 방향을 활용해서 응용할 수 있는 코드를 포스팅 하겠습니다. 활용 내용은 특정 위치를 계산해서 스크롤이 그 특정 뷰 보다 내려가는지 올라가는지 활용하는 것이 목표입니다. 특정 뷰의 좌표를 알 수 있는 방법으로 getLocationOnScreen 을 활용한다. val location = IntArray(2) // Array를 준비. textView.getLocationOnScreen(location) val x = location[0] // textView 의 x 값 val y = location[1] // textView 의 y 값 이제 응용한다면 내려가면서 특정 뷰의 위치를 지날 때와 , 올라가면서 특정 뷰의 위치를 지날때를 분기로 처리할 수 있다. scrollV..
안드로이드에서 흔히 쓰이는 StatusBar 색상 변경 코드이다. window.statusBarColor = ContextCompat.getColor(this.context, color) // StatusBar 색상 변경 여기에 더해서 StatusBar 아이콘들의 색상을 흰색 또는 검정색으로 바꾸는 코드가 있다. StatusBar 를 흰색으로 지정해서 아이콘이 안보일 시 사용할 수 있다. val window = window val decorView = window.decorView val wic = WindowInsetsControllerCompat(window, decorView) wic.isAppearanceLightStatusBars = bool // true 면 검정색 false 면 흰색이 된다...
- Total
- Today
- Yesterday
- API
- Token
- 코딩테스트
- ios
- error
- Android Studio
- https
- Custom
- java
- ExoPlayer
- retrofit
- ec2
- Flutter
- ScrollView
- 알고리즘
- app bundle
- Firebase
- listener
- 재귀함수
- Kotlin
- GitHub
- bitmap
- message
- node.js
- Crop
- FCM
- flutter_new_badger
- Hilt
- android
- direction
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |