본문 바로가기

Android23

향상된 for for (Activity activity : runningActivities) {Log.e("bear", "활성 액티비티 : " + activity.getClass().getSimpleName());} int[] arrCount=[1,2,3,4,5,6,7,8,9,10];for(int count : arrCount){syso("count :" + count);} 2016. 2. 1.
안드로이드 케이블없이 디버깅. Debugging considerations When debugging applications that use USB accessory or host features, you most likely will have USB hardware connected to your Android-powered device. This will prevent you from having an adb connection to the Android-powered device via USB. You can still access adb over a network connection. To enable adb over a network connection: Connect the Android-powered device via .. 2015. 8. 19.
백버튼 클릭 종료 핸들러 정보감사합니다. http://javacan.tistory.com/235http://javacan.tistory.com/entry/close-androidapp-by-successive-back-press 안드로이드에서 2회 연속 백버튼을 눌러서 앱을 종료시키는 경우가 흔한데, 이 기능은 많이 사용되므로 다음과 같이 별도 클래스로 기능을 분리하면 향후 기능 재사용이 편리하다. public class BackPressCloseHandler { private long backKeyPressedTime = 0;private Toast toast; private Activity activity; public BackPressCloseHandler(Activity context) {this.activity = co.. 2015. 8. 4.
안드로이드 로그캣 스테틱 로그유틸 /** * Created by bearkinf on 2017. 4. 18.. */ public class LogUtil { /** * 시스템 정보 가져와 로그에 출력. 클래스,메서드,라인넘버 */ public static final String BuildLogMSG(Object msg) { StackTraceElement ste = Thread.currentThread().getStackTrace()[4]; StringBuilder sb = new StringBuilder(); //이클립스에서 사용되는 바로가기 sb.append("at [(" + ste.getFileName() + ":" + ste.getMethodName() + ":" + ste.getLineNumber() + ")] "); //안드로.. 2015. 3. 18.