2015年7月30日 星期四

working

//    public static final String EXISTING_FOLDER_ID = "0B2EEtIjPUdX6MERsWlYxN3J6RU0";
//    public static final String EXISTING_FOLDER_ID = "0B9OFuGhAGrF6N010MG03NW1Gb1E";
    public static final String EXISTING_FOLDER_ID = "0B9OFuGhAGrF6fjBpNk1NS3BKVno5aExXQkhYcmRXVmlvc245SFJhZ3pQQzljMjBNaGQ0VUU";

    /**
     * DriveId of an existing file to be used in file operation samples..
     */
//    public static final String EXISTING_FILE_ID = "0ByfSjdPVs9MZTHBmMVdSeWxaNTg";
    public static final String EXISTING_FILE_ID = "0B9OFuGhAGrF6Y3RnbnVrTXNieEU";

    /**
     * Extra for account name.
     */
//    protected static final String EXTRA_ACCOUNT_NAME = "account_name";
    protected static final String EXTRA_ACCOUNT_NAME = "pxismylove@gmail.com";
========================================================================
            //ken add --begin
            Query query = new Query.Builder()
                    .addFilter(Filters.eq(SearchableField.MIME_TYPE, "video/mp4"))
                    .build();
            //ken add --end

            DriveFolder folder = Drive.DriveApi.getFolder(getGoogleApiClient(), result.getDriveId());
            folder.queryChildren(getGoogleApiClient(), query)
//            folder.listChildren(getGoogleApiClient())
                    .setResultCallback(metadataResult);
           
=============================================================================

//                        Filters.eq(SearchableField.MIME_TYPE, "text/html")
                        Filters.eq(SearchableField.MIME_TYPE, "video/mp4")
//                        ,Filters.eq(SearchableField.TITLE, "bjj")
//                        ,Filters.eq(SearchableField.MIME_TYPE, "text/plain")

沒有留言:

張貼留言