전체 92

Mac에서 github SSH Key 생성 및 설정하기

android studio에서 https가 아닌 ssh 형태의 github repository에 접근하려면 사용하고 있는 pc의 SSH key가 github에 등록되어 있어야 한다. 키 생성하기 터미널을 열고, $ ssh-keygen Enter (그냥 편하게) Enter (그냥 편하게) Enter (그냥 편하게) $ cat ~/.ssh/id_rsa.pub 키 등록하기 1. 이렇게 생성된 키를 그대로 복사. 2. github.com에서 settings - SSH and GPG keys를 선택. 3. "New SSH key" 버튼을 눌러 생성된 키 입력.

git 2022.01.19

Mac OS에서 안드로이드 휴대폰 화면 미러링하기

요즘들어 시기가 시기인만큼 화상 회의가 많아져서 현재 개발진행 상황을 공유해야 할 때가 많다. 안드로이드 개발자인 나는 에뮬레이터 보다 실제 디바이스를 연결하여 작업을 하기 때문에 화상 회의를 할때면 항상 화면을 미러링해야 하는데 미러링 툴이 많이 있지만 나는 scrcpy 프로그램을 설치하여 사용하고 있다. brew가 설치되어 있다고 가정하고, 터미널에서 아래 명령어를 친다. (설치가 생각보다 오래걸린다) $ brew install scrcpy 안드로이드 개발자라면 당연히 android SDK가 설치되어 있을거라 생각되지만, 혹시라도 그렇지 않다면 android-platform-tools를 설치한다. (직접 확인은 안해보았음) $ brew install android-platform-tools 디바이스의..

etc 2022.01.15

Open JDK Install - M1 Apple Silicon Mac

다운로드 링크 애플 실리콘의 M1칩을 탑재한 맥북 또는 맥에서 jdk를 설치하려면 Open JDK를 설치해야 하는데, 아래 azul.com 에서 다운받을 수 있다. Downloads Download Azul Platform Prime Azul Platform Prime extends Core, adding unique Azul innovations to improve the runtime characteristics of Java workloads. Azul Platform Prime delivers added performance, scale, consistency, and efficiency to Java applications, www.azul.com java 선택 및 설치 ex) Java 11 >..

etc 2022.01.13

[android] Android 12 Vibrator Pattern(진동 패턴) VibratorManager VIBRATOR_MANAGER_SERVICE

안드로이드 12 (target 31) 에서 새롭게 VIBRATOR_MANAGER_SERVICE가 추가되어 기존에 사용하던 VIBRATOR_SERVICE가 deprecated 되었다. VibratorManager 선언하기 (버전 분기) val vibrator = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { val manager = getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager manager.defaultVibrator } else { @Suppress("DEPRECATION") getSystemService(Context.VIBRATOR_SERVICE) as Vibrator }..

android 2022.01.05

[android] apk decompile (안드로이드 apk 디컴파일)

신규 프로젝트를 진행한 뒤, 난독화가 잘 되었는지 확인하기 위해서 디컴파일을 진행해 보았다. 디컴파일은 평소에 자주 하는게 아니기 때문에 정리차원에서 포스팅을 해두자. apktool을 이용하여 디컴파일을 하는 방법도 있지만, 나는 오래전에 사용해 보았던 dex2jar를 이용하여 간단하게 디컴파일을 할 것이다. 1. 먼저 아래 링크에서 dex2jar를 다운 받는다. https://sourceforge.net/projects/dex2jar/ dex2jar Download dex2jar for free. Tools to work with android .dex and java .class files. Mirrors: * https://bitbucket.org/pxb1988/dex2jar * https://gi..

android 2021.11.30

[Android 12] Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE

Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. 위와 같은 메시지가 발견되었다면 PendingIntent를 사용하는 구문에서 오류가 발생했을 가능성이 높다. 나의 경우 foregroundS..

android 2021.11.18