question about android and arduino mega adk

hi all, i'm french my english is not perfect.

I have a question. I'm asking about android and the arduino mega adk. I'm french and i don't understand how work this library. Can you use the arduino on android like with a computer, with a computer we can open a serial port and send/receive message from this serial port.

Can you make the same work with a apps on android tablette/smartphone, open a serialport on the adk shiel and communicate withe the arduino like a computer ? I don't understand in the documentation how it's work.

Someone can post here a sample code to open and use the library to communicate with cellphone ? (on arduino). (how to send or receive texte between cellephone and arduino). arduino and cellephone must be independent and communicate with a simple protocole ( i do himself this protocol ).

I would like to create a apps on android to manage some miniature train. the arduino manage self and rail voltage, and the tablette is the HID with the plan of train and can move train, and switch voltage.

Thank's all. .


Here is a link I found in a google search