about page template
This commit is contained in:
parent
9f271ca6fe
commit
c890eab786
6 changed files with 31 additions and 19 deletions
|
@ -11,7 +11,7 @@
|
||||||
<entry key="app/src/main/res/layout/activity_file_share.xml" value="0.19610507246376813" />
|
<entry key="app/src/main/res/layout/activity_file_share.xml" value="0.19610507246376813" />
|
||||||
<entry key="app/src/main/res/layout/activity_image_viewer.xml" value="0.19610507246376813" />
|
<entry key="app/src/main/res/layout/activity_image_viewer.xml" value="0.19610507246376813" />
|
||||||
<entry key="app/src/main/res/layout/activity_list_item.xml" value="0.19610507246376813" />
|
<entry key="app/src/main/res/layout/activity_list_item.xml" value="0.19610507246376813" />
|
||||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />
|
<entry key="app/src/main/res/layout/activity_main.xml" value="0.20260416666666667" />
|
||||||
<entry key="app/src/main/res/layout/activity_object_select.xml" value="0.1" />
|
<entry key="app/src/main/res/layout/activity_object_select.xml" value="0.1" />
|
||||||
<entry key="app/src/main/res/layout/activity_text_viewer.xml" value="0.19610507246376813" />
|
<entry key="app/src/main/res/layout/activity_text_viewer.xml" value="0.19610507246376813" />
|
||||||
<entry key="app/src/main/res/layout/activity_uploader.xml" value="0.20260416666666667" />
|
<entry key="app/src/main/res/layout/activity_uploader.xml" value="0.20260416666666667" />
|
||||||
|
|
9
app/src/main/assets/about.htm
Normal file
9
app/src/main/assets/about.htm
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<Html>
|
||||||
|
<Head>
|
||||||
|
<Title>Reserved</Title>
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
|
</Head>
|
||||||
|
<Body>
|
||||||
|
<H1>Reserved</H1>
|
||||||
|
</Body>
|
||||||
|
</Html>
|
|
@ -201,11 +201,12 @@ public class MainActivity extends AppCompatActivity {
|
||||||
});
|
});
|
||||||
|
|
||||||
//This is to launch file explorer test
|
//This is to launch file explorer test
|
||||||
Button explorertest = (Button)findViewById(R.id.ltest);
|
Button about = (Button)findViewById(R.id.ltest);
|
||||||
explorertest.setOnClickListener(new View.OnClickListener(){
|
about.setOnClickListener(new View.OnClickListener(){
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
//buttonaction
|
//buttonaction
|
||||||
|
aboutPage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -235,4 +236,12 @@ public class MainActivity extends AppCompatActivity {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void aboutPage () {
|
||||||
|
|
||||||
|
Intent intent = new Intent(this, WebBrowser.class);
|
||||||
|
intent.putExtra("web_url", "file:///android_asset/about.htm");
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,8 +1,5 @@
|
||||||
package asgardius.page.s3manager;
|
package asgardius.page.s3manager;
|
||||||
|
|
||||||
import static com.amazonaws.regions.Regions.US_EAST_1;
|
|
||||||
import static com.amazonaws.regions.Regions.US_WEST_1;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
@ -24,15 +21,11 @@ import com.amazonaws.regions.Region;
|
||||||
import com.amazonaws.services.s3.AmazonS3;
|
import com.amazonaws.services.s3.AmazonS3;
|
||||||
import com.amazonaws.services.s3.AmazonS3Client;
|
import com.amazonaws.services.s3.AmazonS3Client;
|
||||||
import com.amazonaws.services.s3.S3ClientOptions;
|
import com.amazonaws.services.s3.S3ClientOptions;
|
||||||
import com.amazonaws.services.s3.model.Bucket;
|
|
||||||
import com.amazonaws.services.s3.model.DeleteObjectRequest;
|
import com.amazonaws.services.s3.model.DeleteObjectRequest;
|
||||||
import com.amazonaws.services.s3.model.DeleteObjectsRequest;
|
import com.amazonaws.services.s3.model.DeleteObjectsRequest;
|
||||||
import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest;
|
import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest;
|
||||||
import com.amazonaws.services.s3.model.ListObjectsRequest;
|
import com.amazonaws.services.s3.model.ListObjectsRequest;
|
||||||
import com.amazonaws.services.s3.model.ListObjectsV2Request;
|
|
||||||
import com.amazonaws.services.s3.model.ListObjectsV2Result;
|
|
||||||
import com.amazonaws.services.s3.model.ObjectListing;
|
import com.amazonaws.services.s3.model.ObjectListing;
|
||||||
import com.amazonaws.services.s3.model.S3Object;
|
|
||||||
import com.amazonaws.services.s3.model.S3ObjectSummary;
|
import com.amazonaws.services.s3.model.S3ObjectSummary;
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
@ -213,7 +206,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
try {
|
try {
|
||||||
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
||||||
URL objectURL = s3client.generatePresignedUrl(request);
|
URL objectURL = s3client.generatePresignedUrl(request);
|
||||||
imageviewer(objectURL.toString());
|
imageViewer(objectURL.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -222,7 +215,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
try {
|
try {
|
||||||
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
||||||
URL objectURL = s3client.generatePresignedUrl(request);
|
URL objectURL = s3client.generatePresignedUrl(request);
|
||||||
textviewer(objectURL.toString());
|
textViewer(objectURL.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +224,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
try {
|
try {
|
||||||
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
||||||
URL objectURL = s3client.generatePresignedUrl(request);
|
URL objectURL = s3client.generatePresignedUrl(request);
|
||||||
webbrowser(objectURL.toString());
|
webBrowser(objectURL.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -240,7 +233,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
try {
|
try {
|
||||||
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString());
|
||||||
URL objectURL = s3client.generatePresignedUrl(request);
|
URL objectURL = s3client.generatePresignedUrl(request);
|
||||||
videoplayer(objectURL.toString());
|
videoPlayer(objectURL.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getApplicationContext(),getResources().getString(R.string.media_list_fail), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -320,14 +313,14 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void videoplayer(String url) {
|
private void videoPlayer(String url) {
|
||||||
|
|
||||||
Intent intent = new Intent(this, VideoPlayer.class);
|
Intent intent = new Intent(this, VideoPlayer.class);
|
||||||
intent.putExtra("video_url", url);
|
intent.putExtra("video_url", url);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
}
|
}
|
||||||
private void textviewer(String url) {
|
private void textViewer(String url) {
|
||||||
|
|
||||||
Intent intent = new Intent(this, TextViewer.class);
|
Intent intent = new Intent(this, TextViewer.class);
|
||||||
intent.putExtra("video_url", url);
|
intent.putExtra("video_url", url);
|
||||||
|
@ -335,7 +328,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void imageviewer(String url) {
|
private void imageViewer(String url) {
|
||||||
|
|
||||||
Intent intent = new Intent(this, ImageViewer.class);
|
Intent intent = new Intent(this, ImageViewer.class);
|
||||||
intent.putExtra("video_url", url);
|
intent.putExtra("video_url", url);
|
||||||
|
@ -343,7 +336,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void webbrowser (String url) {
|
private void webBrowser(String url) {
|
||||||
|
|
||||||
Intent intent = new Intent(this, WebBrowser.class);
|
Intent intent = new Intent(this, WebBrowser.class);
|
||||||
intent.putExtra("web_url", url);
|
intent.putExtra("web_url", url);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/dummy_button"
|
android:text="@string/about_button"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints"
|
||||||
style="?android:attr/buttonStyle" />
|
style="?android:attr/buttonStyle" />
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
<string name="media_conn_fail">Cannot retrieve remote file</string>
|
<string name="media_conn_fail">Cannot retrieve remote file</string>
|
||||||
<string name="media_wrong_type">Invalid media file</string>
|
<string name="media_wrong_type">Invalid media file</string>
|
||||||
<string name="media_list_fail">Cannot connect to server</string>
|
<string name="media_list_fail">Cannot connect to server</string>
|
||||||
|
<string name="about_button">About this app</string>
|
||||||
<string name="dummy_button">Dummy Button</string>
|
<string name="dummy_button">Dummy Button</string>
|
||||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in a new issue