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

Fixed instant upload for photos #110

Closed
wants to merge 1 commit into from
Closed

Fixed instant upload for photos #110

wants to merge 1 commit into from

Conversation

LukeOwlclaw
Copy link

Listened for wrong broadcast action. should be:
http://developer.android.com/reference/android/hardware/Camera.html#ACTION_NEW_PICTURE

Requires SDK 14

@davivel
Copy link
Contributor

davivel commented Mar 15, 2013

That would leave all the users with Android 3.2 or lesser without instant uploads.

@davivel davivel closed this Mar 15, 2013
@LukeOwlclaw
Copy link
Author

But since in FileDisplayActivity.java
android.os.Build.VERSION_CODES.JELLY_BEAN
is used which also requires SDK 14
http://developer.android.com/reference/android/os/Build.VERSION_CODES.html
Android 3.2 is not supported anyways.

Besides, where is com.android.camera.NEW_PICTURE defined? Does not work for me. I'll file a bug report.

@LukeOwlclaw
Copy link
Author

Ok, did not find issue #6 before. It's an "HTC problem". Even though I do not think the NEW_PICTURE action is officially supported and thus ownCloud should not rely on it.

@davivel
Copy link
Contributor

davivel commented Mar 18, 2013

The app is build with API level 14. The constant android.os.Build.VERSION_CODES.JELLY_BEAN is defined for this level, and replaced for its int value by the builder. The way the constant is used in FileDisplayActivity does not break the code, and does not disable any function for version previous to Android 4.x, unless they are not really available.

We test the app in real devices from Android 2.2 onwards. Every Android version from Android 2.2 is supported by the ownCloud app.

The constant com.android.camera.NEW_PICTURE is defined in the 'hidden' code in the Android platform. We know it is discouraged to use this kind of code in apps, but it was the fastest way to add an instant upload feature to a broad range of Android devices.

We are aware of the problem with HTC devices, and we are not happy that it is still pending to solve. We do our best to fix important problems as long as we are able too, but the development team is small and we must keep focused in top priorities.

The solution provided here is not adequate. There is more than a 50% of active Android devices with versions under 4.x, so breaking the instant uploads in all the non-HTC devices in that 50% to add the feature in HTC-4.x devices is a loss, not a gain.

If you can contribute with a better solution, we will be extremely happy to accept it.

Thanks for your effort.

@MortenCB
Copy link

We are considering starting to use Owncloud for our users and we use mainly HTC and iPhone. Over half our users use HTC phones. It's a big bummer that auto upload doesn't work, I hope you make this a priority or maybe make a separate install-file available for HTC users with Android 4.x?

@Webdroid
Copy link

You can solve this problem with a workaround. For example a observer:
http://stackoverflow.com/questions/4571461/broadcast-receiver-wont-receive-camera-event

@davivel
Copy link
Contributor

davivel commented May 10, 2013

Comments about HTC instant uploads should go to #6 . This issue is closed.

@WilliamFromTW
Copy link

owncloud app can only detect picture taken from android built-in camera.
so I disable new picture receiver and
use com.owncloud.android.utils.RecursiveFileObserver
to watch new media file created in directory "DCIM" and all sub-directory and upload to owncloud server.
source code and readme.txt can download from
http://mail.pumpkin-village.tk/owncloud/public.php?service=files&t=df53555ce62fbb2e6f8385a700e1f355

ps. not only picture. mp4 and 3gp can also be detected and upload to server.
owncloud server 5.0.9
android app version 1.4.4
cell phone: nexus s , galaxy nexus , nexus 4
android version: 4.1 , 4.2 ,4.3

@davivel
Copy link
Contributor

davivel commented Aug 12, 2013

This issue is closed. Contributions on this topic are welcome in #6, or in any of the other related open issues, most of them tagged with the 'uploads' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants