Commit Graph

382 Commits

Author SHA1 Message Date
Tilman Dilo e3ac2acb7a clients/android: update gomobile to fix docker build
Due to a change in the Android NDK (starting from r16), building the
docker container fails with an error during the installation of
gomobile:
    fatal error: 'stdlib.h' file not found

This issue was addressed in more recent versions of gomobile, which
are compatible with the new NDK.
See https://github.com/golang/go/issues/21802

This CL simply updates gomobile to the most recent commit.

Change-Id: I87c468c34de441bc6acd40b717d1d950014e5a99
2017-11-20 00:11:13 +01:00
Mathieu Lonjaret 4b81ecc384 Merge "clients/android: for building, make caching volume dirs on the host" 2017-11-17 16:27:01 +00:00
mpl 281d2a16b6 clients/android: for building, make caching volume dirs on the host
The ~/.gradle and ~/.android dirs are mounted as volumes for the docker
container when building the app, because we want the gradle and android
deps to be cached on the host after they've been downloaded.

The build process was assuming that these dirs always already existed,
and this assumption makes the building process fail if they actually
don't.

Therefore this change creates the directories on the host if they don't
already exist.

Change-Id: I90b5f73db0ffcbe76adc12157e142091808bde2b
2017-11-14 19:24:56 +01:00
mpl 0837889762 client/android: fix container detection for docker in systemd cgroup
It seems that on other (more modern?) configurations, the cgroup for
processes in docker is /system.slice/docker.service instead of /docker.

I have not been able to reproduce such a configuration. But until we have
a better way to detect whether a process is in docker, it's probably ok
to just add the new path to validate the detection, which this change
does.

Fixes #973

Change-Id: I9d52bcd79a906fdc1f8310b2c8063930cf9807fb
2017-11-14 17:44:36 +01:00
Paul Lindner fa46c3935d Correct various misspelled words
Change-Id: I236e880526e4c2b0bd318da041983d557e0aa885
2017-09-11 08:33:31 -07:00
Mathieu Lonjaret 36e65ff0e0 Merge "clients/android: add multiple profiles feature" 2017-06-29 20:20:05 +00:00
mpl 8a992c4652 clients/android: add multiple profiles feature
When one has/uses several Camlistore servers, it is tedious to change
all the configuration fields (host name, user, pass, certificate)
whenever one wants to upload to a different server from the one that is
currently configured.

Therefore, this change adds a new entry to the main menu that allows to
create new profiles, and to switch between profiles. Each profile has
its own configuration file, which enables to switch between servers
effortlessly once they're all configured.

https://storage.googleapis.com/camlistore-screenshots/Screenshot_20170606-151931.png
https://storage.googleapis.com/camlistore-screenshots/Screenshot_20170606-152007.png
https://storage.googleapis.com/camlistore-screenshots/Screenshot_20170606-152026.png
https://storage.googleapis.com/camlistore-screenshots/Screenshot_20170606-152041.png

Mininum SDK API increased to 11 because of SharedPreferences's
getStringSet.

Change-Id: I52e2de9e67e84188b1a4b16e046a0d47a35efc62
2017-06-29 17:01:44 +02:00
Tilman Dilo 374e24ac03 clients/android: update build tools and gradle versions
Android Studio requires newer versions of the Android SDK Build-Tools
and Gradle to build the uploader application.

In this commit, Gradle is updated to version 3.3 (as suggested by
Android Studio) and the Android SDK Build-Tools to the most recent
release.

Change-Id: Ief04ec56a6fffb0b46bd28820134c8e7a1ebbede
2017-06-26 22:54:40 +02:00
Tilman Dilo 1c14d2d219 clients/android: improve robustness of camput deployment
When reinstalling the app, using shell commands to set executable
permissions on the camput binary sometimes fails for unknown reasons.
The camput binary keeps 0660 permissions even though no error is
reported. The frequency of failed deployments seems to increase when
more recent build tools are used in the build process. On a Nexus 5X,
observed failure rates are in the order of one in twenty up to one in
six.

This commit removes all use of shell commands for deploying camput and
utilizes native java methods instead. While the resulting permissions of
camput change from 0700 to 0760, this is acceptable as the group is
app-specific and not shared.

A call to fsync is added to ensure that all file data (not just
metadata) is committed to disk before the file is renamed. This should
be safer in the event of a power loss as we're most likely writing to an
ext4 file system (the noauto_da_alloc mount option is used on modern
devices, see [1]).

With these changes, no failures to set executable permission bits could
be observed, regardless of build tool version used (v19.1 and v26.0,
n=30 each).

Fixes #932

[1] https://www.kernel.org/doc/Documentation/filesystems/ext4.txt

Change-Id: I290b4ce896aa449afef89ac87cdd0431752ceb93
2017-06-24 10:29:51 +02:00
Mathieu Lonjaret 79ea22dc0c Merge "clients/android: avoid wifi manager memory leak" 2017-06-21 00:01:22 +00:00
Tilman Dilo f7901d271c clients/android: avoid wifi manager memory leak
When building the uploader application with a newer version of the build
tools, the build fails in stage app:lintVitalRelease with a lint error of
type WifiMangerLeak. The wifi manager instance should always be obtained
from an application context in order to avoid a memory leak on Android
versions before N. See:
https://developer.android.com/reference/android/net/wifi/WifiManager.html

This commit implements the recommendation to obtain the wifi manager
instance through the application context.

Change-Id: I59ff0dfb381b82d9b4f201b646f11b34b3de3cff
2017-06-19 19:24:50 +02:00
Tilman Dilo d29f4c24a9 clients/android: fix permissions of camput binary
While the log message claims that the permissions of the camput binary
were set to 0700, they were actually set to 0777.

Change-Id: Ic5adbc05af161431823a3fb1685af5fa9a4b6647
2017-06-17 15:13:05 +02:00
mpl 68cd59797a clients/android: migrate to gradle
Android applications nowadays are supposed to be developped with Android
Studio, which uses gradle as the build system, with the android plugin.

This change modifies the app setup and file tree layout so it can be
built with gradle (in docker by default) instead of with ant.

The initial motivation for this change is to make changes to the app in
Go, using 'gomobile bind' to call the Go code from java. As the canonical
example at golang.org/x/mobile/example/bind/hello uses gradle, the
first step was to migrate the app to gradle.

Even if we don't end up using gomobile, this change is interesting as it
makes it easier for android apps developpers to contribute to the app if
it uses the recommended "modern" way.

Change-Id: I8386012db640324b62e18ffc128b68ba971fa953
2017-06-04 01:41:35 +02:00
Mathieu Lonjaret 726843fbc9 Merge "android: avoid excessive UI updates" 2016-10-18 13:17:40 +00:00
Tilman Dilo bf4ebe0fe3 android: avoid excessive UI updates
On some devices, updating notifications and status text at a high rate
causes whole-system UI lag and even complete system freezes. On a
Nexus 5, the uploader is completely unusable and requires a hard phone
restart almost every time "upload all" is triggered from the UI. The
device freezes happen across multiple stock Android releases.

This commit reduces the update rate of the UI significantly by updating
the notification only when the integer percent value of the upload
progress changes. It also reduces the update rate of the status text to
around 30 fps, which should still be plenty. With both of the changes,
the uploader behaves as expected. Either change alone is not enough to
get rid of the device freezes.

Change-Id: I2c170772d29c4670c8c10d09cdaea96207fc9e61
2016-10-15 23:15:29 +02:00
Tilman Dilo 95a0d4bc21 android: add Cardboard Camera directory
Automatically upload panoramas created with the Cardboard Camera app.

Change-Id: I1a32ac9a947c3b5f7fec479139ff8ee85368a8b7
2016-10-12 23:33:09 +02:00
Tilman Dilo 555cc5fca6 android: build client with Go 1.7
Change-Id: I7736a10a6a3e30408643e678b7f8fc942f028ff7
2016-09-05 21:53:29 +02:00
mpl 8143b55e77 android: fix/update docker build
Fixes #772

Change-Id: I3980b14714d44950a2710ca5908d3db90f0f09bd
2016-05-13 22:51:02 +02:00
Tilman Dilo d208b531c9 Fix permissions for files
Use mode 0644 instead of 0755 for non-vendored files.

Change-Id: Ifbe1d5e21f24814531248a8a6c84d6f0a72c071c
2016-04-28 21:15:09 +02:00
Will Norris 7ec2b0ac2e website: update doc URLs
s/docs/doc/ and s/http/https/ for camlistore.org doc URLs in website and
code.

Change-Id: I875e2acece1f594a304f2bdb63f756fcb315abc8
2016-04-27 08:48:50 -07:00
Brad Fitzpatrick ddbe440e45 Update more (all remaining) issue links to Github.
Change-Id: Ia796410afb292615e63f7f42b5ecda3d18d7c325
2014-12-13 17:40:54 +11:00
Fabian Wickborn f369c56a4b Android: Added null-check, fixed duped permissions
- Added a null check I missed in my last commit.
- Fixed duplicated Permission ACCESS_NETWORK_STATE in manifest.

Change-Id: I0da93b3e83ac584cb8fe36b2c3b9f1c711b08a8a
2014-08-24 11:59:37 +02:00
Fabian Wickborn 23975a92cd Option to restrict WiFI SSID for Android client
This is a first shot at
https://code.google.com/p/camlistore/issues/detail?id=496.

A user can enter a SSID and the upload will only run over Wifis with
this SSID. If the SSID option is left empty, everything works as before.

Change-Id: Ief3642c5b9c14d059f42696531fa33d1d780ab1c
2014-08-23 19:49:50 +02:00
Brad Fitzpatrick c9bf045aac Merge "Support more Android camera paths" 2014-08-22 16:49:17 +00:00
Fabian Wickborn 0fc94f3c72 Support more Android camera paths
I scratched my own itch and addressed
https://code.google.com/p/camlistore/issues/detail?id=494
for my HTC One M8 which stores pictures taken with its camera
to /sdcard/DCIM/100MEDIA.

Hardcoding these paths is far from being a good solution. I hope I can
find the time to get deeper into Android coding and come up with some
for https://code.google.com/p/camlistore/issues/detail?id=37 over the
next weeks.

Change-Id: I4e351c1915c5c7f66948d434d72763c826a25a16
2014-08-22 14:44:09 +00:00
Fabian Wickborn b86c0ce475 Android client docker: version bump Go to 1.3.1
Change-Id: Id3cce36343688c05eff220327534f7fa5880af5d
2014-08-22 14:30:17 +02:00
Bill Thiede 12a9f6b1ed android: logging/whitespace cleanup.
Addressing feedback from https://camlistore.org/r/3416

Change-Id: Ied7e86e12861ec27be0e2f3d41aefcd92ec5d1a3
2014-08-12 21:00:44 -07:00
Bill Thiede bec12c5270 android: Add QR code scanning to SettingsActivity.
Import src/com/google/zxing from
https://github.com/zxing/zxing/android-integration/src/ at revision:

    commit 7d35bd0bddbe84185b9f79c5cb07749a8767c952
    Author: Sean Owen <srowen@gmail.com>
    Date:   Wed Aug 6 09:05:22 2014 +0100

Uses zxing dervied barcode scanner apps to do the heavy lifting.  If the
user does not already have the app installed a dialog will open that
directs them to install it from the Google Play store.

Addresses https://camlistore.org/issue/372

Change-Id: Ic398b77cd9795aca533be101b2ebcd5631cc7f20
2014-08-11 10:24:46 -07:00
Nick O'Neill 78fdefab1e Merge "Fixed an issue where checking for files was slow" 2014-03-05 02:50:39 +00:00
Nick O'Neill c1b51d839e Fixed an issue where checking for files was slow
Don't sha1 every file before we know if we need it.

Change-Id: I8adcc869113b8ad84269450121ad1ba73267fb54
2014-02-26 12:46:52 -08:00
Brad Fitzpatrick 593682dc2d New Android app uploaded to Play. Version 2 aka '0.6.1'.
Change-Id: I0f655de272e15f854a909b629b68a2dd012e36c2
2014-02-21 18:17:59 -08:00
Dustin Sallings 5d9931cb15 osx: Describe how to make a .dmg from BUILDING
Change-Id: I4c2bcc3709d2121ab092b438991cc995fd7192f8
2014-02-13 14:21:52 -08:00
Nick O'Neill 15b0307864 Merge "Improvements in storage and caching for ios" 2014-02-12 21:07:31 +00:00
Brad Fitzpatrick f1a6c8a857 Comment clarification
Change-Id: I3f00050822bf0f05bdce2ca58a2ee22113dfdc09
2014-02-08 17:15:09 -08:00
Brad Fitzpatrick e364a6da4b Remove unneeded stuff from camlistore/android
Change-Id: I397ba4bbd6567b1ce54fcab54162b6b1a1508008
2014-02-08 17:14:02 -08:00
Brad Fitzpatrick 1e56abec90 Android: build in Docker, part 2. Build the Go binary child process too.
Now uploaded to the Google Play App Store Market.

Change-Id: I05f94eaf3ba70d694c593a892c15280364acf4ee
2014-02-08 17:10:02 -08:00
Brad Fitzpatrick c5c6fe1adc android: support for building with Docker
Change-Id: I0da100b62354ca1bda325f47397e4446deb1acec
2014-02-08 13:58:20 -08:00
Nick O'Neill 35df097a7e Improvements in storage and caching for ios
Fixed duplicates in upload list with proper synchronization
Added a filename when vivifying
Reset cache on storageGeneration change

Change-Id: Ibb3551d565c4acdbdfd17055118263144ee4a135
2014-02-07 11:47:24 -08:00
Nick O'Neill 12766e8bfe Merge "Improved logging capture with bugshotkit." 2014-02-06 23:12:01 +00:00
Nick O'Neill 94e347174d Added android icons.
Change-Id: I3535aac02d7f693ed1631e4451a54ce81b109b64
2014-01-30 17:42:26 -08:00
Nick O'Neill a68a6b0eb0 Improved logging capture with bugshotkit.
Change-Id: I6230fb68628f9f10185edc2d798b61a36e5541b3
2014-01-29 17:09:46 -08:00
Brad Fitzpatrick 759f7ead55 Merge "Added a progress bar to the upload notification." 2014-01-29 09:53:03 +00:00
Nick O'Neill 881382bea1 Added an icon.
Change-Id: I4eeac4527868e8955909b742bb176b11b55eaf92
2014-01-28 19:55:14 -08:00
Nick O'Neill de16d60d20 Added a progress bar to the upload notification.
Change-Id: Ib373142b3ff60fc73fc82a0c3aa236ba53553bab
2014-01-28 11:25:42 -08:00
Nick O'Neill 27bd0d768f Merge "osx: dmg target" 2014-01-27 19:41:14 +00:00
Nick O'Neill 12e449564d Various improvements in style and functionality
Fixed crash on vivify error.
Cleanup for names and properties.
Reformatted to webkit style.
Better treatment of logging network failures, actual done text when done.
Don't double add uploads
Moved the settings panel showing to viewdidappear, where it should be.
Added images to the upload cells.
Reset progress bar for reusable cells.
Updated podfile with keychain tools.
Updated for better keychain management.
Mitigated a leak.

Change-Id: Iad428aae56ac26e71743bd3e86b0f7736eff9767
2014-01-21 10:44:25 -08:00
Dustin Sallings d787808155 osx: dmg target
Change-Id: If16da4027d64977cd5e6bd4fbe3b128e76186a43
2014-01-18 14:51:08 -08:00
Nick O'Neill f6c17210e5 WIP: show upload progress in a table view.
Change-Id: Iff13d7934b67dbab95d4c78931c9f69aa6ad9a46
2014-01-09 18:19:23 -08:00
Nick O'Neill fd8d9c1bfe Fixed issues with blobroot, added podfile
Requires cocoapods to manage dependencies now, just `pod install` to use. Fixed issues where blobroot wasn't properly set and added some more logging to the main view.

Change-Id: I59119de2c057196133648acfb641b21683488bc6
2014-01-09 18:19:23 -08:00
Brad Fitzpatrick cdd7b97d32 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-01-04 16:37:49 -08:00