LazDeviceAPIs/ko: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: LazDeviceAPIs/ko
| Old | New | Line | |
|---|---|---|---|
| 1 | + | LazDeviceAPIs는 LCL 유니승로 가속도계, GPS 위치, SMS 전송 등등에 대한 다양한 하드웨어 장치와의 인터페이스를 제공한다. 대부분은 스마트폰이나 모바일 플랫폼을 위하여 디자인 되었지만 결국은 데스크톱으로 모두 이식 될 것이다. | |
| 2 | + | ||
| 3 | + | ## 소개 | |
| 4 | + | ||
| 5 | + | LazDeviceAPIs는 LCL에서 하드웨어 기기들에 대한 다른 API들이 비슷하도록 모델 되었다. 역사적으로는 널리쓰이는 두개의 하드웨어 기기를 가지고 있다: 마우스와 스크린이 그것으로 마우스는 가르키는 장치이며(마우스는 또한 터치 메세지를 위해 사용될 수 있다) 스크린은 표시장치이다. LazDeviceAPIs에서는 일반적으로 사용하는 장치는: 가속도계, 위치정보, 메세지 등등이다. | |
| 6 | + | ||
| 7 | + | ## Accelerometer(가속도계) | |
| 8 | + | ||
| 9 | + | 가속도계는 사용하기매우 쉽다. 가속도계 센서의 응답을 시작하려면 단지 Accelerometer.StartReadingAccelerometerData를 호출하면 되며 수신을 중지하려면 Accelerometer.StopReadingAccelerometerData 를 호출하기만 하면 된다. | |
| 10 | + | ||
| 11 | + | ``` pascal | |
| 12 | + | uses lazdeviceapis; | |
| 13 | + | ||
| 14 | + | procedure TForm2.btnStartAccelClick(Sender: TObject); | |
| 15 | + | begin | |
| 16 | + | Accelerometer.OnSensorChanged := @HandleAccelerometerChanged; | |
| 17 | + | Accelerometer.StartReadingAccelerometerData(); | |
| 18 | + | end; | |
| 19 | + | ||
| 20 | + | procedure TForm2.btnStopAccelClick(Sender: TObject); | |
| 21 | + | begin | |
| 22 | + | Accelerometer.StopReadingAccelerometerData(); | |
| 23 | + | end; | |
| 24 | + | ||
| 25 | + | procedure TForm2.HandleAccelerometerChanged(Sender: TObject); | |
| 26 | + | begin | |
| 27 | + | labelSensorData.Caption := Format('X=%f Y=%f Z=%f', [Accelerometer.xaxis, | |
| 28 | + | Accelerometer.yaxis, Accelerometer.zaxis]); | |
| 29 | + | DebugLn(labelSensorData.Caption); | |
| 30 | + | end; | |
| 31 | + | ``` | |
| 32 | + | ||
| 33 | + | ### 안드로이드 허가 | |
| 34 | + | ||
| 35 | + | 이 장치는 안드로이드에서는 허가가 특별히 필요없다. | |
| 36 | + | ||
| 37 | + | ## PositionInfo(위치정보) | |
| 38 | + | ||
| 39 | + | ### 안드로이드 허가 | |
| 40 | + | ||
| 41 | + | 안드로이드에서의 위치정보의 이용은 응용프로그램의 AndroidManifest.xml 파일에 다음과 같은 허가를 주어야 된며 다음과 같이 사용한다: | |
| 42 | + | ||
| 43 | + | `<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />`\ | |
| 44 | + | `<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />` | |
| 45 | + | ||
| 46 | + | ## 메세징(Messaging) | |
| 47 | + | ||
| 48 | + | ### 안드로이드 허가 | |
| 49 | + | ||
| 50 | + | 안드로이드에서의 메세징의 이용은 응용프로그램의 AndroidManifest.xml 파일에 다음과 같은 허가를 주어야 된며 다음과 같이 사용한다: | |
| 51 | + | ||
| 52 | + | `<uses-permission android:name="android.permission.SEND_SMS" />` | |
| 53 | + | ||
| 54 | + | ## 로드맵 | |
| 55 | + | ||
| 56 | + | LazDeviceAPIs 는 현재 LCL-CustomDrawn-Android에 대해서만 구현중이다 | |
| 57 | + | ||
| 58 | + | ## 더 볼 것 | |
| 59 | + | ||
| 60 | + | - [[Custom Drawn Interface/Android]] | |
| 61 | + | ||
| 62 | + | --- | |
| 63 | + | *From the Free Pascal wiki, page "LazDeviceAPIs/ko", as it stood on 2020-02-18 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
