On the app console, I have set the MIME type and the extension for txt and pdf files. But if I want to support the Google Docs format files, what should I do?
And If I can already open the Google Docs format files, how to convert the files to pdf format when I download them through GOOGLE Drive API?
You cannot currently open the Google Docs native formats (Docs, Spreadsheets, Presentations, etc) using the Google Drive SDK. This is something we (Google) are looking at fixing.
You are currently limited to exporting them as another format, for example pdf, but this can only be achieved using the Documents List API.