-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5cfa35d
Showing
435 changed files
with
92,723 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
keystore.properties | ||
.idea/caches/*.* | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
def keystorePropertiesFile = rootProject.file("keystore.properties") | ||
def keystoreProperties = new Properties() | ||
|
||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||
|
||
android { | ||
signingConfigs { | ||
config { | ||
keyAlias keystoreProperties['keyAlias'] | ||
keyPassword keystoreProperties['keyPassword'] | ||
storeFile file(keystoreProperties['storeFile']) | ||
storePassword keystoreProperties['storePassword'] | ||
} | ||
} | ||
compileSdkVersion 28 | ||
defaultConfig { | ||
applicationId "com.kristurek.polskatv" | ||
minSdkVersion 22 | ||
targetSdkVersion 28 | ||
versionCode 100 | ||
versionName "100" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
multiDexEnabled true | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
signingConfig signingConfigs.config | ||
} | ||
debug { | ||
signingConfig signingConfigs.config | ||
} | ||
} | ||
dataBinding { | ||
enabled = true | ||
} | ||
android.applicationVariants.all { variant -> | ||
variant.outputs.all { output -> | ||
outputFileName = "polskatv-${variant.versionCode}.apk" | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
sourceSets.test.resources.srcDirs += ["src/test/resources"] | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
implementation 'androidx.appcompat:appcompat:1.0.2' | ||
|
||
implementation 'androidx.preference:preference:1.0.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' | ||
//implementation 'androidx.databinding:databinding-compiler:3.4.0' | ||
|
||
implementation 'com.squareup.retrofit2:retrofit:2.5.0' | ||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0' | ||
implementation 'com.squareup.okhttp3:okhttp:3.14.1' | ||
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.14.1' | ||
|
||
implementation 'joda-time:joda-time:2.10.2' | ||
implementation 'org.greenrobot:eventbus:3.1.1' | ||
implementation 'org.apache.commons:commons-text:1.6' | ||
implementation 'org.apache.commons:commons-collections4:4.3' | ||
implementation 'com.dropbox.core:dropbox-core-sdk:3.1.1' | ||
api 'com.google.guava:guava:27.1-android' | ||
|
||
annotationProcessor 'com.google.dagger:dagger-compiler:2.22.1' | ||
implementation 'com.google.dagger:dagger:2.22.1' | ||
|
||
androidTestImplementation 'androidx.test:runner:1.2.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
|
||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.mockito:mockito-core:2.26.0' | ||
testImplementation 'org.mockito:mockito-inline:2.26.0' | ||
testImplementation 'com.squareup.retrofit2:retrofit-mock:2.2.0' | ||
testImplementation 'com.squareup.okhttp3:mockwebserver:3.14.1' | ||
testImplementation 'org.hamcrest:hamcrest-library:2.1' | ||
|
||
implementation "io.reactivex.rxjava2:rxjava:2.2.6" | ||
implementation "io.reactivex.rxjava2:rxandroid:2.1.1" | ||
|
||
implementation 'com.google.android.exoplayer:exoplayer-core:2.10.+' | ||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.10.+' | ||
|
||
implementation 'com.google.android.material:material:1.0.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class title to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file title. | ||
#-renamesourcefileattribute SourceFile | ||
-keepattributes *Annotation* | ||
-keepclassmembers class ** { | ||
@org.greenrobot.eventbus.Subscribe <methods>; | ||
} | ||
-keep enum org.greenrobot.eventbus.ThreadMode { *; } |
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/com/kristurek/polskatv/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.kristurek.polskatv; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.InstrumentationRegistry; | ||
import androidx.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("com.kristurek.polskatv", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.kristurek.polskatv"> | ||
|
||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" /> | ||
|
||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
|
||
<application | ||
android:name=".PolskaTvApplication" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:largeHeap="true" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:usesCleartextTraffic="true"> | ||
|
||
<activity | ||
android:name=".ui.settings.SettingsActivity" | ||
android:theme="@style/PolskaTv.Theme.Fullscreen.NoActionBar" /> | ||
<activity | ||
android:name=".ui.forceclose.ForceCloseActivity" | ||
android:theme="@style/PolskaTv.Theme.Fullscreen.NoActionBar" /> | ||
<activity | ||
android:name=".ui.main.MainActivity" | ||
android:theme="@style/PolskaTv.Theme.Fullscreen.NoActionBar" /> | ||
<activity | ||
android:name=".ui.login.LoginActivity" | ||
android:theme="@style/PolskaTv.Theme.Transparent.NoActionBar"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<service | ||
android:name=".ui.update.UpdateIntentService" | ||
android:exported="false" /> | ||
|
||
<provider | ||
android:name="androidx.core.content.FileProvider" | ||
android:authorities="${applicationId}.fileprovider" | ||
android:exported="false" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/file_provider_paths" /> | ||
</provider> | ||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
app/src/main/java/com/kristurek/polskatv/PolskaTvApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.kristurek.polskatv; | ||
|
||
import android.content.Intent; | ||
|
||
import com.kristurek.polskatv.iptv.core.IptvService; | ||
import com.kristurek.polskatv.service.DiagnosticService; | ||
import com.kristurek.polskatv.service.LoggerService; | ||
import com.kristurek.polskatv.service.PreferencesService; | ||
import com.kristurek.polskatv.service.RemoteServerService; | ||
import com.kristurek.polskatv.ui.arch.ViewModelFactory; | ||
import com.kristurek.polskatv.ui.update.UpdateIntentService; | ||
import com.kristurek.polskatv.util.DateTimeHelper; | ||
import com.kristurek.polskatv.util.FontHelper; | ||
|
||
import javax.inject.Inject; | ||
|
||
public class PolskaTvApplication extends android.app.Application { | ||
|
||
private static PolskaTvComponent component; | ||
|
||
@Inject | ||
public PreferencesService prefService; | ||
@Inject | ||
public IptvService iptvService; | ||
@Inject | ||
public RemoteServerService remoteService; | ||
@Inject | ||
public LoggerService logService; | ||
@Inject | ||
public DiagnosticService diagService; | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
|
||
component = DaggerPolskaTvComponent.builder().polskaTvModule(new PolskaTvModule(this)).build(); | ||
|
||
PolskaTvApplication.getComponent().inject(this); | ||
|
||
ViewModelFactory.initialize(this, iptvService, prefService, remoteService, logService, diagService); | ||
|
||
DateTimeHelper.setSelectedTimeZoneId(prefService.get(PreferencesService.KEYS.APPLICATION_TIME_ZONE, DateTimeHelper.DEFAULT_TIME_ZONE_ID)); | ||
FontHelper.setFontSize(prefService.get(PreferencesService.KEYS.APPLICATION_FONT_SIZE, FontHelper.DEFAULT_FONT_SIZE)); | ||
|
||
startService(new Intent(this, UpdateIntentService.class)); | ||
} | ||
|
||
public static PolskaTvComponent getComponent() { | ||
return component; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/kristurek/polskatv/PolskaTvComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.kristurek.polskatv; | ||
|
||
import com.kristurek.polskatv.ui.channels.ChannelsFragment; | ||
import com.kristurek.polskatv.ui.forceclose.ForceCloseActivity; | ||
import com.kristurek.polskatv.ui.login.LoginFragment; | ||
import com.kristurek.polskatv.ui.settings.SettingsFragment; | ||
import com.kristurek.polskatv.ui.update.UpdateIntentService; | ||
|
||
import javax.inject.Singleton; | ||
|
||
import dagger.Component; | ||
|
||
@Singleton | ||
@Component(modules = PolskaTvModule.class) | ||
public interface PolskaTvComponent { | ||
|
||
void inject(PolskaTvApplication obj); | ||
|
||
void inject(LoginFragment obj); | ||
|
||
void inject(ChannelsFragment obj); | ||
|
||
void inject(SettingsFragment obj); | ||
|
||
void inject(UpdateIntentService updateIntentService); | ||
|
||
void inject(ForceCloseActivity forceCloseActivity); | ||
} |
75 changes: 75 additions & 0 deletions
75
app/src/main/java/com/kristurek/polskatv/PolskaTvModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.kristurek.polskatv; | ||
|
||
import android.content.Context; | ||
|
||
import com.kristurek.polskatv.iptv.core.IptvService; | ||
import com.kristurek.polskatv.iptv.polskatelewizjausa.PolskaTelewizjaUsaService; | ||
import com.kristurek.polskatv.iptv.polskatelewizjausa.PolskaTelewizjaUsaServiceMock; | ||
import com.kristurek.polskatv.iptv.polskatelewizjausa.retrofit.PolskaTelewizjaUsaApiFactory; | ||
import com.kristurek.polskatv.service.DiagnosticService; | ||
import com.kristurek.polskatv.service.LoggerService; | ||
import com.kristurek.polskatv.service.PreferencesService; | ||
import com.kristurek.polskatv.service.RemoteServerService; | ||
import com.kristurek.polskatv.service.impl.PolskaTvDiagnosticService; | ||
import com.kristurek.polskatv.service.impl.PolskaTvLoggerService; | ||
import com.kristurek.polskatv.service.impl.PolskaTvPreferencesService; | ||
import com.kristurek.polskatv.service.impl.PolskaTvRemoteServerService; | ||
|
||
import javax.inject.Singleton; | ||
|
||
import dagger.Module; | ||
import dagger.Provides; | ||
|
||
@Module | ||
public class PolskaTvModule { | ||
|
||
private Context context; | ||
|
||
public PolskaTvModule(Context context) { | ||
this.context = context; | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
Context provideContext() { | ||
return context; | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
IptvService provideApiService() { | ||
return new PolskaTelewizjaUsaService(PolskaTelewizjaUsaApiFactory.create()); | ||
} | ||
|
||
@Singleton | ||
//@Provides | ||
IptvService provideMockApiService() { | ||
return new PolskaTelewizjaUsaServiceMock(context); | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
PreferencesService providePrefService() { | ||
return new PolskaTvPreferencesService(context); | ||
} | ||
|
||
|
||
@Singleton | ||
@Provides | ||
RemoteServerService provideRemoteServerService() { | ||
return new PolskaTvRemoteServerService(); | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
LoggerService provideLoggerService() { | ||
return new PolskaTvLoggerService(); | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
DiagnosticService provideDiagnosticService() { | ||
return new PolskaTvDiagnosticService(context, providePrefService()); | ||
} | ||
|
||
} |
Oops, something went wrong.