'JAVA/android_studio'에 해당되는 글 47건

  1. 2024.10.24 :: Thread.sleep not crash app 1
  2. 2024.10.23 :: 자바 코드 실행시간 구하기 2
  3. 2024.10.23 :: Timeout Dialog 1
  4. 2024.10.04 :: GPS - UBLOX NEO-6M PPS pulse length and frequency setting
  5. 2024.09.17 :: 안전하지 않은 앱 차단됨
  6. 2024.09.17 :: TedPermission
JAVA/android_studio 2024. 10. 24. 13:50

- Java Thread.sleep

https://stackoverflow.com/questions/43060701/thread-sleep-not-crashes-my-app

 

Thread.sleep not crashes my app

By calling Thread.sleep on the UI thread i expect my android app to crash, but it does not. I tried to explicitly run this on UI thread, by using runOnUiThread but the result was the same, the app

stackoverflow.com

 

posted by cskimair
:
JAVA/android_studio 2024. 10. 23. 12:01

 

-

long startTime = System.currentTimeMillis();

// 실행 시간을 측정하고자 하는 코드

long endTime = System.currentTimeMillis();
long elapsedTime = endTime - startTime;
System.out.println("Elapsed time: " + elapsedTime + "ms");
출처: https://alisyabob.tistory.com/396 [it 공부 끄적이기:티스토리]

 

https://alisyabob.tistory.com/396

 

[Java] 자바 코드 실행 시간 구하는 방법

[Java] 자바 코드 실행 시간 구하는 방법 알아보기 1. System.currentTimeMillis()와 System.nanoTime() 메서드를 사용하는 방법 System.currentTimeMillis() 메서드는 현재 시간을 밀리초 단위로 반환 long startTime = System

alisyabob.tistory.com

 

Instant start = Instant.now();

// 실행 시간을 측정하고자 하는 코드

Instant end = Instant.now();
long elapsedTime = Duration.between(start, end).toMillis();
System.out.println("Elapsed time: " + elapsedTime + "ms");
출처: https://alisyabob.tistory.com/396 [it 공부 끄적이기:티스토리]
posted by cskimair
:
JAVA/android_studio 2024. 10. 23. 10:42

-

public class MainActivity extends Activity {

    static final int TIME_OUT = 5000;

    static final int MSG_DISMISS_DIALOG = 0;

    private AlertDialog mAlertDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        createDialog();
    }

    private Handler mHandler = new Handler() {
        public void handleMessage(android.os.Message msg) {
            switch (msg.what) {
            case MSG_DISMISS_DIALOG:
                if (mAlertDialog != null && mAlertDialog.isShowing()) {
                    mAlertDialog.dismiss();
                }
                break;

            default:
                break;
            }
        }
    };

    private void createDialog() {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setPositiveButton("OK", null)
            .setNegativeButton("cacel", null);
        mAlertDialog = builder.create();
        mAlertDialog.show();
        // dismiss dialog in TIME_OUT ms
        mHandler.sendEmptyMessageDelayed(MSG_DISMISS_DIALOG, TIME_OUT);
    }
}

https://stackoverflow.com/questions/17628784/how-to-timeout-an-alertdialog-in-android

 

How to timeout an AlertDialog in Android?

How can i handle timeout in an alertdialog. It has the standard yes/no button but i want to call the no button code if the user doesn't press anything in 5 minutes. I've looked at the class in Andr...

stackoverflow.com

 

'JAVA > android_studio' 카테고리의 다른 글

Thread.sleep not crash app  (1) 2024.10.24
자바 코드 실행시간 구하기  (2) 2024.10.23
GPS - UBLOX NEO-6M PPS pulse length and frequency setting  (0) 2024.10.04
안전하지 않은 앱 차단됨  (0) 2024.09.17
TedPermission  (0) 2024.09.17
posted by cskimair
:
JAVA/android_studio 2024. 10. 4. 14:34

 

- setting : 
https://www.waveshare.com/wiki/UART_GPS_NEO-6M

GPS - UBLOX NEO-6M  설정 프로그램 
- ucenter s/w 
https://www.u-blox.com/en/product/u-center

- PPS setting : 25page 
https://www.waveshare.com/w/upload/a/a9/U-blox-6-Receiver-Description-Including-Protocol-Specification.pdf

> change guide: 

posted by cskimair
:
JAVA/android_studio 2024. 9. 17. 20:46

 

https://documentation.swing2app.co.kr/appguide/appoperation/not-installed2

 

유료버전앱(APK파일) 설치가 안된다면 확인해주세요! | 스윙투앱 도움말

APK파일을 다운 받을시 알 수 없는 오류로 앱 설치가 안되는 경우 확인해주세요 – 유료 버전

documentation.swing2app.co.kr

 

posted by cskimair
:
JAVA/android_studio 2024. 9. 17. 20:27

 

> 아래에서 수정방법

Link

2022. 08. 10. 18:58

테드 퍼미션은 박상권님 github 방문해서 약간 변경된 것을 반영하면 됩니다.

https://github.com/ParkSangGwon/TedPermission 에 있습니다.

2.3.0 버전부터 변경된 거 같습니다. 현재버전은 3.3.0 입니다.

implementation 'io.github.ParkSangGwon:tedpermission-normal:3.3.0'

ArrayList 대신에 List 로 변경하고요.
onPermissionDenied(List<String> deniedPermissions)


TedPermission.with(mContext) 부분은
TedPermission.create() 로 변경해주시면 됩니다.

 

-

https://www.inflearn.com/community/questions/523819/build-gradle%EC%97%90%EC%84%9C-implementation-x27-gun0912-ted-tedpermission-2-2-3-x27-sync%EA%B0%80?srsltid=AfmBOorZXeZDuei2sct3lJSRsnXOgbWuxoC_o5E-a0yZpDalZiRTBGG1

 

build.gradle에서 implementation 'gun09... - 인프런 | 커뮤니티 질문&답변

누구나 함께하는 인프런 커뮤니티. 모르면 묻고, 해답을 찾아보세요.

www.inflearn.com

 

 

posted by cskimair
: