본문 바로가기
Activity 최초 생성은 portrait 로 진입하고, Sensor 값에 따라 rotate 를 지워하는 방법. Activity 최초 생성은 portrait 로 진입하고, Sensor 값에 따라 rotate 를 지워하는 방법. - Manifest 의 Activity tag에서 screenOrientation 값을 portrait 로 주고, 코드 안에서 다음을 호출해준다. Activity.setRequestOrientation( ActivityInfo.SCREEN_ORIENTATION_SENSOR ); 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 11. 14.
[android] Data Backup 하기 ( Backup APIs ) 출처 : android developer Data Backup 하기 ( Backup APIs ) - Using the Backup API - 유저가 새로운 단말을 구입하거나 단말 reset을 하게 되면, 그들은 Google Play 가 원래 사용하던 app 을 재설치할때 원래 사용되던 데이터들도 함께 restore 되기를 바란다. 하지만 기본적으로는 이 현상은 일어나지 않는다. - user data 가 megabyte 이하의 작은 용량이라면, 예를 들어 preferences나 note, game high score 과 같은, Backup API 를 통해 backup 과 restore 를 지원할 수 있다. Register for the Android Backup Service - Android Backup.. 2012. 11. 14.
[android] animation gif 출력하기. animation gif 출력하기. - 구글 가이드에 따르면 animation gif 는 추천하지 않는 방식. - 굳이 animation gif 를 돌려야 한다면, Movie 클래스를 사용해야 한다. Movie movie = Movie.decodeStream( is ); movie.setTime( position ); movie.draw( canvas, width, height ); invalidate() 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 11. 14.
[android] Custom Attribute 를 style 정의하는 방법 출처 : Stack Overflow custom attribute 를 style 정의하는 방법 - style 정의는 보통 다음과 같이 하죠. - custom attribute 에 대한 style 정의도 같은 방식으로 하면 될 것 같습니다. 하지만!!!! 이렇게 하면 에러가 납니다. 그럼 솔루션은..? item name 에서 name space 를 없애줍니다. 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 11. 14.
XMPP ( eXtensible Messaging and Presence Protocol ) - ibm developerworks - developers.google.com - Smack API - What is XMPP XMPP ( eXtensible Messaging and Presence Protocol ) - XMPP 는 eXtensible Messaging and Presence Protocol 의 약자- XMPP 는 XML 기반 인터넷 통신을 위한 오픈 프로토콜로, IM 프로토콜로 잘 알려져 있지만, 일반적인 메세징( push notification )서비스로도 사용될 수 있다.- 초기 open IM protocol 중에는 Jeremie Miller 에 의해 개발된 비표준 IM protocol Jabber 가 있다.- XMPP는 Jabber 를 토대로 하여 표준화 한 프로토콜이다. X.. 2012. 11. 13.
[android] MQTT 이용하여 Push Notification 받기 출처 : "dale lane"님 블로그 [android] 안드로이드 Push notification 방법 MQTT 란? ( MQ Telemetry Transport ) Sample source code 는 위의 출처 페이지에서 구할 수 있습니다. Android 에서 MQTT 이용하여 Push Notification 받기 Overview - MQTT 를 이용해서 android 에서 어떻게 push notification 을 받는지 알아보자. Services vs Activities - Service 를 이용하라. Make it sticky - service 를 시작할 때 START_STICKY 를 return 하면, LMK 등의 상황에서 service 가 kill 되더라도, resource 가 다시 ava.. 2012. 11. 13.
[android] 안드로이드 Push notification 방법 출처 : "고 투 더 멘토" 님 블로그 참고자료 : [android] MQTT 이용하여 Push Notification 받기 안드로이드 push notification 방법 1. 폴링 ( polling ) - 단말에서 주기적으로 서버에 접속하여 가져갈 메세지가 있는지 확인하여 push event 를 수신할 수 있다. - 장점 : 구현이 쉽고 비용도 들지 않는다. - 단점 : 실시간이 아니다. 단말에서 배터리 소모가 발생한다. - 모두가 polling 은 비추한다. 2. SMS - 안드로이드는 SMS hooking 이 가능하다. 서버에서 특별한 SMS 를 전송하면 앱에서 hooking 하여 메세지를 띄울 수 있다. - 장점 : 구현이 쉽다. 실시간이다. 알려진 솔루션이 있다. - 단점 : 비용이 발생한다... 2012. 11. 13.
[android] EditText inputType="textPassword" coding 으로 만들기 EditText inputType="textPassword" coding 으로 만들기 EditText editText = new EditText( getContext() ); editText.setInputType( InputType.TYPE_CLASS_TEXT | InputType. TYPE_TEXT_VARIATION_PASSWORD ); editText.setSingleLine(); editText.setTransformationMethod( PasswordTransformationMethod.getInstance() ); - 이렇게 PasswordTransformationMethod 를 추가로 설정해주어야 제대로 password input type 이 된다. 이것에 대한 자세한 정보는 TextVie.. 2012. 11. 12.
[android] custom attribute format ( type ) 출처 : stack overflow 참조링크 : [Android/안드로이드] Custom Attribute 정의해서 사용하기. custom attribute format( type ) - custom attribute 정의 할 때 사용되는 format ( type )은 다음이 가능합니다. format 은 | 로 여러개 설정이 가능합니다. ( i.e) reference | string ) * reference ( i.e.) @drawable/icon ) * color * boolean * dimension * float * integer * string * fraction * enum * flag 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 11. 12.
반응형