videokit-ai / natshare

Cross-platform social sharing for Unity Engine.
https://github.com/natmlx/videokit
Apache License 2.0
134 stars 28 forks source link

Cannot save media directly in Camera Roll, it creates an album and puts media into that #120

Closed arif69eee closed 3 years ago

arif69eee commented 3 years ago

Hi Yusuf,

Hope you are doing great! And thanks for your great work "NatCorder - Video Recording API", we purchased it!

On Android I am trying to save images and videos directly into Camera Roll, not under any album. So I wrote code as follows -

var payload = new SavePayload();

I did not set any album here, but it still creates album "Movies" and "Pictures" and puts the medias into those albums. How can I put media directly into Camera Roll, not under any album?

Thank you so much in advance!!

olokobayusuf commented 3 years ago

Hey @arif69eee , what device and OS version are you running on? If you're on Android, then this is the default behaviour from Android:

https://github.com/natsuite/NatShare/blob/3842e1fbb71cb7162a801008d14351168f6e07d4/Android/NatShare/src/main/java/api/natsuite/natshare/SavePayload.java#L66-L75

arif69eee commented 3 years ago

Hi Yusuf,

Thanks for quick response!

I cannot see the issue in my Android but the issue was seen in my client's phone, I don't know which version and model he is using.

But I could just solved it. The issue was, when I was setting no album, the NatShare was saving the medias outside of the DCIM folder of Android. So some android devices were not showing the medias in the gallery directly but under an album "Movies" or "Pictures". Now I just put an album name, so it creates that album under the DCIM folder and the gallery app is showing the media directly in the gallery as well as under the newly created album.

Thanks!

olokobayusuf commented 3 years ago

Hm that sounds good. I'm closing this issue.

arif69eee commented 3 years ago

Yes please. Thanks!