JAVA/android_studio 2023. 10. 15. 14:06

-

https://velog.io/@krrong/Android-ListView-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0

 

[Android] ListView 사용하기

ListView 사용하기

velog.io

 

https://kadosholy.tistory.com/53

 

[안드로이드] RecyclerView 사용법 (리사이클러뷰)

RecyclerView 사용법 (리사이클러뷰) RecyclerView는 대량의 데이터를 효율적으로 화면에 나타내기 위해서, 각 아이템을 목록형태로 화면에 나타내는데 사용됩니다. ListView와 유사하나 아래와 같은 성

kadosholy.tistory.com

 

posted by cskimair
:
JAVA/android_studio 2023. 10. 15. 13:53

 

-

https://codetravel.tistory.com/12

 

runOnUiThread 사용하기

앞서 안드로이드 "안드로이드 메인 스레드 포스팅"을 통하여 메인스레드의 특징에 대해서 알아보았습니다. 그 중에서 메인 스레드가 아닌 스레드에서 Button UI를 조작하다가 CalledFromWrongThreadExcept

codetravel.tistory.com

 

- http://www.gisdeveloper.co.kr/?p=2048 

 

[Android] 맨날 까먹는 runOnUiThread 사용예 – GIS Developer

통신을 통해 데이터를 스레드를 통해 딱… 가져오고 난 후 동일한 스레드에서 바로 Spinner 등과 같은 UI에 데이터를 설정하시면 우에엑~~ 하고 구토를 하시는 안드로이드님. UI 단에 데이터를 설정

www.gisdeveloper.co.kr

 

 

posted by cskimair
:
JAVA 2023. 10. 8. 21:37

opensource: simple_bluetooth_le_terminal

 

 

0) 최초 실행시  MainActivity에서  fragment에  DeviceFragment()를 추가해준다.
> MainActivity.java onCreate() 에서 DeviceFragment.java DeviceFragment() 를 호출함

DeviceFragment.java 
+-> OnCreate() =>
...
+-> onOptionsItemSelected()
  +->startScan()
     ..+->new Thread(() -> bluetoothAdapter.startLeScan(null, leScanCallback), "startLeScan")

1) scan 버튼 누르고 BLE device list에서 1개 선택할때
DeviceFragment.java / onListItemClick()
+-> new TerminalFragment() 로 이동함

.simple_bluetooth_le_terminal D/ViewRootImpl@6a45722[MainActivity]: ViewPostIme pointer 0
.simple_bluetooth_le_terminal D/ViewRootImpl@6a45722[MainActivity]: ViewPostIme pointer 1
l D/BluetoothAdapter: startLeScan(): null
l D/BluetoothAdapter: STATE_ON
l I/chatty: uid=10580(de.kai_morich.simple_bluetooth_le_terminal) startLeScan identical 1 line
l D/BluetoothAdapter: STATE_ON
l D/BluetoothLeScanner: Start Scan with callback
 D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=12 mScannerId=0
 I/oth_le_termina: Compiler allocated 4MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
 D/BluetoothAdapter: stopLeScan()
 D/BluetoothAdapter: STATE_ON
 D/BluetoothAdapter: STATE_ON
 D/BluetoothLeScanner: Stop Scan with callback
 D/ViewRootImpl@6a45722[MainActivity]: ViewPostIme pointer 0
 D/ViewRootImpl@6a45722[MainActivity]: ViewPostIme pointer 1
 D/AbsListView: onTouchUp() mTouchMode : 0
 D/SerialSocket: connect D0:B5:C2:95:12:7C
 D/SerialSocket: connectGatt,LE
 D/BluetoothAdapter: STATE_ON
 D/BluetoothGatt: connect() - device: D0:B5:C2:95:12:7C, auto: false
 D/BluetoothAdapter: isSecureModeEnabled
 D/BluetoothGatt: registerApp()
 D/BluetoothGatt: registerApp() - UUID=ec5de07c-7488-4183-b214-eaa25e98e8f2
 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=D0:B5:C2:95:12:7C
 D/SerialSocket: connect status 0, discoverServices
 D/BluetoothGatt: discoverServices() - device: D0:B5:C2:95:12:7C
 D/BluetoothGatt: onConnectionUpdated() - Device=D0:B5:C2:95:12:7C interval=6 latency=0 timeout=500 status=0
 D/BluetoothGatt: onSearchComplete() = Device=D0:B5:C2:95:12:7C Status=0
 D/SerialSocket: servicesDiscovered, status 0
 D/SerialSocket: service cc254x uart
 D/SerialSocket: request max MTU
 D/BluetoothGatt: configureMTU() - device: D0:B5:C2:95:12:7C mtu: 512
 D/BluetoothGatt: onConnectionUpdated() - Device=D0:B5:C2:95:12:7C interval=39 latency=0 timeout=500 status=0
 D/BluetoothGatt: onConfigureMTU() - Device=D0:B5:C2:95:12:7C mtu=23 status=0
 D/SerialSocket: mtu size 23, status=0
 D/SerialSocket: payload size 20
 D/BluetoothGatt: setCharacteristicNotification() - uuid: 0000ffe1-0000-1000-8000-00805f9b34fb enable: true
 D/SerialSocket: enable read notification
 D/SerialSocket: writing read characteristic descriptor
 D/SerialSocket: writing read characteristic descriptor finished, status=0
 D/SerialSocket: connected
 D/SerialSocket: read, len=3,data:AT
 D/SerialSocket: read, len=17,data:0MyConnected,000
 D/BluetoothGatt: onConnectionUpdated() - Device=D0:B5:C2:95:12:7C interval=9 latency=0 timeout=100 status=0
 D/SerialSocket: read, len=17,data:0MyConnected,000
 D/SerialSocket: read, len=11,data:21,1,1,1,0
 D/SerialSocket: read, len=11,data:21,1,1,1,0
 D/SerialSocket: read, len=11,data:21,1,1,1,0


 

*참고:  Activity vs Fragment life cycle

https://developer88.tistory.com/69

 

Activity 와 Fragment 의 lifecycle (생명주기)

안드로이드는 에서 Activity와 Fragment의 lifecycle(생명주기)에 맞추어 개발을 하는 것이 매우 중요한데요. 오늘은 Activity와 Fragment의 생명주기에 관해서 정리해보겠습니다. 1. Activity 생명주기 먼저, Ac

developer88.tistory.com

 





 

 

 

 

 

 

'JAVA' 카테고리의 다른 글

java SimpleDateFormat  (0) 2023.12.22
Web Serial port  (0) 2023.09.13
Java, Digit check from string  (0) 2022.12.06
java 커맨드라인 실행시 한글깨질때 방지법  (0) 2022.10.24
java call by reference  (0) 2020.05.07
posted by cskimair
:
JAVA 2023. 9. 13. 09:13

-update: for connecting usb enabled device with web-browser 

 

https://developer.chrome.com/en/articles/serial/

 

Read from and write to a serial port - Chrome Developers

The Web Serial API bridges the web and the physical world by allowing websites to communicate with serial devices.

developer.chrome.com

The Web Serial API allows websites to communicate with serial devices.

 

'JAVA' 카테고리의 다른 글

java SimpleDateFormat  (0) 2023.12.22
Java/BlueTooth LE device call sequence  (1) 2023.10.08
Java, Digit check from string  (0) 2022.12.06
java 커맨드라인 실행시 한글깨질때 방지법  (0) 2022.10.24
java call by reference  (0) 2020.05.07
posted by cskimair
:
JAVA/eclipse 2023. 2. 15. 18:17

 

 

 

 

-

https://stackoverflow.com/questions/3191693/how-do-i-change-a-java-projects-bin-folder-in-eclipse/3191753#3191753

 

How do I change a Java project's bin folder in Eclipse?

When you have a Java project in Eclipse, how do you change the location where the class files are placed? The bin directory is the default location.

stackoverflow.com

> Right-click on our project --> select properties --> select Java Build Path --> select the Source tab. At the bottom of the tab you should see a field named (Default Output Folder:).

 

How to Add Existing Files to Eclipse Projects

This Tip sounds very basic, but still: I get asked about this about once a week. So it must be something non-obvious in Eclipse then ;-): how to add existing files to an Eclipse project. As with ma…

mcuoneclipse.com

 

How to Add Existing Files to Eclipse Projects

This Tip sounds very basic, but still: I get asked about this about once a week. So it must be something non-obvious in Eclipse then ;-): how to add existing files to an Eclipse project. As with ma…

mcuoneclipse.com

 

How to Add Existing Files to Eclipse Projects

This Tip sounds very basic, but still: I get asked about this about once a week. So it must be something non-obvious in Eclipse then ;-): how to add existing files to an Eclipse project. As with ma…

mcuoneclipse.com

 

How do I change a Java project's bin folder in Eclipse?

When you have a Java project in Eclipse, how do you change the location where the class files are placed? The bin directory is the default location.

stackoverflow.com

 

 

-

https://stackoverflow.com/questions/45440060/want-eclipse-class-files-also-in-other-folder-apart-from-bin

 

Want Eclipse .class files also in other folder apart from bin

I want when Developer save java file in eclipse , And eclipse by default generate it .class file in bin folder,So this .class file is also generate in other folder also. I can not copy /paste that ...

stackoverflow.com

 

 

- eclipse java class file folder change directory

https://www.google.com/search?q=eclipse+java+class+file+folder+change+directory&newwindow=1&client=firefox-b-d&sxsrf=AJOqlzXoXbyAmVk-Do2kRv0E3gubMFh3Zw%3A1675910642320&ei=8l3kY8ScE8r_hwOk9b6gAw&oq=eclipse+java+class+file+folder+change&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAxgCMgUIIRCgATIFCCEQoAEyBQghEKABOgoIABBHENYEELADOgQIIxAnOgUIABCRAjoICAAQgAQQywE6BQgAEIAEOgkIABAWEB4Q8QQ6BggAEBYQHjoFCAAQhgM6CAgAEBYQHhAPOgcIIRCgARAKOggIIRAWEB4QHToLCCEQFhAeEPEEEB06DQghEBYQHhAPEPEEEB06BAghEBVKBAhBGABKBAhGGABQtQhY8ElgqWhoAXABeACAAZQBiAHRGpIBBDAuMjmYAQCgAQHIAQjAAQE&sclient=gws-wiz-serp 

 

🔎 eclipse java class file folder change directory: Google 검색

 

www.google.com

 

posted by cskimair
:
JAVA 2022. 12. 6. 09:16

- Java  , digit check from string

assertThat(StringUtils.isNumeric("123")).isTrue();
assertThat(StringUtils.isNumeric("١٢٣")).isTrue();
assertThat(StringUtils.isNumeric("१२३")).isTrue();
 
assertThat(StringUtils.isNumeric(null)).isFalse();
assertThat(StringUtils.isNumeric("")).isFalse();
assertThat(StringUtils.isNumeric("  ")).isFalse();
assertThat(StringUtils.isNumeric("12 3")).isFalse();
assertThat(StringUtils.isNumeric("ab2c")).isFalse();
assertThat(StringUtils.isNumeric("12.3")).isFalse();
assertThat(StringUtils.isNumeric("-123")).isFalse();

https://www.baeldung.com/java-check-string-number

 

 

 

'JAVA' 카테고리의 다른 글

Java/BlueTooth LE device call sequence  (1) 2023.10.08
Web Serial port  (0) 2023.09.13
java 커맨드라인 실행시 한글깨질때 방지법  (0) 2022.10.24
java call by reference  (0) 2020.05.07
jdk6 version설치하기 (ubuntu 16.04)  (0) 2019.04.01
posted by cskimair
: