Compare commits

...

21 commits
0.9.0 ... main

Author SHA1 Message Date
3dcc9912d3 new release 2024-08-20 10:05:53 -07:00
2434b38117 update readme 2024-08-10 11:43:35 -07:00
ed11ab882b test release 2024-08-10 11:06:55 -07:00
5742255b5b test release 2024-08-10 11:03:44 -07:00
e668cd4b46 update images 2024-08-10 07:29:36 -07:00
732f230ee6 deprecation 2024-01-29 08:41:50 -07:00
dbfcb1e9f1 new release 2023-12-07 05:43:46 -07:00
abaa65516e update readme 2023-10-18 16:49:03 -07:00
ac1184b164 update readme 2023-10-18 16:44:13 -07:00
0e1391e89d new release 2023-07-28 04:48:26 -07:00
f84b96cfc6 new release 2023-07-27 15:32:26 -07:00
532b05dde2 new release 2023-06-25 19:11:06 -07:00
5eb44e6bc1 new release 2023-04-21 07:16:32 -07:00
319019cd46 new release 2023-03-08 11:38:01 -07:00
fc3c1c98b0 new release 2023-03-03 13:34:54 -07:00
7f627b5e4c new release 2023-03-03 13:33:24 -07:00
98cd78a1ec m3u playlists 2023-03-03 13:17:47 -07:00
684c1e36cc upgrade exoplayer 2023-03-03 13:09:09 -07:00
13004d2bd3 new release 2023-02-28 12:02:50 -07:00
448dfc3ab7 bug fix 2023-02-22 12:36:04 -07:00
175462a344 upgrade dependencies 2023-02-22 09:55:45 -07:00
49 changed files with 538 additions and 169 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
<bytecodeTargetLevel target="17" />
</component>
</project>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

View file

@ -4,16 +4,26 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="Embedded JDK" />
<option name="externalProjectPath" value="/data/2/asgardius/StudioProjects/s3manager" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="/data/2/asgardius/StudioProjects/s3manager" />
<option value="/data/2/asgardius/StudioProjects/s3manager/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="/data/2/asgardius/StudioProjects/s3manager" />
<option value="/data/2/asgardius/StudioProjects/s3manager/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>

11
.idea/migrations.xml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="/data/2/asgardius/StudioProjects/s3manager" />
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
@ -28,7 +27,8 @@
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

252
.idea/other.xml Normal file
View file

@ -0,0 +1,252 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="direct_access_persist.xml">
<option name="deviceSelectionList">
<list>
<PersistentDeviceSelectionData>
<option name="api" value="27" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="F01L" />
<option name="id" value="F01L" />
<option name="manufacturer" value="FUJITSU" />
<option name="name" value="F-01L" />
<option name="screenDensity" value="360" />
<option name="screenX" value="720" />
<option name="screenY" value="1280" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="28" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="SH-01L" />
<option name="id" value="SH-01L" />
<option name="manufacturer" value="SHARP" />
<option name="name" value="AQUOS sense2 SH-01L" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="samsung" />
<option name="codename" value="a51" />
<option name="id" value="a51" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy A51" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="akita" />
<option name="id" value="akita" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="b0q" />
<option name="id" value="b0q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S22 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="32" />
<option name="brand" value="google" />
<option name="codename" value="bluejay" />
<option name="id" value="bluejay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="crownqlteue" />
<option name="id" value="crownqlteue" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Note9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2220" />
<option name="screenY" value="1080" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm3q" />
<option name="id" value="dm3q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S23 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix_camera" />
<option name="id" value="felix_camera" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold (Camera-enabled)" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="gts8uwifi" />
<option name="id" value="gts8uwifi" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S8 Ultra" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1848" />
<option name="screenY" value="2960" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="husky" />
<option name="id" value="husky" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8 Pro" />
<option name="screenDensity" value="390" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="motorola" />
<option name="codename" value="java" />
<option name="id" value="java" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="G20" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="lynx" />
<option name="id" value="lynx" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="google" />
<option name="codename" value="oriole" />
<option name="id" value="oriole" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="panther" />
<option name="id" value="panther" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q5q" />
<option name="id" value="q5q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Z Fold5" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1812" />
<option name="screenY" value="2176" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="r11" />
<option name="id" value="r11" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Watch" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
<option name="type" value="WEAR_OS" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="redfin" />
<option name="id" value="redfin" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 5" />
<option name="screenDensity" value="440" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="shiba" />
<option name="id" value="shiba" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="tangorpro" />
<option name="id" value="tangorpro" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Tablet" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="x1q" />
<option name="id" value="x1q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S20" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1440" />
<option name="screenY" value="3200" />
</PersistentDeviceSelectionData>
</list>
</option>
</component>
</project>

7
.idea/vcs.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="/data/2/asgardius/StudioProjects/s3manager" vcs="Git" />
</component>
</project>

View file

@ -2,8 +2,6 @@
File Explorer to manage servers compatible with S3 Object Storage Protocol
Current feature list
* Audio and Video playback (opus, ogg, oga, mp3, m4a, flac, mka, mkv, mp4, m4v, webm)
@ -36,13 +34,9 @@ This app is a work in progress, so it have some bugs that need to be fixed
You need to setup a pdf.js server to use pdf viewer. Just download latest version from official website and upload to any web server with ssl on same root domain than S3 server (can be same subdomain or a different one). Then set url to pdfjs root folder like https://example.com/pdfjs-dist
[<img src="app-store-badges/fdroid.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/asgardius.page.s3manager/)
[<img src="app-store-badges/play-store.png"
alt="Get it on Google Play"
height="80">](https://play.google.com/store/apps/details?id=asgardius.page.s3manager)
height="80">](https://play.google.com/store/apps/details?id=asgardius.page.s3managermk2)
F-droid release may take a few days to get updated [More info here](https://www.f-droid.org/en/docs/FAQ_-_App_Developers/#ive-published-a-new-release-why-is-it-not-in-the-repository)
@ -50,7 +44,7 @@ F-droid release may take a few days to get updated [More info here](https://www.
You can get help at https://forum.asgardius.company/t/s3-manager
You can find app documentation at https://wiki.asgardius.company/shelves/asgardius-s3-manager-english (english) or https://wiki.asgardius.company/shelves/asgardius-s3-manager-espanol (spanish)
You can find app documentation at https://wiki-en.asgardius.company/index.php?title=Asgardius_S3_Manager_Documentation (english) or https://wiki-es.asgardius.company/index.php?title=Documentacion_Asgardius_S3_Manager (spanish)
Supported languages
@ -67,7 +61,7 @@ Known supported providers
* Amazon Web Services
* Scaleway Elements
* Wasabi Cloud
* Wasabi Cloud (Provider broke access control intentionally since March 13 2023)
* Backblaze B2
* Cloudflare R2 (partial)
* MinIO **
@ -78,4 +72,4 @@ Known not supported providers
* Google Cloud (Not compatible with S3v4)
* Oracle Cloud (compatibility issues with S3v4)
** Extra steps required (read documentation)
** Extra steps required (read documentation)

View file

@ -6,11 +6,11 @@ android {
compileSdk 33
defaultConfig {
applicationId "asgardius.page.s3manager"
applicationId "asgardius.page.s3managermk2"
minSdk 21
targetSdk 33
versionCode 76
versionName "0.9.0"
targetSdk 34
versionCode 2
versionName "0.11.1"
setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -29,20 +29,21 @@ android {
buildFeatures {
viewBinding true
}
namespace 'asgardius.page.s3managermk2'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
def exoplayer_version = "2.18.2"
def exoplayer_version = "2.19.1"
implementation "com.google.android.exoplayer:exoplayer:$exoplayer_version"
implementation "com.google.android.exoplayer:extension-mediasession:$exoplayer_version"
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation"com.otaliastudios:zoomlayout:1.9.0"
// BEGIN AWS DEPENDENCIES
def aws_version = "2.62.0"
def aws_version = "2.76.1"
implementation "com.amazonaws:aws-android-sdk-s3:$aws_version"
implementation ("com.amazonaws:aws-android-sdk-mobile-client:$aws_version") { transitive = true }
// END AWS DEPENDENCIES

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.content.Context;

View file

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="asgardius.page.s3manager" >
android:installLocation="auto"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:allowBackup="true"
@ -19,7 +18,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AsgardiusS3Manager"
tools:targetApi="31" >
tools:targetApi="31"
android:usesCleartextTraffic="true" >
<activity
android:name=".ObjectPolicy"
android:exported="false" />
@ -58,6 +58,7 @@
<activity
android:name=".Downloader"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
android:documentLaunchMode="always"
android:exported="false" />
<activity
android:name=".CreateBucket"
@ -67,19 +68,23 @@
<activity
android:name=".Uploader"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
android:documentLaunchMode="always"
android:exported="false" />
<activity
android:name=".ImageViewer"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
android:exported="false"
android:documentLaunchMode="always"
android:hardwareAccelerated="false" />
<activity
android:name=".TextViewer"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
android:documentLaunchMode="always"
android:exported="false" />
<activity
android:name=".WebBrowser"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden"
android:documentLaunchMode="always"
android:exported="false" />
<activity
android:name=".AccountAdd"
@ -104,6 +109,7 @@
android:exported="false"
android:launchMode="singleTask"
android:resizeableActivity="true"
android:documentLaunchMode="always"
android:supportsPictureInPicture="true" />
<activity
android:name=".MainActivity"

View file

@ -9,14 +9,14 @@
<H3>Created by Page Asgardius</H3>
<H3>Libraries used in this app</H3>
<ul>
<li>Amazon Web Services SDK 2.62.0</li>
<li>ExoPlayer 2.18.2</li>
<li>Amazon Web Services SDK 2.76.1</li>
<li>ExoPlayer 2.19.1</li>
<li>ZoomLayout 1.9.0</li>
<li>Adwaita Icon Theme for GNOME 43</li>
<li>pdf.js</li>
</ul>
<H3>This software released under GNU General Public License 3</H3>
<p>You can find source code at https://patrice.asgardius.company/gitea/asgardius/s3manager
<p>You can find source code at https://git.asgardius.company/asgardius/s3manager
<br>
You need to setup a pdf.js server to use pdf viewer. You can use https://office.asgardius.company/pdfjs or setup your own.
<br>

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.annotation.SuppressLint;
import android.content.Context;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.os.Bundle;
import android.view.View;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.os.Bundle;
import android.view.View;

View file

@ -1,6 +1,5 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import static android.content.ContentValues.TAG;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.content.DialogInterface;
import android.content.Intent;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.os.Bundle;
import android.view.View;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
@ -30,6 +30,8 @@ import com.amazonaws.services.s3.model.ListObjectsRequest;
import com.amazonaws.services.s3.model.ObjectListing;
import com.amazonaws.services.s3.model.S3ObjectSummary;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
@ -125,19 +127,6 @@ public class ObjectSelect extends AppCompatActivity {
//i++;
}
while (result.isTruncated()) {
result = s3client.listNextBatchOfObjects (result);
od = result.getCommonPrefixes();
for (String os : od) {
filename = os.split("/");
if (filename.length == treelevel+1) {
object.add(filename[treelevel]+"/");
}
//i++;
}
}
//This get file list
List<S3ObjectSummary> ob = result.getObjectSummaries();
for (S3ObjectSummary os : ob) {
@ -151,8 +140,23 @@ public class ObjectSelect extends AppCompatActivity {
//i++;
}
//Get next batch
while (result.isTruncated()) {
result = s3client.listNextBatchOfObjects (result);
//This get folder list
od = result.getCommonPrefixes();
for (String os : od) {
filename = os.split("/");
if (filename.length == treelevel+1) {
object.add(filename[treelevel]+"/");
}
//i++;
}
//This get file list
ob = result.getObjectSummaries();
for (S3ObjectSummary os : ob) {
filename = os.getKey().split("/");
@ -192,7 +196,7 @@ public class ObjectSelect extends AppCompatActivity {
else if (Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".opus") || Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".ogg")
|| Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".oga") || Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".mp3")
|| Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".m4a") || Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".flac")
|| Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".mka")) {
|| Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".mka") || Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".m3u")) {
Img.add(R.drawable.audiofile);
}
else if(Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".mp4") || Name.get(i).toString().toLowerCase(Locale.ROOT).endsWith(".mkv")
@ -322,7 +326,7 @@ public class ObjectSelect extends AppCompatActivity {
}
} else if (Img.get(position).equals(R.drawable.audiofile) || Img.get(position).equals(R.drawable.videofile)) {
simpleProgressBar.setVisibility(View.VISIBLE);
if (isplaylist) {
if (isplaylist && !Name.get(position).toString().toLowerCase(Locale.ROOT).endsWith(".m3u")) {
videoPlayer(null, Name.get(position).toString());
} else {
Thread mediaread = new Thread(new Runnable() {
@ -471,7 +475,55 @@ public class ObjectSelect extends AppCompatActivity {
}
private void videoPlayer(String url, String title) {
if (isplaylist) {
if (title.toLowerCase(Locale.ROOT).endsWith(".m3u")) {
Thread mediaread = new Thread(new Runnable() {
@Override
public void run() {
try {
//load media file
ArrayList<String> links = getPlaylist(url);
ArrayList<String> medialist = new ArrayList<String>();
for (int i = 0; i < links.size(); i++) {
medialist.add(links.get(i).toString());
}
runOnUiThread(new Runnable() {
@Override
public void run() {
// Sending reference and data to Adapter
//videoPlayer(objectURL.toString(), Name.get(position).toString());
Intent intent = new Intent(getApplicationContext(), VideoPlayer.class);
intent.putExtra("video_url", url);
intent.putExtra("title", title);
intent.putExtra("videocache", videocache);
intent.putExtra("buffersize", buffersize);
intent.putExtra("isplaylist", true);
intent.putExtra("queue", links);
intent.putExtra("names", medialist);
simpleProgressBar.setVisibility(View.INVISIBLE);
startActivity(intent);
}
});
//System.out.println("tree "+treelevel);
//System.out.println("prefix "+prefix);
} catch (Exception e) {
e.printStackTrace();
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),e.toString(), Toast.LENGTH_SHORT).show();
}
});
}
}
});
mediaread.start();
}
else if (isplaylist) {
Thread mediaread = new Thread(new Runnable() {
@Override
@ -490,18 +542,20 @@ public class ObjectSelect extends AppCompatActivity {
@Override
public void run() {
// Sending reference and data to Adapter
//videoPlayer(objectURL.toString(), Name.get(position).toString());
Intent intent = new Intent(getApplicationContext(), VideoPlayer.class);
intent.putExtra("video_url", url);
intent.putExtra("title", title);
intent.putExtra("videocache", videocache);
intent.putExtra("buffersize", buffersize);
intent.putExtra("isplaylist", isplaylist);
intent.putExtra("queue", links);
intent.putExtra("names", medialist);
simpleProgressBar.setVisibility(View.INVISIBLE);
startActivity(intent);
if(links != null) {
// Sending reference and data to Adapter
//videoPlayer(objectURL.toString(), Name.get(position).toString());
Intent intent = new Intent(getApplicationContext(), VideoPlayer.class);
intent.putExtra("video_url", url);
intent.putExtra("title", title);
intent.putExtra("videocache", videocache);
intent.putExtra("buffersize", buffersize);
intent.putExtra("isplaylist", isplaylist);
intent.putExtra("queue", links);
intent.putExtra("names", medialist);
simpleProgressBar.setVisibility(View.INVISIBLE);
startActivity(intent);
}
}
});
//System.out.println("tree "+treelevel);
@ -532,6 +586,7 @@ public class ObjectSelect extends AppCompatActivity {
}
}
private void textViewer(String url) {
Intent intent = new Intent(this, TextViewer.class);
@ -789,4 +844,26 @@ public class ObjectSelect extends AppCompatActivity {
}
return links;
}
public ArrayList<String> getPlaylist(String playlist) {
ArrayList<String> links = new ArrayList<String>();
try {
BufferedReader br = new BufferedReader(new InputStreamReader((new URL(playlist).openStream())));
String strLine;
//Read File Line By Line
while ((strLine = br.readLine()) != null) {
// Print the content on the console - do what you want to do
if(!strLine.startsWith("#")) {
links.add(strLine);
}
}
//Close the input stream
return links;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.content.Context;
import android.view.GestureDetector;

View file

@ -0,0 +1,21 @@
package asgardius.page.s3managermk2;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
public class SdcardCheck {
public static boolean isInstalledOnSdCard(Context context) {
PackageManager pm = context.getPackageManager();
try {
PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
ApplicationInfo ai = pi.applicationInfo;
return (ai.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == ApplicationInfo.FLAG_EXTERNAL_STORAGE;
} catch (PackageManager.NameNotFoundException e) {
// ignore
}
return false;
}
}

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.annotation.SuppressLint;
import android.content.Intent;
@ -11,17 +11,15 @@ import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.exoplayer2.database.StandaloneDatabaseProvider;
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
import com.google.android.material.switchmaterial.SwitchMaterial;
import java.io.File;
import asgardius.page.s3manager.databinding.ActivitySettingsBinding;
import asgardius.page.s3managermk2.databinding.ActivitySettingsBinding;
public class Settings extends AppCompatActivity {
@ -115,6 +113,7 @@ public class Settings extends AppCompatActivity {
try {
standaloneDatabaseProvider = new StandaloneDatabaseProvider(getApplicationContext());
SimpleCache.delete(new File(getApplicationContext().getFilesDir(), "media"), standaloneDatabaseProvider);
SimpleCache.delete(new File(getApplicationContext().getExternalFilesDirs(null)[getApplicationContext().getExternalFilesDirs(null).length-1], "media"), standaloneDatabaseProvider);
standaloneDatabaseProvider.close();
Toast.makeText(getApplicationContext(),getResources().getString(R.string.clearcache_ok), Toast.LENGTH_SHORT).show();
} catch (Exception e) {

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import androidx.appcompat.app.AppCompatActivity;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.os.Build;
import android.os.Bundle;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import static android.content.ContentValues.TAG;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import android.app.AppOpsManager;
import android.app.NotificationChannel;
@ -29,6 +29,7 @@ import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Tracks;
import com.google.android.exoplayer2.audio.AudioAttributes;
import com.google.android.exoplayer2.database.StandaloneDatabaseProvider;
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector;
@ -126,10 +127,17 @@ public class VideoPlayer extends AppCompatActivity {
mediaSessionConnector.setPlayer(player);
mediaSession.setActive(true);
evictor = new LeastRecentlyUsedCacheEvictor(maxCacheSize);
simpleCache = new SimpleCache(
new File(this.getFilesDir(), "media"),
evictor,
standaloneDatabaseProvider);
if(SdcardCheck.isInstalledOnSdCard(this)) {
simpleCache = new SimpleCache(
new File(this.getExternalFilesDirs(null)[this.getExternalFilesDirs(null).length-1], "media"),
evictor,
standaloneDatabaseProvider);
} else {
simpleCache = new SimpleCache(
new File(this.getFilesDir(), "media"),
evictor,
standaloneDatabaseProvider);
}
playerView.setPlayer(player);
control = new StyledPlayerView.ControllerVisibilityListener() {
@Override
@ -155,36 +163,19 @@ public class VideoPlayer extends AppCompatActivity {
playerNotificationManager.setPlayer(player);
if (isplaylist) {
for (int i = 0; i < queue.size(); i++) {
if (names.get(i).endsWith(".m3u8")) {
MediaItem mediaItem = MediaItem.fromUri(Share.URLify(queue.get(i)));
player.addMediaItem(mediaItem);
} else {
mediaSource = new ProgressiveMediaSource.Factory(
new CacheDataSource.Factory()
.setCache(simpleCache)
.setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
.setUserAgent("S3 Manager"))
.setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
).createMediaSource(MediaItem.fromUri(Share.URLify(queue.get(i))));
player.addMediaSource(mediaSource);
}
MediaItem mediaItem = MediaItem.fromUri(Share.URLify(queue.get(i)));
player.addMediaItem(mediaItem);
}
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
player.prepare();
player.seekTo(names.indexOf(title), 0);
} else {
if (title.endsWith(".m3u8")) {
MediaItem mediaItem = MediaItem.fromUri(Share.URLify(videoURL));
player.setMediaItem(mediaItem);
} else {
mediaSource = new ProgressiveMediaSource.Factory(
new CacheDataSource.Factory()
.setCache(simpleCache)
.setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
.setUserAgent("S3 Manager"))
.setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
).createMediaSource(MediaItem.fromUri(Share.URLify(videoURL)));
player.setMediaSource(mediaSource);
try {
player.seekTo(names.indexOf(title), 0);
}catch (Exception e) {
System.out.println("Playing m3u file");
}
} else {
MediaItem mediaItem = MediaItem.fromUri(Share.URLify(videoURL));
player.setMediaItem(mediaItem);
player.prepare();
}
// Start the playback.
@ -206,6 +197,14 @@ public class VideoPlayer extends AppCompatActivity {
}
}
@Override
public void onTracksChanged(Tracks tracks) {
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
Player.Listener.super.onTracksChanged(tracks);
}
});
@ -224,9 +223,6 @@ public class VideoPlayer extends AppCompatActivity {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
} else if (state == 2) {
// Buffering.
//Acquiring WakeLock and WifiLock if not held
@ -238,9 +234,6 @@ public class VideoPlayer extends AppCompatActivity {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
} else {
//Player inactive
//Releasing WifiLock and WakeLock if held
@ -329,12 +322,12 @@ public class VideoPlayer extends AppCompatActivity {
@Override
public void onDestroy() {
if (!mWifiLock.isHeld()) {
mWifiLock.acquire();
if (mWifiLock.isHeld()) {
mWifiLock.release();
//System.out.println("WifiLock acquired");
}
if (!mWakeLock.isHeld()) {
mWakeLock.acquire();
if (mWakeLock.isHeld()) {
mWakeLock.release();
//System.out.println("WakeLock acquired");
}
mediaSessionConnector.setPlayer(null);
@ -374,36 +367,14 @@ public class VideoPlayer extends AppCompatActivity {
if (isplaylist) {
player.clearMediaItems();
for (int i = 0; i < queue.size(); i++) {
if (names.get(i).endsWith(".m3u8")) {
MediaItem mediaItem = MediaItem.fromUri(queue.get(i));
player.addMediaItem(mediaItem);
} else {
mediaSource = new ProgressiveMediaSource.Factory(
new CacheDataSource.Factory()
.setCache(simpleCache)
.setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
.setUserAgent("S3 Manager"))
.setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
).createMediaSource(MediaItem.fromUri(Uri.parse(queue.get(i))));
player.addMediaSource(mediaSource);
}
MediaItem mediaItem = MediaItem.fromUri(queue.get(i));
player.addMediaItem(mediaItem);
}
player.prepare();
player.seekTo(names.indexOf(title), 0);
} else {
if (title.endsWith(".m3u8")) {
MediaItem mediaItem = MediaItem.fromUri(videoURL);
player.setMediaItem(mediaItem);
} else {
mediaSource = new ProgressiveMediaSource.Factory(
new CacheDataSource.Factory()
.setCache(simpleCache)
.setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
.setUserAgent("S3 Manager"))
.setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
).createMediaSource(MediaItem.fromUri(Uri.parse(videoURL)));
player.setMediaSource(mediaSource);
}
MediaItem mediaItem = MediaItem.fromUri(videoURL);
player.setMediaItem(mediaItem);
player.prepare();
}
// Start the playback.

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import androidx.appcompat.app.AppCompatActivity;

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import androidx.appcompat.app.AppCompatActivity;

View file

@ -20,7 +20,8 @@
android:layout_height="wrap_content"
android:text="@string/videocache"
android:textAlignment="center"
android:textSize="25sp"/>
android:textSize="25sp"
android:visibility="gone" />
<EditText
android:id="@+id/videocache"
@ -29,13 +30,15 @@
android:focusable="true"
android:hint="@string/videocache"
android:inputType="number"
android:textColorHint="?attr/colorOnSecondary"/>
android:textColorHint="?attr/colorOnSecondary"
android:visibility="gone" />
<Button
android:id="@+id/clearcache"
android:layout_width="match_parent"
android:layout_height="70dp"
android:text="@string/clearcache" />
android:text="@string/clearcache"
android:visibility="gone" />
<TextView
android:layout_width="match_parent"

View file

@ -1,4 +1,4 @@
package asgardius.page.s3manager;
package asgardius.page.s3managermk2;
import org.junit.Test;

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'com.android.application' version '8.5.2' apply false
id 'com.android.library' version '8.5.2' apply false
}
task clean(type: Delete) {

View file

@ -0,0 +1 @@
* Fix wakelock not being released at closing video player

View file

@ -0,0 +1 @@
* M3U Playlist support

View file

@ -0,0 +1 @@
* Fix UI issue at media player screen

View file

@ -0,0 +1 @@
* Libraries updated

View file

@ -0,0 +1 @@
* Upgrade libraries

View file

@ -0,0 +1 @@
* Allow move app to SD Card

View file

@ -0,0 +1,2 @@
* Dependencies upgraded
* Fixed large file list being truncate

View file

@ -46,7 +46,7 @@ Known supported providers
<li>Amazon Web Services</li>
<li>Scaleway Elements</li>
<li>Wasabi Cloud</li>
<li>Wasabi Cloud (Provider broke access control intentionally since March 13 2023)</li>
<li>Backblaze B2</li>
<li>Cloudflare R2 (partial)</li>
<li>MinIO **</li>
@ -60,9 +60,7 @@ Known not supported providers
** Extra steps required (read documentation)
Please report all issues at https://forum.asgardius.company/t/s3-manager
You can find app documentation at https://wiki.asgardius.company/shelves/asgardius-s3-manager-english (english) or https://wiki.asgardius.company/shelves/asgardius-s3-manager-espanol (spanish)
This app has nonfreenet antifeature because its compatibility list.
https://wiki-es.asgardius.company/index.php?title=Documentacion_Asgardius_S3_Manager
You can find app documentation at https://wiki-en.asgardius.company/index.php?title=Asgardius_S3_Manager_Documentation (english) or https://wiki-es.asgardius.company/index.php?title=Documentacion_Asgardius_S3_Manager (spanish)
You can use MinIO or Garage to have a FOSS selfhosted server to use with this app

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -18,4 +18,6 @@ android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false

View file

@ -1,6 +1,6 @@
#Sat Aug 27 12:12:23 MST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME