- Cleanup

- Removed play services
This commit is contained in:
Stefan Schueller 2018-11-13 21:04:06 +01:00
parent 91d4b0c9ad
commit f8cfd7ea8c
7 changed files with 69 additions and 69 deletions

View File

@ -9,6 +9,49 @@ android {
versionCode 103 versionCode 103
versionName "1.0.3" versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Layouts and design
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:support-v13:28.0.0'
// font awesome
implementation 'com.blackboardtheory:android-iconify-fontawesome:3.0.1-SNAPSHOT'
// BottomNavigationViewEx -> https://github.com/ittianyu/BottomNavigationViewEx
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.2'
// http client / REST
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
// image downloading and caching library
implementation 'com.squareup.picasso:picasso:2.5.2'
// json decoder/encoder
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
// Torrents and WebRTC
implementation 'com.github.TorrentStream:TorrentStream-Android:2.5.0'
// implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1"
// implementation 'org.webrtc:google-webrtc:1.0.+'
// video player
implementation 'com.google.android.exoplayer:exoplayer:2.8.1'
// implementation 'com.devbrackets.android:exomedia:4.1.0'
// testing
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
} }
buildTypes { buildTypes {
release { release {
@ -26,40 +69,3 @@ android {
} }
} }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.code.gson:gson:2.8.2'
// implementation 'org.webrtc:google-webrtc:1.0.+'
implementation 'com.android.support:design:28.0.0'
// BottomNavigationViewEx -> https://github.com/ittianyu/BottomNavigationViewEx
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.2'
implementation 'com.blackboardtheory:android-iconify-fontawesome:3.0.1-SNAPSHOT'
implementation 'com.github.TorrentStream:TorrentStream-Android:2.5.0'
implementation 'com.google.android.exoplayer:exoplayer:2.8.1'
// implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1"
// implementation 'com.devbrackets.android:exomedia:4.1.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

View File

@ -37,9 +37,9 @@ public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
return getDelegate().getSupportActionBar(); return getDelegate().getSupportActionBar();
} }
public void setSupportActionBar(@Nullable Toolbar toolbar) { // public void setSupportActionBar(@Nullable Toolbar toolbar) {
getDelegate().setSupportActionBar(toolbar); // getDelegate().setSupportActionBar(toolbar);
} // }
@Override @Override
public MenuInflater getMenuInflater() { public MenuInflater getMenuInflater() {

View File

@ -11,10 +11,10 @@ import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import net.schueller.peertube.R; import net.schueller.peertube.R;
import net.schueller.peertube.adapter.VideoAdapter; import net.schueller.peertube.adapter.VideoAdapter;
import net.schueller.peertube.helper.APIUrlHelper; import net.schueller.peertube.helper.APIUrlHelper;

View File

@ -4,19 +4,14 @@ import android.annotation.TargetApi;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.Preference; import android.preference.Preference;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.preference.PreferenceFragment; import android.preference.PreferenceFragment;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.view.MenuItem; import android.view.MenuItem;
import net.schueller.peertube.R; import net.schueller.peertube.R;
import java.util.List; import java.util.List;

View File

@ -8,7 +8,6 @@ import android.content.pm.PackageManager;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
@ -22,10 +21,10 @@ import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException; //import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException; //import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.common.GooglePlayServicesUtil; //import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.security.ProviderInstaller; //import com.google.android.gms.security.ProviderInstaller;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx; import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;
import com.joanzapata.iconify.IconDrawable; import com.joanzapata.iconify.IconDrawable;
import com.joanzapata.iconify.Iconify; import com.joanzapata.iconify.Iconify;
@ -95,6 +94,9 @@ public class VideoListActivity extends AppCompatActivity {
//Log.v(TAG, "navigation_account"); //Log.v(TAG, "navigation_account");
Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show(); Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this, LoginActivity.class);
this.startActivity(intent);
return false; return false;
} }
return false; return false;
@ -116,14 +118,14 @@ public class VideoListActivity extends AppCompatActivity {
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
// fix android trying to use SSLv3 for handshake // fix android trying to use SSLv3 for handshake
updateAndroidSecurityProvider(this); // updateAndroidSecurityProvider(this);
// Bottom Navigation // Bottom Navigation
BottomNavigationViewEx navigation = findViewById(R.id.navigation); BottomNavigationViewEx navigation = findViewById(R.id.navigation);
navigation.enableAnimation(false); navigation.enableAnimation(false);
navigation.enableShiftingMode(false); navigation.setLabelVisibilityMode(1); // enableShiftingMode
navigation.enableItemShiftingMode(false); navigation.setItemHorizontalTranslationEnabled(false); // enableItemShiftingMode
Menu navMenu = navigation.getMenu(); Menu navMenu = navigation.getMenu();
navMenu.findItem(R.id.navigation_home).setIcon( navMenu.findItem(R.id.navigation_home).setIcon(
@ -278,19 +280,19 @@ public class VideoListActivity extends AppCompatActivity {
/** /**
* Force android to not use SSLv3 * Force android to not use SSLv3
* *
* @param callingActivity Activity // * @param callingActivity Activity
*/ */
private void updateAndroidSecurityProvider(Activity callingActivity) { // private void updateAndroidSecurityProvider(Activity callingActivity) {
try { // try {
ProviderInstaller.installIfNeeded(this); // ProviderInstaller.installIfNeeded(this);
} catch (GooglePlayServicesRepairableException e) { // } catch (GooglePlayServicesRepairableException e) {
// Thrown when Google Play Services is not installed, up-to-date, or enabled // // Thrown when Google Play Services is not installed, up-to-date, or enabled
// Show dialog to allow users to install, update, or otherwise enable Google Play services. // // Show dialog to allow users to install, update, or otherwise enable Google Play services.
GooglePlayServicesUtil.getErrorDialog(e.getConnectionStatusCode(), callingActivity, 0); // GooglePlayServicesUtil.getErrorDialog(e.getConnectionStatusCode(), callingActivity, 0);
} catch (GooglePlayServicesNotAvailableException e) { // } catch (GooglePlayServicesNotAvailableException e) {
Log.e("SecurityException", "Google Play Services not available."); // Log.e("SecurityException", "Google Play Services not available.");
} // }
} // }
@Override @Override
protected void onResume() { protected void onResume() {

View File

@ -15,7 +15,6 @@ import android.view.Surface;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;

View File

@ -2,8 +2,6 @@ package net.schueller.peertube.adapter;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;