update strings file

This commit is contained in:
Page Asgardius 2022-09-02 12:32:02 -07:00
parent adb74f8c3b
commit 46fad327d0
2 changed files with 15 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.Toast; import android.widget.Toast;
@ -17,11 +18,13 @@ 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.Bucket;
import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest;
import com.amazonaws.services.s3.model.ListObjectsV2Result; 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.S3Object;
import com.amazonaws.services.s3.model.S3ObjectSummary; import com.amazonaws.services.s3.model.S3ObjectSummary;
import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -116,6 +119,9 @@ public class ObjectSelect extends AppCompatActivity {
public void onClick(View view, int position) { public void onClick(View view, int position) {
System.out.println("Click on "+Name.get(position).toString()); System.out.println("Click on "+Name.get(position).toString());
//explorer(Name.get(position).toString()); //explorer(Name.get(position).toString());
GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, Name.get(position).toString());
URL objectURL = s3client.generatePresignedUrl(request);
videoplayer(objectURL.toString());
} }
@Override @Override
@ -124,4 +130,12 @@ public class ObjectSelect extends AppCompatActivity {
} }
})); }));
} }
private void videoplayer(String url) {
Intent intent = new Intent(this, VideoPlayer.class);
intent.putExtra("video_url", url);
startActivity(intent);
}
} }

View file

@ -1,7 +1,7 @@
<resources> <resources>
<string name="app_name">Asgardius S3 Manager</string> <string name="app_name">Asgardius S3 Manager</string>
<string name="title_activity_video_player">VideoPlayer</string> <string name="title_activity_video_player">VideoPlayer</string>
<!-- don't forget removing s3 credentials before creating a git commit --> <!-- S3 credentials are being used during development process and will become useless when account manager is ready -->
<string name="endpoint_url">https://object.asgardius.company</string> <string name="endpoint_url">https://object.asgardius.company</string>
<string name="access_key">asgardius</string> <string name="access_key">asgardius</string>
<string name="secret_key">DTMp5kftamr49Ke7</string> <string name="secret_key">DTMp5kftamr49Ke7</string>