locked
How can I handle the progress bar with copying via android MTP on PC? RRS feed

  • Question

  • (I want to ask about Media Transfer Protocol but cannot find suitable forum.)

    I'm trying to make my own MTP_OPERATION_MOVE_OBJECT(0x1019) and MTP_OPERATION_COPY_OBJECT(0x101A) operations for android since the native android MTP doesn't support these operations. Without these operation MTP does copy operation by copying source to PC, and copy it back to the target.

    First I could make COPY operation with java FILE I/O on MtpDatabase.java and it returns MtpConstants.RESPONSE_OK. Copying looks work fine but there is one problem - The progress bar on PC doesn't show how long copying progress goes on. When I copy a file to another place, copying dialog is popped up on PC without updating progress bar then it goes 100% suddenly when I return RESPONSE_OK.

    So how can I handle the progress bar of copying via android MTP on PC?
    Is there any native source I can refer?

    If it's not possible, is there any specific response code that MTP works with its own default operation in MTP_OPERATION_MOVE_OBJECT and MTP_OPERATION_COPY_OBJECT ?


    Monday, June 22, 2015 4:22 AM