Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to set default file transfer path #659

Closed
shmaltz opened this issue Jul 21, 2019 · 7 comments

Comments

@shmaltz
Copy link

commented Jul 21, 2019

Is there an option to set a default file transfer path for files transferred to the device?

I am trying to send over pictures, but when I try to use them in messaging apps, they don't show up. I have to manually go to the phones root and open and share it from there.

Any idea how to fix this?

Thanks!

rom1v added a commit that referenced this issue Jul 30, 2019
Add option to change the push target
A drag & drop always pushed the file to /sdcard/.

Add an option to customize the target directory.

Fixes <#659>
@rom1v

This comment has been minimized.

Copy link
Collaborator

commented Jul 30, 2019

Implemented by a90ccbd on dev branch (will be in v1.10).

scrcpy --push-target=/sdcard/some/directory/

@rom1v rom1v closed this Jul 30, 2019

@shmaltz

This comment has been minimized.

Copy link
Author

commented Jul 31, 2019

Thank you!

I noticed that when pushing images to the device, that messaging apps, etc, don't recognize the image right away, seemingly because the media gallery hasn't been updated. Is there a way to automatically refresh the phones media gallery so the photo is usable in these apps right away?

@rom1v

This comment has been minimized.

Copy link
Collaborator

commented Jul 31, 2019

A long time ago, it was possible with:

adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard

I think it does not work anymore (not tested).

@shmaltz

This comment has been minimized.

Copy link
Author

commented Jul 31, 2019

Thank you!

@rom1v

This comment has been minimized.

Copy link
Collaborator

commented Aug 2, 2019

Maybe:

adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file://

https://github.com/aosp-mirror/platform_frameworks_base/blob/839c6cffaa936627a6fb1939cb283c6dabfd5346/cmds/screencap/screencap.cpp#L103

@shmaltz

This comment has been minimized.

Copy link
Author

commented Aug 2, 2019

Will this code cause it to constantly scan automatically, or will I have to run this command every time I upload a file?

@rom1v

This comment has been minimized.

Copy link
Collaborator

commented Aug 2, 2019

I guess every time. I did not test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.