Re: Voice typing is grayed out

319 views
Skip to first unread message
Message has been deleted

Eric Anderson

unread,
Nov 23, 2016, 2:03:53 PM11/23/16
to google-api-...@googlegroups.com
This mailing list is for the core libraries. For service-specific questions, please ask the question on StackOverflow. In this case, it seems you can use the google-drive-sdk tag.

On Wed, Nov 23, 2016 at 7:42 AM, Gokhan Dilek <perthcity...@gmail.com> wrote:
I can create files on Google Drive and the language is automatically set for me while using drive.google.com
But I am having issues while creating files using Google Drive API via my application.(google-api-services-drive-v2-rev192-1.20.0.jar) 
The default language of the document is not set. 
This is causing issues with the voice typing being grayed out.

Here is how I createFile in my application:


public static File createFile(Car car) {
   
System.out.println("CREATING FILE");
   
try {

       
File body = new File();
        body
.setTitle("Document for " + car.getCar_name()
               
+ ".docx");

        body
.setMimeType(GOOGLE_DOCOCUMENT_MIME_TYPE);
        body
.setEditable(true);



       
Permission ownership = getOwnerShipPermission();
       
Permission unlockedFile = getUnlockedFilePermission();
        java
.io.File fileContent = null;
        fileContent
= CarServiceReportTemplateFactory.createCarServiceReportTemplateFile(car);

       
FileContent mediaContent = new FileContent(MS_WORD_DOCUMENT_MIME_TYPE, fileContent);
       
File file = driveservice.files().insert(body, mediaContent).execute();
       
String fildid = file.getId();
        driveservice
.permissions().insert(fildid, unlockedFile).execute();
        fileContent
.delete();
       
return file;

   
} catch (IOException ex) {
        ex
.printStackTrace();
       
return null;
   
}
}

I did have a look at the drive api file category but I cannot find anything related to setting default language.

I would much appreciate if you know a workaround this problem.

Thank you.

--
You received this message because you are subscribed to the Google Groups "google-api-java-client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-api-java-client+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Eric Anderson

unread,
Nov 28, 2016, 11:47:09 AM11/28/16
to google-api-...@googlegroups.com
On Thu, Nov 24, 2016 at 2:22 AM, Gokhan Dilek <perthcity...@gmail.com> wrote:
I did ask on StackOverflow but noone has got back to me yet.
So I am trying here.

What do you mean by google-drive-sdk tag?

Stack Overflow has tags on questions to categorize the question, which is what people frequently use to filter questions they are able to answer. When you ask a question, there is a field for the "tags" for the question. The google-drive-sdk tag seems appropriate for your question.
Reply all
Reply to author
Forward
0 new messages