본문 바로가기
[android] how can I detect if notification clear button is clicked? android, how can I detect if notification clear button is clicked? [En] Very easy.When you make Notification instance, just add delete intent with setDeleteIntent() method. private Notification getNotification( Context context, Intent intent, String pushMessage ){int notiCount = Application.getNotiMessageCount();NotificationCompat.Builder builder = new NotificationCompat.Builder(context).setSmal.. 2013. 10. 16.
[android] at GingerBread device GCM register returns SERVICE_NOT_AVAILABLE android, @ GingerBread device, GCM register returns SERVICE_NOT_AVAILABLE [En] java.io.IOException: SERVICE_NOT_AVAILABLEat com.google.android.gms.gcm.GoogleCloudMessaging.register(Unknown Source) Even though GCM register function returns SERVICE_NOT_AVAILABLE, registration process is actually done well. You can check the registration id, a.k.a. device token, via Broadcast Receiver with followin.. 2013. 10. 15.
[android] HttpClient vs. HttpURLConnection 안드로이드, HttpClient vs. HttpURLConnection HttpClient HttpClient 는 아파치 라이브러리를 사용. DefaultHttpClient 와 AndroidHttpClient 가 제공된다. 방대한 API 가 지원하고, 버그가 별로 없이 안정적으로 동작한다. 하지만, 너무 방대한 API 를 제공하여 안드로이드 개발팀은 이 클래스들을 더 이상 지원하지 않는다. HttpURLConnection HttpURLConnection 은 가벼운 version 의 HttpClient 라 볼 수 있겠다. 핵심적인 API 들만을 가지고 있다. 그러나 프로요 이전 버전의 경우 HttpURLConnection 클래스에 이상한 버그들이 있었다. InputStream 을 열어둔 상태에서 close.. 2013. 10. 11.
[android] how can I know if there is any application which can handle an intent. android, how can I know if there is any application which can handle an intent? public static boolean hasAvailableIntentHandlingApp( Context context, Intent intent ){List list = context.getPackageManager().queryIntentActivities( intent, PackageManager.MATCH_DEFAULT_ONLY );return list.size() != 0;} Android, hasAvailableIntentHandlingApp, match_default_only, PackageManager, queryintentactivity, re.. 2013. 10. 10.
[android] Volley URL related issue( bug ) at GingerBread. - java.io.IOException: Malformed ipv6 address: android, Volley URL related issue(bug) at GingerBread. - java.io.IOException: Malformed ipv6 address: [En] If you use Volley network library with GingerBread and the below version devices, you might encounter URLMalformedException with this kind of message. java.io.IOException: Malformed ipv6 address: It it known issue about the URL class. The problem happens when the host part contains port num.. 2013. 10. 5.
[java] 한글 판별 코드 자바, 한글 판별 코드 요즘 모바일 웹에서 이름을 한글로만 입력해야 한다거나, 아이디를 영문과 숫자로만 입력해야 한다거나 하는 등의 제약사항이 있는 경우가 많이 있다. 영문과 숫자로만 구성되었는지는 Patterns 를 이용해 쉽게 매치가 가능하지만, 한글은 판별하기가 조금 힘들었다. 그 이유인즉 TextWatcher 를 이용하여 아예 한글이 아니면 입력이 안되도록 하려고 하는데, 'ㄱ', 'ㅏ' 와 같이 자음이나 모음만 존재하는 경우의 경우도 판별해야 하기에 Patterns 로 매칭하기가 쉽지 않았다. 그래서 찾아낸 것이 바로 이 코드. Character.UnicodeBlock 을 사용한다. Character.UnicodeBlock unicodeBlock = Character.UnicodeBlock.of.. 2013. 10. 5.
[android] process 이야기 안드로이드, process 이야기. System 이 process 를 죽였을 경우, 2.2 ( Froyo ) 이전 버전에서는 무조건 새로 시작하였고, 그 이후로는 onCreate + Bundle 로 다시 state 를 복구해준다. Activity 들은 모두 destroy 되고 다시 재생성되는 그런 패턴이다. 메모리가 부족하거나 사용안한지 30분이 지나거나 하는 조건 하에 destroy 된다. 2.2, 30분, activity, Android, Bundle, Destroy, froyo, onCreate, process, process kill, state, state 복구, System, 메모리 부족, 안드로이드, 재생성, 프로세스 2013. 10. 3.
How to generate class diagram using eclipse. How to generate class diagram using eclipse. [En] Using eclipse add-on named ObjectAid UML Explorer, you can draw the class diagram very easily. [Help] - [Install New Software] - [Add] Name : ObjectAid UML ExplorerLocation : http://www.objectaid.net/update Proceed installation. After finishing installation, you can find [ObjectAid UML Diagram] - [Class Diagram] when you click "New" button. Make .. 2013. 10. 1.
[android] TransitionDrawable 을 잘 쓰면 훌륭한 애니메이션이 될 수 있다. TransitionDrawable 을 잘 쓰면 훌륭한 애니메이션이 될 수 있다. TransitionDrawable 의 존재는 익히 알고 있었으나, 드디어 테스트를 해 보았다. TransitionDrawable 은 2개의 이미지를 setting 해놓고 transition 을 시키면, fade in, fade out 효과처럼 이미지가 교체된다. 더 놀라운 것은 매우 부드럽게 된다는 것이며, 2개 이상의 이미지도 충분히 소화할 수 있고, 수치만 바꿈으로서 바뀌는 속도를 쉽게 조절할 수 있다. 자 이 위대한 녀석이 얼마나 간단하게 구현되는지예제 코드 ( example code ) 를 통해서 알아보자. ImageView imageView = new ImageView( this );TransitionDrawable.. 2013. 10. 1.
반응형