Skip to content

django-files/android-client

Repository files navigation

GitHub Downloads GitHub Release Version Lint GitHub Top Language GitHub Last Commit GitHub Repo Size GitHub Discussions GitHub Forks GitHub Repo Stars GitHub Org Stars Discord

Django Files Android App

GitHub Release

Allows you to Share or Open any file with your Django Files server. The URL to the file is automatically copied to the clipboard and the preview is shown in the app.

Screenshots can be found on the website: https://django-files.github.io/android/

  • Supports Android 8 (API 26) 2017 or Newer.
Django Files Link
Website https://django-files.github.io/
GitHub https://github.com/django-files
Server https://github.com/django-files/django-files
iOS App https://github.com/django-files/ios-client
Web Extension https://github.com/django-files/web-extension

Install

Tip

Google Play is starting Closed Testing. To be included contact us on Discord.

GitHub Obtainium
📲 Click to View QR Codes 📸

QR Code GitHub

QR Code Obtainium

Note: Until published on the play store, you may need to allow installation of apps from unknown sources.

Downloading and Installing the apk should take you to the settings area to allow installation if not already enabled. For more information, see Release through a website.

View Manual Steps to Install from Unknown Sources
  1. Go to your device settings.
  2. Search for "Install unknown apps" or similar.
  3. Choose the app you will install the apk file from.
    • Select your web browser to install directly from it.
    • Select your file manager to open it, locate the apk and install from there.
  4. Download the Latest Release.
  5. Open the download apk in the app you selected in step #3.
  6. Choose Install and Accept any Play Protect notifications.
  7. The app is now installed. Proceed to the Setup section below.

Setup

  1. Install and open the app on your device.
  2. Go to the Django Files User Settings, and
    • Scan the QR Code with your Phone
    • Click the link from your Phone
  3. Done.

or

  1. Install and open the app on your device.
  2. Enter the URL to your Django Files server.
  3. Log in as you normally would on the website.
  4. Done.

To use, share or open any file and choose the Django Files app. The app will then upload the file to your Django Files server. Additionally, the URL is copied to the clipboard and the preview show in the app.

Note

Swipe from the left to access the Android menu.

Features

  • Share or Open any file(s) and automatically copy the URL to the clipboard.
  • Upload Previews for single media and scrolling selection for multiple files.
  • Native File List with Options, Infinite Scroll, and Multi-Select Options.
  • Supports Native Local Login, GitHub OAuth, Google OAuth, and Discord OAuth.
  • Ability to add multiple servers and switch on the fly from the Server List menu.
  • Widget with Stats, Upload Shortcut, Custom Background Update Interval, and More.
  • Automatic Authentication from Authenticated Sessions with QR Code or Deep Link.

Planned

  • File Upload
    • Add More Upload Options
  • File List
    • Response Caching for Infinite Scroll
  • File List Preview
    • File Options
    • PDF Previews

Known Issues

  • The app gets logged out if the session expires; however, sharing continues to work.
  • Uploading files from the website works; however, taking picture/recording does not.
  • Logging out and deleting servers may have some unexpected results, but should work.

Note: If the app gets in a bad state, clear the app data or reinstall the application.

For more planned features you can check out the internal TODO.md.

Development

This section briefly covers running and building in Android Studio and the Command Line.

Note

Building requires an app/google-services.json file. See Google Services for more info...

Android Studio

  1. Download and Install Android Studio.

    https://developer.android.com/studio

  2. Ensure that usb or wifi debugging is enabled in the Android developer settings and verify.

  3. Then build or run the app on your device.

    • Import the Project
    • Run Gradle Sync

To Run: Select device and press Play ▶️

To Build:

  • Select the Build Variant (debug or release)
  • Build > Generate App Bundles or APK > Generate APKs

Note

Text/Code Previews use highlight.js; to install this run:
bash .github/scripts/prepare.sh

Command Line

Note: This section is a WIP! For more details see the release.yaml.

You will need to have ADB installed.

Click Here to Download and Install a Release
$ wget https://github.com/django-files/android-client/releases/latest/download/app-release.apk
$ ls
app-release.apk

$ which adb
C:\Users\Shane\Android\sdk\platform-tools\adb.EXE

$ adb devices
List of devices attached
RF9M33Z1Q0M     device

$ adb -s RF9M33Z1Q0M install app-release.apk
Performing Incremental Install
Serving...
All files should be loaded. Notifying the device.
Success
Install command complete in 917 ms

See below for more details...

  1. Download and Install the Android SDK Platform Tools.

https://developer.android.com/tools/releases/platform-tools#downloads

Ensure that adb is in your PATH.

  1. List and verify the device is connected with:
$ adb devices
List of devices attached
RF9M33Z1Q0M     device
  1. Build a debug or release apk.
./gradlew assemble
./gradlew assembleRelease

Note: Use gradlew.bat for Windows.

  1. Then install the apk to your device with adb.
$ cd app/build/outputs/apk/debug
$ adb -s RF9M33Z1Q0M install app-debug.apk
$ cd app/build/outputs/apk/release
$ adb -s RF9M33Z1Q0M install app-release-unsigned.apk

Note: you may have to uninstall before installing due to different certificate signatures.

For more details, see the ADB Documentation.

Google Services

This app uses Firebase Google Services. Building requires a valid google-services.json file in the app directory.
You must add com.djangofiles.djangofiles.dev to a Firebase campaign here: https://firebase.google.com/

To enable/disable Firebase DebugView use the following commands:

# set
adb shell setprop debug.firebase.analytics.app com.djangofiles.djangofiles.dev

# unset
adb shell setprop debug.firebase.analytics.app .none.

# check
adb shell getprop debug.firebase.analytics.app

Only 1 app can be in debug mode at a time and this must be set every restart.

Note

Note: To disable/enable Analytics or Crashlytics set the manifestPlaceholders in the build.gradle.kts file to the respective values.

Support

For general help or to request a feature, see:

If you are experiencing an issue/bug or getting unexpected results, you can:

Contributing

Currently, the best way to contribute to this project is to star this project on GitHub.

You can also support other related projects:

About

Android App for Django Files

Topics

Resources

Stars

Watchers

Forks

Languages