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