12.07.2015 Views

PDF - Source : www.pcsoft-windev-webdev.com

PDF - Source : www.pcsoft-windev-webdev.com

PDF - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

QuestionHow do I establish the dialog with an FTP server?The Android system allows you to connect to a FTP server to send or retrieve fi les. To do so, youmust use the following functions:• FTPConnect to connect to the FTP server• FTPDisconnect to disconnect• FTPSend to send a fi le from the device to the FTP server• FTPGet to get a fi le from the server to the device.Example for sending fi les onto an FTP server:Caution: Using the FTP functions modifi es the permissions required by the application (Permissionrequired: INTERNET). This permission allows the applications to open the network sockets.QuestionHow do I use the GPS of the device and the geo-localizationfunctions?The Android system includes functions for managing the GPS and for geo-localization. Accordingto the device, the GPS functions will use the GPS chip of the device or a triangulation system byusing the wireless networks.To do so, you must use the following functions:• GPSInitParameter to initialize the GPS (choice of localization system...)• GPSGetPosition to retrieve the current position• geoDistance to retrieve the distance between 2 positions• geoRunApp to start the native mapping application of the device• geoGetAddress to retrieve an address or a list of addresses in relation to a location• etc.Example for using the GPS functions:Caution: Using the GPS functions modifi es the permissions required by the application (Permissionrequired: ACCESS_FINE_LOCATION).QuestionHow do I send an SMS from my Android application?The Android system allows you to send or read SMSs on a phone. To do so, you must use thefollowing functions:• initialize the information of the SMS structure• SMSSend to send an SMS• SMSNbMessage to fi nd out the number of SMSs• etc.Example for sending an SMS:Caution: Using the SMS functions modifi es the permissions required by the application (Permissionrequired: SEND_SMS).78 Part 2: Android applicationPart 2: Android application 79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!