Android [Unable to add window, token null is not valid. is your activity running?]

Posted Leave a commentPosted in 안드로이드

AlertDialog 를 생성할 때 getApplicationContext()를 사용하면 에러가 납니다. 이때는[Activity이름].this 로 변경하면 해결됩니다. 다음은 예시입니다. AlertDialog.Builder b = new AlertDialog.Builder(ConfigDeviceTypeChoiceActivity.this); b.setTitle(“등록 성공”); b.setMessage(“성공적으로 등록하였습니다.”); final AlertDialog alert = b.create(); alert.show();

안드로이드 Thread(스레드) JOIN 사용법

Posted Leave a commentPosted in 안드로이드

쓰레드의 Join() 을 이용하면 쓰레드 가 끝날때까지 쓰레드를  호출한 메소드는 대기 하게 됩니다. Join을 이용해 쓰레드를 순차적으로 구동시킬 수 있습니다. Thread t1 = new Thread(new EventThread(“e1”)); t1.start(); Thread t2 = new Thread(new EventThread(“e2”)); t2.start(); while (true) { try { t1.join(); t2.join(); break; } catch (InterruptedException e) { e.printStackTrace(); } } 그런데, 쓰레드 내에서 콜백 함수의 […]

안드로이드 스튜디오 Missing Constraints in ConstraintLayout 에러 해결 방법

Posted Leave a commentPosted in 안드로이드

Missing Constranints in ConstraintLayout This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not […]

C# 을 이용해 Nextcloud 조작

Posted Leave a commentPosted in 교육개발, 애플리케이션개발

c#을 이용해서 Nextcloud을 컨트롤 하는 방법에 대해서 검토 중입니다. 일단 RestSharp라는 Oauth2 기능을 갖고 있는 서비스와 WebDavClient라는 nextcloud에서 기본적인 기능(파일 업로드,다운로드, 폴더 생성 등 유저관련 권한을 뺀 나머지 기능이라고 되어있음)을 사용할 수 있는 서비스를 탑재해서 제가 만들어 놓은 개인용 클라우드인 nextcloud에 접근해 보는 순차적 방법을 기술할 것입니다. 우선 RestSharp를 Nuget을 이용해서 가져와 보도록 하겠습니다…잘 안가져와집니다…이걸하려고 […]