Rewrote readme, adjusted library package name (fixes #4)
This commit is contained in:
@@ -2,23 +2,30 @@
|
||||
|
||||
[](https://www.mozilla.org/MPL/2.0/)
|
||||
|
||||
[<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="80">](https://play.google.com/store/apps/details?id=net.syncthing.lite)
|
||||
|
||||
This project is an Android app, that works as a client for a [Syncthing][1] share (accessing
|
||||
Syncthing devices in the same way a client-server file sharing app access its proprietary server).
|
||||
|
||||
This project is based on [a-sync][2], a java implementation of Syncthing protocols (bep,
|
||||
discovery, relay).
|
||||
|
||||
NOTE: this is a client-oriented implementation, designed to work online by downloading and
|
||||
This is a client-oriented implementation, designed to work online by downloading and
|
||||
uploading files from an active device on the network (instead of synchronizing a local copy of
|
||||
the entire repository). This is quite different from the way the original Syncthing app works,
|
||||
the entire repository). This is quite different from the way the [syncthing-android][2] works,
|
||||
and its useful from those devices that cannot or wish not to download the entire repository (for
|
||||
example, mobile devices with limited storage available, wishing to access a syncthing share).
|
||||
|
||||
All code is licensed under the [MPLv2 License][3].
|
||||
This project is based on [syncthing-java][3], a java implementation of Syncthing protocols.
|
||||
|
||||
## Building
|
||||
|
||||
The project uses a standard Android build, and requires the Android SDK. The easiest option is if
|
||||
you install [Android Studio][4] and import the project.
|
||||
|
||||
The syncthing-java library is not stable yet. If you encounter any build errors, you probably have
|
||||
to build it from source. To do this, clone the repo and run `gradle install`.
|
||||
|
||||
## License
|
||||
All code is licensed under the [MPLv2 License][5].
|
||||
|
||||
[1]: https://syncthing.net/
|
||||
[2]: https://github.com/davide-imbriaco/a-sync
|
||||
[3]: https://github.com/davide-imbriaco/a-sync-browser/blob/master/LICENSE
|
||||
[4]: https://play.google.com/store/apps/details?id=it.anyplace.syncbrowser
|
||||
[2]: https://github.com/syncthing/syncthing-android
|
||||
[3]: https://github.com/Nutomic/syncthing-java
|
||||
[4]: https://developer.android.com/studio/index.html
|
||||
[5]: LICENSE
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ dependencies {
|
||||
implementation "com.android.support:support-v4:$support_version"
|
||||
implementation "com.android.support:design:$support_version"
|
||||
implementation "com.android.support:cardview-v7:$support_version"
|
||||
implementation ('it.anyplace.sync:a-sync-client:1.3') {
|
||||
implementation ('net.syncthing.java:a-sync-client:1.3') {
|
||||
exclude group: 'commons-logging', module:'commons-logging'
|
||||
exclude group: 'commons-codec'
|
||||
exclude group: 'org.apache.httpcomponents', module:'httpclient'
|
||||
|
||||
@@ -17,11 +17,11 @@ import android.widget.Toast
|
||||
import com.google.common.base.Objects.equal
|
||||
import com.google.common.base.Preconditions.checkArgument
|
||||
import com.nononsenseapps.filepicker.FilePickerActivity
|
||||
import it.anyplace.sync.bep.IndexBrowser
|
||||
import it.anyplace.sync.core.beans.FileInfo
|
||||
import it.anyplace.sync.core.beans.FolderInfo
|
||||
import it.anyplace.sync.core.utils.FileInfoOrdering
|
||||
import it.anyplace.sync.core.utils.PathUtils
|
||||
import net.syncthing.java.bep.IndexBrowser
|
||||
import net.syncthing.java.core.beans.FileInfo
|
||||
import net.syncthing.java.core.beans.FolderInfo
|
||||
import net.syncthing.java.core.utils.FileInfoOrdering
|
||||
import net.syncthing.java.core.utils.PathUtils
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.adapters.FolderContentsAdapter
|
||||
import net.syncthing.lite.databinding.ActivityFolderBrowserBinding
|
||||
|
||||
@@ -9,7 +9,7 @@ import android.support.v7.app.ActionBarDrawerToggle
|
||||
import android.view.Gravity
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import it.anyplace.sync.core.beans.FolderInfo
|
||||
import net.syncthing.java.core.beans.FolderInfo
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.databinding.ActivityMainBinding
|
||||
import net.syncthing.lite.fragments.DevicesFragment
|
||||
|
||||
@@ -9,10 +9,10 @@ import android.preference.PreferenceManager
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import it.anyplace.sync.bep.FolderBrowser
|
||||
import it.anyplace.sync.client.SyncthingClient
|
||||
import it.anyplace.sync.core.beans.FolderInfo
|
||||
import it.anyplace.sync.core.configuration.ConfigurationService
|
||||
import net.syncthing.java.bep.FolderBrowser
|
||||
import net.syncthing.java.client.SyncthingClient
|
||||
import net.syncthing.java.core.beans.FolderInfo
|
||||
import net.syncthing.java.core.configuration.ConfigurationService
|
||||
import net.syncthing.lite.BuildConfig
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.databinding.DialogLoadingBinding
|
||||
|
||||
@@ -2,14 +2,12 @@ package net.syncthing.lite.adapters
|
||||
|
||||
import android.content.Context
|
||||
import android.databinding.DataBindingUtil
|
||||
import android.graphics.PorterDuff
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import com.google.common.collect.Lists
|
||||
import it.anyplace.sync.core.beans.DeviceStats
|
||||
import net.syncthing.java.core.beans.DeviceStats
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.databinding.ListviewDeviceBinding
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import com.google.common.collect.Lists
|
||||
import it.anyplace.sync.core.beans.FileInfo
|
||||
import net.syncthing.java.core.beans.FileInfo
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.databinding.ListviewFileBinding
|
||||
import org.apache.commons.io.FileUtils
|
||||
|
||||
@@ -7,8 +7,8 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import it.anyplace.sync.core.beans.FolderInfo
|
||||
import it.anyplace.sync.core.beans.FolderStats
|
||||
import net.syncthing.java.core.beans.FolderInfo
|
||||
import net.syncthing.java.core.beans.FolderStats
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.databinding.ListviewFolderBinding
|
||||
import org.apache.commons.lang3.tuple.Pair
|
||||
|
||||
@@ -14,9 +14,9 @@ import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.EditText
|
||||
import android.widget.Toast
|
||||
import com.google.zxing.integration.android.IntentIntegrator
|
||||
import it.anyplace.sync.core.beans.DeviceInfo
|
||||
import it.anyplace.sync.core.beans.DeviceStats
|
||||
import it.anyplace.sync.core.security.KeystoreHandler
|
||||
import net.syncthing.java.core.beans.DeviceInfo
|
||||
import net.syncthing.java.core.beans.DeviceStats
|
||||
import net.syncthing.java.core.security.KeystoreHandler
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.activities.SyncthingActivity
|
||||
import net.syncthing.lite.adapters.DevicesAdapter
|
||||
|
||||
@@ -10,8 +10,8 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.google.common.collect.Lists
|
||||
import com.google.common.collect.Ordering
|
||||
import it.anyplace.sync.core.beans.FolderInfo
|
||||
import it.anyplace.sync.core.beans.FolderStats
|
||||
import net.syncthing.java.core.beans.FolderInfo
|
||||
import net.syncthing.java.core.beans.FolderStats
|
||||
import net.syncthing.lite.R
|
||||
import net.syncthing.lite.activities.FolderBrowserActivity
|
||||
import net.syncthing.lite.activities.SyncthingActivity
|
||||
|
||||
@@ -11,9 +11,9 @@ import android.support.annotation.StringRes
|
||||
import android.util.Log
|
||||
import android.webkit.MimeTypeMap
|
||||
import android.widget.Toast
|
||||
import it.anyplace.sync.bep.BlockPuller
|
||||
import it.anyplace.sync.client.SyncthingClient
|
||||
import it.anyplace.sync.core.beans.FileInfo
|
||||
import net.syncthing.java.bep.BlockPuller
|
||||
import net.syncthing.java.client.SyncthingClient
|
||||
import net.syncthing.java.core.beans.FileInfo
|
||||
import net.syncthing.lite.R
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.apache.commons.io.FilenameUtils
|
||||
|
||||
@@ -3,12 +3,12 @@ package net.syncthing.lite.utils
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.google.common.eventbus.Subscribe
|
||||
import it.anyplace.sync.bep.FolderBrowser
|
||||
import it.anyplace.sync.bep.IndexHandler
|
||||
import it.anyplace.sync.client.SyncthingClient
|
||||
import it.anyplace.sync.core.beans.FolderInfo
|
||||
import it.anyplace.sync.core.configuration.ConfigurationService
|
||||
import it.anyplace.sync.core.security.KeystoreHandler
|
||||
import net.syncthing.java.bep.FolderBrowser
|
||||
import net.syncthing.java.bep.IndexHandler
|
||||
import net.syncthing.java.client.SyncthingClient
|
||||
import net.syncthing.java.core.beans.FolderInfo
|
||||
import net.syncthing.java.core.configuration.ConfigurationService
|
||||
import net.syncthing.java.core.security.KeystoreHandler
|
||||
import org.apache.commons.io.FileUtils
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
@@ -45,7 +45,7 @@ class LibraryHandler {
|
||||
configuration!!.edit().persistLater()
|
||||
Log.i(TAG, "loaded mConfiguration = " + configuration!!.newWriter().dumpToString())
|
||||
Log.i(TAG, "storage space = " + configuration!!.storageInfo.dumpAvailableSpace())
|
||||
syncthingClient = it.anyplace.sync.client.SyncthingClient(configuration!!)
|
||||
syncthingClient = net.syncthing.java.client.SyncthingClient(configuration!!)
|
||||
//TODO listen for device events, update device list
|
||||
folderBrowser = syncthingClient!!.indexHandler.newFolderBrowser()
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.preference.PreferenceManager
|
||||
import android.widget.Toast
|
||||
import it.anyplace.sync.client.SyncthingClient
|
||||
import net.syncthing.java.client.SyncthingClient
|
||||
import net.syncthing.lite.R
|
||||
import java.util.*
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import android.net.Uri
|
||||
import android.os.Handler
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import it.anyplace.sync.bep.BlockPusher
|
||||
import it.anyplace.sync.client.SyncthingClient
|
||||
import it.anyplace.sync.core.utils.PathUtils
|
||||
import net.syncthing.java.bep.BlockPusher
|
||||
import net.syncthing.java.client.SyncthingClient
|
||||
import net.syncthing.java.core.utils.PathUtils
|
||||
import net.syncthing.lite.R
|
||||
import java.io.IOException
|
||||
|
||||
|
||||
Reference in New Issue
Block a user