Android
-
[Android] 앱 사이즈 줄이기 shrinkResource Error - Removing unused resources requires unused code shrinking to be turned on.Android 2018. 12. 4. 14:33
Removing unused resources requires unused code shrinking to be turned on. See http://d.android.com/r/tools/shrink-resources.html for more information. 혹시나 앱의 용량을 줄이기 위해 shrinkResoure를 아래와 같이 썼는데 이런 에러가 난다면 minifyEnabled도 셋트로 true로 설정해 주어야 한다- proguard까지 셋트로 생각할 것.. shrinkResources true minifyEnabled true
-
[Android] addview로 붙인 view의 제자리 rotate animationAndroid 2018. 3. 27. 17:24
rotate animation은 아래와 같이 하면 잘 돌아감 image = new ImageView(MyClass.this); layout.addView(image, width, height); image.setX(206); image.setY(206); but, addView로 붙인 경우는 parent View의 (0,0) 축을 기준으로 rotation이 되어야 하므로 아래처럼 해야 함 //돌아가는 애니메이션 생성 final RotateAnimation rotateAnimation = new RotateAnimation(0, 3600, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotateAnimation.setDurati..
-
[Android] AndroidManifest.xml의 <supports-screens> 속성Android 2018. 3. 20. 14:27
일반적으로 AndroidManifest.xml에 아래와 같이 설정하는 속성인 는 아래처럼 값을 지정하는데, 폰 전용 앱을 태블릿에서 다운로드 받지 못하게 하기 위해 사용되었던 것이라 한다. 일단 요즘엔 안 쓰고 쓸 일도 없다고 함. Android HoneyComb(3) 시절에는 스크린 사이즈로 보통 OS가 구분되어 사용했으나 지금은 다른 방법으로 구분하니까 쓰지 말자. 이거 잘못 쓰면 일부 단말에서는 구글 플레이스토어에서 아예 앱이 검색되지 않는다! 주의.
-
-
-
Apple Mach-O Linker ErrorAndroid 2018. 2. 9. 13:34
잘 열리고/빌드되던 프로젝트에다가 파이어베이스 설치하고 나니까다시 프로젝트 열었는데 Apple Mach-O Linker Error클린하고 빌드하고 Target OS 바꿔보고 identity의 Product Name 바꾸고 해도 안돼서아니 대체 뭐가 문제야?? XCode는 개복치인가?? 했는데 엑스코드에서 처음 오픈할 때.xcworkspace 파일로 열어야 한다.xcodeproj파일이 아니고오... iOS는 처음 하는거니까 그럴수도 있지 뭐 자괴감
-
[Android] FCM Push type (data/notification)Android 2018. 1. 30. 13:12
Android Firebase FCM Push를 개발할 때 다음과 같이 세가지 정도의 상황을 테스트 해보면 되는데 1) 앱이 실행중이면서 foreground로 올라외있는 상태2) 앱이 실행중이면서 background로 내려가있는 상태3) 앱이 실행중이 아닌 상태 여기서 앱이 백그라운드 상태일 때, fcm push는 onMessageReceived()로 들어오지 않는다. ;; firebase 웹에서 테스트로 푸시를 보내면 "notification" key에 payload가 담겨져서 오기 때문인데,이 "notification"을 "data"로 바꿔줘야 모든 푸시를 onMessageReceived()로 받아서 처리할 수 있다. 즉, firebase 웹을 통해 테스트 할 때는 백그라운드 상태일 때 onMessa..
-
[Android] WebView zoom in/out을 위한 viewport meta tag 변경Android 2018. 1. 30. 12:57
기억을더듬어_내가_기억하려고_쓰는글_ Android WebView에서 소스를 받아왔는데, 두 손가락으로 zoom-in/out이 안되게 막혀있는 경우가 있다. 웹뷰에 로드된 html 소스를 까보면 안에 요런 식으로 설정이 되어 있음. user-scalable=no 이놈이 문제인데, 하지만 user-scalable=yes로 갈아치운다고 100% 해결이 되지 않았기에, 이 포스팅을 작성하게 됨.... 일단 Android Native단에서는 해줄 수 있는 방법들이 여러가지가 있는데 1. 아래 설정들을 webView 객체에 추가하면 보통 해결. webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setUseWideViewPort(t..