Skip to content

Commit

Permalink
Merged the android-tv to beta (#231)
Browse files Browse the repository at this point in the history
* Added a redirect activity. (#220)

Login, Main and Introduction activities for Android TV

* Removed hardcoded strings and improved code readability, indentation etc (#221)

* Improved structuring of TV app code, added settings layout, fixed the filtered servers bug and implemented sign out. (#222)

* Implemented the MainTvFragment. (#223)

* Integrated Shares as a HeaderItem and its content as ListRowItem. Removed Apps(Permanently) and settings(temporary)

Moved the isATV() and Preferences code to the util/Preference.java

Implmented ViewStubs.

Fixed the ServerFileActivity crash in the android app.

Moved the isATV to a different class CheckAtv in the util package

Added the settings activity in the MainTVFragment

Implemented Sign-out, connection and sign-out preferences.

Removed fragment callback to improve structure.

Added network calls and made the TV independent of external fragment callbacks.

Added settings and separator.

Implemented the sort algorithm in the MainTVFragment

server select under construction.

Reformatted the code and improved the indentation, spacing etc

* Reformatted code and improved indentation.

* not complete yet.

* Implemented the Server selection setting.

* Improved reformating and indentation.

* Handles the fileOpening at the MainTVActivity (#226)

Fixed the server selection bug.

* Added browsing functionality to the TV app and merged beta into android-tv (#227)

* Video player updates (#216)

* adds subtitle view in video player

* adds buffer percentage and error toast

* adds subtitle fetch and display

* resolves buggy video player controls

* Updates mime type support for subs and disable them (#224)

(cherry picked from commit a3bfc9c)

* Feature swipe gestures (#225)

* Adds swipe gestures

* adds GestureDetector

* adds functions to update volume, seek, brightness

* minor fixes for smooth gestures

* size of the progress bar and minor looks changed

* resolves minor issues

- resolves video controls opening at the end of swipe gestures
- move seek text to the bottom of the video

* Added the ServerFileTvActivity

* User can successfully browse the content of the shares now.

* Improved code indentation and reformatting.

* Fixed the crash in the while opening a file during browsing.
  • Loading branch information
octacode authored and cpg committed Jun 23, 2017
1 parent 5b567ec commit 6a58c9d
Show file tree
Hide file tree
Showing 47 changed files with 2,775 additions and 290 deletions.
23 changes: 12 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ android {
versionName buildVersionName(versionMajor, versionMinor, versionPatch)
versionCode buildVersionCode(versionMajor, versionMinor, versionPatch)

minSdkVersion 15
minSdkVersion 17
targetSdkVersion 25

def apiFile = file("api.properties")
Expand Down Expand Up @@ -111,26 +111,27 @@ dependencies {
compile "com.android.support:design:${SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:preference-v7:${SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:customtabs:${SUPPORT_LIBRARY_VERSION}"
compile "com.github.dmytrodanylyk.android-process-button:library:1.0.4"
compile "com.jakewharton.timber:timber:4.5.1"
compile "com.squareup.dagger:dagger:1.2.5"
compile "com.squareup:otto:1.3.8"
compile 'com.github.bumptech.glide:glide:3.7.0'
compile "com.squareup.retrofit2:retrofit:2.2.0"
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
compile "org.videolan:libvlc:2.1.1"
compile "com.android.support:leanback-v17:${SUPPORT_LIBRARY_VERSION}"
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
provided "com.squareup.dagger:dagger-compiler:1.2.5"

compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'com.squareup.dagger:dagger:1.2.5'
compile 'com.squareup:otto:1.3.8'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
compile 'org.videolan:libvlc:2.1.1'
testCompile 'org.robolectric:robolectric:3.1.2'
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:shadows-multidex:3.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:25.3.1'
provided 'com.squareup.dagger:dagger-compiler:1.2.5'
}

task generateWrapper(type: Wrapper) {
Expand Down
55 changes: 47 additions & 8 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
~ You should have received a copy of the GNU General Public License
~ along with Amahi. If not, see <http ://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.amahi.anywhere"
android:installLocation="auto">
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.amahi.anywhere"
android:installLocation="auto">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
Expand All @@ -32,30 +34,50 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>

<permission android:name="android.permission.MEDIA_CONTENT_CONTROL"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />

<uses-feature
android:name="android.software.leanback"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />

<application
android:name=".AmahiApplication"
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/application_name"
android:resizeableActivity="true"
android:theme="@style/Theme.Amahi">
android:theme="@style/Theme.Amahi"
tools:ignore="MissingTvBanner">
<activity android:name=".activity.NavigationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>

<meta-data
android:name="android.max_aspect"
android:value="2.1"/>
android:value="2.1" />
</activity>
<activity android:name=".activity.ServerAppActivity"/>
<activity android:name=".activity.ServerFilesActivity">
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
android:resource="@xml/searchable" />
</activity>
<activity
android:name=".activity.ServerFileAudioActivity"
Expand Down Expand Up @@ -124,6 +146,23 @@
<activity
android:name=".activity.WebViewActivity"
android:label="@string/title_version_settings"/>

<activity
android:name=".tv.activity.MainTVActivity"
android:theme="@style/Theme.Leanback.Browse"/>

<activity android:name=".tv.activity.IntroActivity"
android:theme="@style/Theme.Leanback.Onboarding"/>

<activity android:name=".tv.activity.SettingsActivity"
android:theme="@style/Theme.Leanback.GuidedStep"/>

<activity android:name=".tv.activity.ServerFileTvActivity"
android:theme="@style/Theme.Leanback.VerticalGrid"/>

<activity android:name=".tv.activity.TVWebViewActivity"
android:theme="@style/Theme.Design.NoActionBar"/>

</application>

</manifest>
9 changes: 8 additions & 1 deletion src/main/java/org/amahi/anywhere/AmahiModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
import org.amahi.anywhere.server.ApiModule;
import org.amahi.anywhere.service.AudioService;
import org.amahi.anywhere.service.VideoService;
import org.amahi.anywhere.tv.activity.TVWebViewActivity;
import org.amahi.anywhere.tv.fragment.MainTVFragment;
import org.amahi.anywhere.tv.fragment.ServerFileTvFragment;
import org.amahi.anywhere.tv.fragment.ServerSelectFragment;

import javax.inject.Singleton;

Expand Down Expand Up @@ -73,7 +77,10 @@
ServerFileDownloadingFragment.class,
SettingsFragment.class,
AudioService.class,
VideoService.class
VideoService.class,
MainTVFragment.class,
TVWebViewActivity.class,
ServerFileTvFragment.class
}
)
class AmahiModule {
Expand Down
Loading

0 comments on commit 6a58c9d

Please sign in to comment.