add basic login activity
This commit is contained in:
parent
7252046294
commit
c963c7195b
12 changed files with 330 additions and 952 deletions
|
|
@ -6,7 +6,7 @@ android {
|
|||
buildToolsVersion '28.0.3'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
|
||||
versionCode 175
|
||||
|
|
@ -82,4 +82,7 @@ dependencies {
|
|||
implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5'
|
||||
|
||||
implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3'
|
||||
|
||||
implementation project(':apiclient')
|
||||
implementation project(':library')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,13 @@
|
|||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Phonograph.Light"
|
||||
tools:ignore="UnusedAttribute">
|
||||
<activity android:name=".ui.activities.MainActivity">
|
||||
<activity android:name=".ui.activities.MainActivity" />
|
||||
<activity android:name=".ui.activities.AlbumDetailActivity" />
|
||||
<activity android:name=".ui.activities.ArtistDetailActivity" />
|
||||
<activity android:name=".ui.activities.GenreDetailActivity" />
|
||||
<activity android:name=".ui.activities.PlaylistDetailActivity" />
|
||||
<activity android:name=".ui.activities.SearchActivity" />
|
||||
<activity android:name=".ui.activities.SplashActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.MUSIC_PLAYER" />
|
||||
|
|
@ -32,79 +38,24 @@
|
|||
<category android:name="android.intent.category.APP_MUSIC" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="content" />
|
||||
<data android:mimeType="audio/*" />
|
||||
<data android:mimeType="application/ogg" />
|
||||
<data android:mimeType="application/x-ogg" />
|
||||
<data android:mimeType="application/itunes" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="file" />
|
||||
<data android:mimeType="audio/*" />
|
||||
<data android:mimeType="application/ogg" />
|
||||
<data android:mimeType="application/x-ogg" />
|
||||
<data android:mimeType="application/itunes" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:scheme="http" />
|
||||
<data android:mimeType="audio/*" />
|
||||
<data android:mimeType="application/ogg" />
|
||||
<data android:mimeType="application/x-ogg" />
|
||||
<data android:mimeType="application/itunes" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="vnd.android.cursor.dir/playlist" />
|
||||
<data android:mimeType="vnd.android.cursor.dir/albums" />
|
||||
<data android:mimeType="vnd.android.cursor.dir/artists" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.cyanogenmod.eleven.AUDIO_PLAYER" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PICK" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.OPENABLE" />
|
||||
|
||||
<data android:mimeType="vnd.android.cursor.dir/audio" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ui.activities.AlbumDetailActivity" />
|
||||
<activity android:name=".ui.activities.ArtistDetailActivity" />
|
||||
<activity android:name=".ui.activities.GenreDetailActivity" />
|
||||
<activity android:name=".ui.activities.PlaylistDetailActivity" />
|
||||
<activity android:name=".ui.activities.SearchActivity" />
|
||||
<activity
|
||||
android:name=".ui.activities.SettingsActivity"
|
||||
android:label="@string/action_settings" />
|
||||
<activity
|
||||
android:name=".ui.activities.AboutActivity"
|
||||
android:label="@string/action_about" />
|
||||
<activity
|
||||
android:name=".ui.activities.LoginActivity"
|
||||
android:label="@string/action_login" />
|
||||
<activity
|
||||
android:name=".ui.activities.bugreport.BugReportActivity"
|
||||
android:label="@string/report_an_issue" />
|
||||
|
|
|
|||
|
|
@ -1,843 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
* {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
{style-placeholder}
|
||||
a {
|
||||
color: #{link-color};
|
||||
}
|
||||
a:active {
|
||||
color: #{link-color-active};
|
||||
}
|
||||
ol {
|
||||
list-style-position: inside;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
li {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>You can view the changelog dialog again at any time from the <i>about</i> section.</p>
|
||||
|
||||
<h3>Version 1.3.1</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Artist image mosaics</li>
|
||||
<li><b>FIX:</b> Ringtone sharing</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.3.0</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Show more information of songs, albums and artists</li>
|
||||
<li><b>NEW:</b> Option to finish last song in sleep timer</li>
|
||||
<li><b>NEW:</b> Support for Android Pie</li>
|
||||
<li><b>NEW:</b> Option for last 7 days for recently played</li>
|
||||
<li><b>FIX:</b> Artist images not loading</li>
|
||||
<li><b>IMPROVEMENT:</b> Sync translations</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.2.0</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b>Support for devices with a notch</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.1.2</h3>
|
||||
<ol>
|
||||
<li><b>FIX:</b> Crash with custom artist images</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.1.1</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Preference to turn off shuffle mode when selecting new list of songs</li>
|
||||
<li><b>FIX:</b> Fix app intro crash</li>
|
||||
<li><b>FIX:</b> Fix a crash for some artist names which contain special characters</li>
|
||||
<li><b>FIX:</b> Fix loading of very large embedded album art</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.1.0</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Select all items in a list</li>
|
||||
<li><b>NEW:</b> Export multiple playlists at once</li>
|
||||
<li><b>FIX:</b> Show unknown year consistently everywhere</li>
|
||||
<li><b>FIX:</b> Also look for png album covers in the folder</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.0.1</h3>
|
||||
<ol>
|
||||
<li><b>FIX:</b> Broken layout for super long artist names</li>
|
||||
<li><b>FIX:</b> Show "-" instead of "0" when the album year is not available</li>
|
||||
<li><b>FIX:</b> Show "Unknown Artist" when the artist name is unknown</li>
|
||||
<li><b>FIX:</b> Navigation bar button colors for light themes</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 1.0.0</h3>
|
||||
<p>This is it, Phonograph 1.0.0! We are finally out of beta, therefore many bugs were fixed and the
|
||||
album and artist pages received a brand new look.</p>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Album page redesign</li>
|
||||
<li><b>NEW:</b> Artist page redesign</li>
|
||||
<li><b>NEW:</b> Custom sort orders for titles, albums and artists</li>
|
||||
<li><b>NEW:</b> Rescan media from the navigation drawer</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
<li><b>FIX:</b> Fixed many bugs and crashes</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.9</h3>
|
||||
<ol>
|
||||
<li><b>FIX:</b> Crash on start for some users</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.8</h3>
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
<li><b>OTHER:</b> Removed all analytics</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.7</h3>
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
<li><b>IMPROVEMENT:</b> Minor improvements</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.6</h3>
|
||||
<ol>
|
||||
<li><b>FIX:</b> Broken dot animation in Playing Screen Preference</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.5</h3>
|
||||
<ol>
|
||||
<li><b>FIX:</b> Hide the tab bar when only one tab is activated</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.4</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Adaptive Icon (feedback is appreciated!)</li>
|
||||
<li><b>NEW:</b> Rearrange and/or disable library tabs</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated translations</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.3</h3>
|
||||
<ol>
|
||||
<li><b>NEW:</b> Add genre tab (thanks to arkon)</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.2</h3>
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.1</h3>
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations</li>
|
||||
<li><b>FIX:</b> Reappearing notification</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.16.0</h3>
|
||||
<ol>
|
||||
Phonograph is alive again.
|
||||
From this version on, some features are deactivated and require a one time purchase of
|
||||
Phonograph Pro.
|
||||
The source code of Phonograph is available on GitHub. You are welcome to compile the pro version
|
||||
yourself for free.
|
||||
However, if you want to support the development and receive updates through the Play Store,
|
||||
consider buying Phonograph Pro. Thank you!
|
||||
<li><b>NEW:</b> Full Android Oreo support</li>
|
||||
<li><b>NEW:</b> Folder blacklist</li>
|
||||
<li><b>NEW:</b> Manually set custom artist images</li>
|
||||
<li><b>NEW:</b> Tap to hide toolbar in now playing screen</li>
|
||||
<li><b>NEW:</b> Option to select the old notification style</li>
|
||||
<li><b>NEW:</b> Show remaining playing queue time</li>
|
||||
<li><b>NEW:</b> Album wikis</li>
|
||||
<li><b>NEW:</b> Synchronized lyrics support</li>
|
||||
<li><b>NEW:</b> New widgets</li>
|
||||
<li><b>NEW:</b> Scrollbar in playlists</li>
|
||||
<li><b>IMPROVEMENT:</b> Proper text protection in now playing screen</li>
|
||||
<li><b>IMPROVEMENT:</b> Rearrange playlist items by dragging the album cover</li>
|
||||
<li><b>IMPROVEMENT:</b> Cleaned up playlist menus</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations</li>
|
||||
<li><b>FIX:</b> Bottom bar lag on cold start</li>
|
||||
<li><b>FIX:</b> White space when expanding the classic notification</li>
|
||||
<li><b>FIX:</b> Many bug fixes</li>
|
||||
<li><b>OTHER:</b> Added Eugene Cheung to the about section for his contributions to the source code</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.15.0</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> App Shortcuts (Android Nougat only).</li>
|
||||
<li><b>IMPROVEMENT:</b> Added support for more file explorers.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.14.1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Notification won't disappear.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.14.0</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Nougat style notification for devices running Android Nougat.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated some code to newer APIs.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.6</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPORTANT:</b> Phonograph is free and open source now. <a
|
||||
href="https://github.com/kabouzeid/Phonograph">https://github.com/kabouzeid/Phonograph</a>
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.5</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Statusbar padding in navigation drawer.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Statusbar too dark.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.3-3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.3-2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.3 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.2 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added a parallax effect to the intro.</li>
|
||||
<li><b>IMPROVEMENT:</b> Better artist loading.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.1 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> New app intro.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.0</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.0 BETA 4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Graphic glitches.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.0 BETA 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Added landscape version of the flat now playing screen.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated internal libraries.</li>
|
||||
<li><b>FIX:</b> Two crashes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.0 BETA 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Adjusted the statusbar color in the flat now playing screen.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated internal libraries.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.13.0 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Alternative 'Flat' now playing screen. (More now playing screens coming soon)
|
||||
</li>
|
||||
<li><b>NEW:</b> Bug report screen.</li>
|
||||
<li><b>IMPROVEMENT:</b> Animate navigation bar color changes.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated internal libraries.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.12.1 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated internal libraries.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.12.0 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> More widgets.</li>
|
||||
<li><b>NEW:</b> Option to disable volume reducing.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Volume stays reduced.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.11.0 RC</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Player panel not opening when flinging it up too fast.</li>
|
||||
<li><b>FIX:</b> Gapless playback not working.</li>
|
||||
<li><b>FIX:</b> Fixed some more crashes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.11.0 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Embedded lyrics viewing support.</li>
|
||||
<li><b>NEW:</b> Support for Musixmatchs synced lyrics.</li>
|
||||
<li><b>IMPROVEMENT:</b> More reliable tag editor.</li>
|
||||
<li><b>IMPROVEMENT:</b> The player slide up animation is a bit slower and better interpolated.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Fixed a view crashes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.10.0 RC</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> More options in the file and folder menus.</li>
|
||||
<li><b>NEW:</b> Play next option for all bulk actions.</li>
|
||||
<li><b>IMPROVEMENT:</b> Improved folder loading performance.</li>
|
||||
<li><b>IMPROVEMENT:</b> New start directory icon.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Item footer tinting when colored footers are disabled.</li>
|
||||
<li><b>FIX:</b> Correct tinting of dark toolbar icons.</li>
|
||||
<li><b>REVERT:</b> Placeholder UI.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.10.0 PREVIEW 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> The overall loading times and responsiveness should be much better now.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Various bug fixes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.10.0 PREVIEW 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>PREVIEW:</b> Folder support.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated internal libraries.</li>
|
||||
<li><b>FIX:</b> Playback doesn't jump to the next song when the screen is off.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.59</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Pixelated heart icon on devices running Android Lollipop.</li>
|
||||
<li><b>FIX:</b> Too large notification close button on some devices.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.58</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Replaced internal png icons with vector icons.</li>
|
||||
<li><b>IMPROVEMENT:</b> Slightly improved search view.</li>
|
||||
<li><b>IMPROVEMENT:</b> Minor color related improvements.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated internal libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Play pause animation getting stuck on older versions of Android.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.57</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Replaced the app intro with a new one. Thanks to Heinrich Reimer here.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.56</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Minor bug fixes and improvements.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.55</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Auto hide the fastscroller.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated some internal libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.54 RC 5</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Temporarily fixed critical update bug.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.54 RC 4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> More crash and bug fixes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.54 RC 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Crash fixes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.54 RC 2</h3>
|
||||
|
||||
<ol>
|
||||
<p>Note: This is probably the last update until mid march.</p>
|
||||
<li><b>NEW:</b> Triple click the headset button to go to the previous song.</li>
|
||||
<li><b>NEW:</b> Added fading edges to the playing queue.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Changed the mini players font.</li>
|
||||
<li><b>IMPROVEMENT:</b> Sending all meta data to bluetooth receivers.</li>
|
||||
<li><b>FIX:</b> Album cover covering system bars during opening transition.</li>
|
||||
<li><b>FIX:</b> Colored navigation bar issue.</li>
|
||||
<li><b>FIX:</b> Statusbar not being colored in player fragment.</li>
|
||||
<li><b>FIX:</b> Light statusbar mode not working correctly.</li>
|
||||
<li><b>FIX:</b> Tab colors.</li>
|
||||
<li><b>FIX:</b> Tag editor coloring bugs.</li>
|
||||
<li><b>FIX:</b> Playlist menu not working.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.54 RC</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added transition when opening a playlist.</li>
|
||||
<li><b>IMPROVEMENT:</b> Adjusted the colors generated by the Palette API for better performance.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Fixed a bug with the switches on the settings page.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.54 beta 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Yet again changed the theme engine, should be quite stable again now.</li>
|
||||
<li><b>NEW:</b> Improved fastscroller (auto hide is missing right now).</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>Version 0.9.53 PREVIEW 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW (PREVIEW):</b> Completely new underlying theme engine.</li>
|
||||
<li><b>IMPROVEMENT:</b> Various things, I don't quite remember.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>Version 0.9.52</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Updated networking libraries.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.51</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Crash when closing the notification.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.51 RC 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> No longer creating a new instance of the app when clicking the
|
||||
notification.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> The widget will stay clickable and display the current song after a
|
||||
device reboot.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Artist albums are sorted by year again.</li>
|
||||
<li><b>FIX:</b> Fixed a FC when scrolling fast through the artist list.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.51 RC 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Reduced the connect timeout for downloading artist images from 10s to
|
||||
500ms, this should fix the issue
|
||||
where album covers stay blank on slow network. Note that your not already downloaded artist
|
||||
images will stay blank until you are on a fast enough network.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.51 RC</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Artist image loading and caching.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Album sort order (ignore case).</li>
|
||||
<li><b>FIX:</b> Typos.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.51 PREVIEW 1</h3>
|
||||
|
||||
<p>You can always downgrade by downloading the old apk from <i>APKMirror</i> for example.</p>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Preference to choose when to automatically download artist images.</li>
|
||||
<li><b>IMPROVEMENT:</b> Image loading speed, RAM usage and overall performance. This is actually
|
||||
a huge change under the hood.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Removed the color highlight of the current song in the playing queue.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Minor bug fixes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.50 RC</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added introduction.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Android Marshmallows dark statusbar icons not showing up in the search.</li>
|
||||
<li><b>FIX:</b> Some coloring bugs with the black theme.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.50 PREVIEW 4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added black (AMOLED) theme.</li>
|
||||
<li><b>IMPROVEMENT:</b> Tablets now use the same layout as phones.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Force close when disabling the album cover on the lockscreen.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.50 PREVIEW 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> On Android Marshmallow now uses dark statusbar icons on light primary colors.
|
||||
</li>
|
||||
<li><b>NEW:</b> Added clear playing queue menu item to now playing screen.</li>
|
||||
<li><b>NEW:</b> Added open source licenses dialog.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations. Also added translation for Spanish US.</li>
|
||||
<li><b>FIX:</b> Typos.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.50 PREVIEW 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added option to disable the blurred album cover on the lockscreen.</li>
|
||||
<li><b>IMPROVEMENT:</b> Finished the menu for the current song in the playing queue.</li>
|
||||
<li><b>IMPROVEMENT:</b> Better drag and drop inside playlists.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>IMPROVEMENT:</b> Some other minor improvements.</li>
|
||||
<li><b>FIX:</b> Colored navigation bar issue.</li>
|
||||
<li><b>FIX:</b> Wrong titles shown in the toolbar when selecting an item.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.50 PREVIEW 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> All new now playing screen. The old one will be available again in the full
|
||||
update as an option.
|
||||
</li>
|
||||
<li><b>NEW:</b> Swipe the album cover left/right to switch the current track.</li>
|
||||
<li><b>NEW:</b> Double tap on album cover to add to favorites.</li>
|
||||
<li><b>IMPROVEMENT:</b> Better animation for the "add to favorites heart".</li>
|
||||
<li><b>IMPROVEMENT:</b> Adjusted overall animation times.</li>
|
||||
<li><b>IMPROVEMENT:</b> Aligned the shuffle and repeat buttons to the 16dp keyline.</li>
|
||||
<li><b>IMPROVEMENT:</b> Updated Google icons in the about section.</li>
|
||||
<li><b>IMPROVEMENT:</b> Adjusted grid padding at the corners.</li>
|
||||
<li><b>IMPROVEMENT:</b> New card color in the dark theme which now follows the guidelines.</li>
|
||||
<li><b>IMPROVEMENT:</b> Adjusted menu button size and fixed wrong left padding in search items
|
||||
without an image.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Cleaner drag icon for playlists.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Hopefully finally fixed the double notification bug.</li>
|
||||
<li><b>FIX:</b> Properly hide and show the bottom bar depending on whether the playlist is empty
|
||||
or not.
|
||||
</li>
|
||||
<li><b>FIX:</b> Updated homepage link.</li>
|
||||
<li><b>FIX:</b> Some other minor fixes and overall improvements.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.47 BETA 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Wrong alignment of prev/next buttons on devices below Lollipop.</li>
|
||||
<li><b>FIX:</b> White playlist icon in the navigation drawer on Android Marshmallow.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.47 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> HEX color chooser! (Once again you can thank Aidan Follestad for that)</li>
|
||||
<li><b>IMPROVEMENT:</b> Bottom bar looks cleaner now. (Give me some feedback on Google+)</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Some memory related crashes.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.46 BETA 6</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> The adjustable grid size feature is back!</li>
|
||||
<li><b>FIX:</b> Crashes on low memory devices.</li>
|
||||
<li><b>FIX:</b> Removed the blurry shuffle icon from the song grid view.</li>
|
||||
<li><b>IMPROVEMENT:</b> Cards in the about section now with 8dp instead of 16dp padding to match
|
||||
the material design guidelines.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.46 BETA 5</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Toolbar icons in now playing screen hard to click.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.46 BETA 4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Crash that appeared in BETA 3.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.46 BETA 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Overall performance should be slightly better.</li>
|
||||
<li><b>IMPROVEMENT:</b> Random crashes caused by low memory should be less frequent.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.46 BETA 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added a drag view to playlist songs for easier rearrangement.</li>
|
||||
<li><b>IMPROVEMENT:</b> Replaced recently played with history. Songs are always added to the
|
||||
history
|
||||
once they are started but their
|
||||
play count will be only increased if they were played at least half. This makes the top
|
||||
tracks playlist much more accurate.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
<li><b>FIX:</b> Cab (contextual action bar) content not visible with light primary colors.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.46 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Fade album covers in the now playing screen in.</li>
|
||||
<li><b>FIX:</b> Play/pause button covering the next button on some devices.</li>
|
||||
<li><b>FIX:</b> Crash when opening the <i>about section</i>.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.45</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Moved the stuff from the <i>about</i> dialog to a whole new screen and added
|
||||
useful links.
|
||||
</li>
|
||||
<li><b>FIX:</b> Even though the Last.fm app and web page say something is scrobbling, the
|
||||
scrobble doesn't actually get saved at the end. <i>Thanks to Tim Malseed for that.</i>
|
||||
</li>
|
||||
<li><b>FIX:</b> Fixed the plural typo in the artist list.</li>
|
||||
<li><b>FIX:</b> Toolbar had no shadow in the playlist view.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.44 BETA 5</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Album image loading delay (white album covers which took ages to load).</li>
|
||||
<li><b>FIX:</b> Song detail dialog padding.</li>
|
||||
<li><b>FIX:</b> Sleep timer dialog retains its current time on rotate.</li>
|
||||
<li><b>IMPROVEMENT:</b> No longer "consume" purchases. This means that your donations are saved
|
||||
from now on. <i>I made this, so that just in case I make a paid version onetime in future, I
|
||||
know who has already donated before so I can unlock the paid version for them.</i>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.44 BETA 4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Support for light colors. The appbar will now automatically change its text and
|
||||
icon color to be visible on light theme colors.
|
||||
</li>
|
||||
<li><b>FIX:</b> Play/pause button offset too far to the right in landscape mode.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.44 BETA 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> See changes from BETA 2, as BETA 2 was only released internal.</li>
|
||||
<li><b>IMPROVEMENT:</b> Synced translations.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.44 BETA 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Added option to support the development by donating.</li>
|
||||
<li><b>FIX:</b> Fixed status bar coloring for Lollipop and Marshmallow.</li>
|
||||
</ol>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Completely rewritten color chooser. <i>Had great help from <a
|
||||
href="https://plus.google.com/u/0/+AidanFollestad">Aidan Follestad</a> here once again.</i>
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> Increased album cover quality when selecting the "ignore media store
|
||||
covers" option.
|
||||
</li>
|
||||
<li><b>REVERT:</b> Brought back the "Tag editor" label to the song tag editor.
|
||||
</li>
|
||||
<li><b>FIX:</b> Last song in the song view not showing up.
|
||||
</li>
|
||||
<li><b>FIX:</b> Favorites playlist heart icon not showing up when initially added until restart.
|
||||
</li>
|
||||
<li><b>FIX:</b> Fixed the bug where the alternative progress slider always stayed
|
||||
black on some devices.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> "Play next" not always working.
|
||||
</li>
|
||||
<li><b>FIX:</b> Display another song then actually playing.
|
||||
</li>
|
||||
<li><b>FIX:</b> Updated strings to better follow the Material Design "writing" guidelines.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43 BETA 6</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>FIX:</b> Typo caused 0.9.43 BETA 5 to crash on systems below Marshmallow.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43 BETA 5</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Support for Android Marshmallow's permission system.
|
||||
</li>
|
||||
<li><b>IMPROVEMENT:</b> The sliding panel should open and close a bit smoother now.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43 BETA 4</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Improved the color picking with the "Colored Playback Controls". Leave some
|
||||
feedback at the <a href="https://plus.google.com/u/0/communities/106227738496107108513">Google+
|
||||
Community</a>.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43 BETA 3</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> "Colored Playback Controls". You can enable it from the settings to tint the
|
||||
play/pause, repeat and shuffle button as well as the progress slider with the album covers
|
||||
vibrant color.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43 BETA 2</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>IMPROVEMENT:</b> Transition between the bar colors should be a bit smoother now.
|
||||
</li>
|
||||
<li><b>FIX:</b> Playlist view having wrong background color on dark theme.
|
||||
</li>
|
||||
<li><b>FIX:</b> Bottom bar sometimes disappearing from itself after changing the theme.
|
||||
</li>
|
||||
<li><b>FIX:</b> Progress slider being barely visible with dark theme and black accent or light
|
||||
theme
|
||||
and white accent.
|
||||
</li>
|
||||
<li><b>FIX:</b> Progress slider stopped working when switching between alternative and regular
|
||||
progress slider.
|
||||
</li>
|
||||
<li><b>FIX:</b> Removed the unneeded menu button from the artist and album list.
|
||||
</li>
|
||||
<li><b>FIX:</b> Album and artist list not scrolling when trying to drag from their title bar.
|
||||
</li>
|
||||
<li><b>FIX:</b> Removed unnecessary statusbar elevation in the now playing view.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Version 0.9.43 BETA 1</h3>
|
||||
|
||||
<ol>
|
||||
<li><b>NEW:</b> Well, the changelog dialog itself obviously ;)
|
||||
</li>
|
||||
<li><b>NEW:</b> Sliding panel! (You can hide it from the settings if you don't like it).
|
||||
</li>
|
||||
<li><b>IMPROVE:</b> Much better color generation.
|
||||
</li>
|
||||
<li><b>REVERT:</b> Brought back the shuffle button to the songs list.
|
||||
</li>
|
||||
<li><b>FIX:</b> Last.fm scrobbling.
|
||||
</li>
|
||||
<li><b>FIX:</b> Readability issues with the black and white accent colors.
|
||||
</li>
|
||||
<li><b>FIX:</b> Playlists not being updated when adding a new playlist.
|
||||
</li>
|
||||
<li><b>FIX:</b> Some icons not being colored correctly.
|
||||
</li>
|
||||
<li><b>FIX:</b> Images downloaded from Last.fm having low resolution. Note: If you currently
|
||||
have pixelated artist images you may have to clear the cache or reinstall phonograph for
|
||||
changes to take affect.
|
||||
</li>
|
||||
<li><b>TRANSLATIONS:</b> Translation updates from OneSky.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kabouzeid.gramophone;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
|
@ -10,6 +11,17 @@ import com.anjlab.android.iab.v3.TransactionDetails;
|
|||
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||
import com.kabouzeid.gramophone.appshortcuts.DynamicShortcutManager;
|
||||
|
||||
import org.jellyfin.apiclient.interaction.AndroidConnectionManager;
|
||||
import org.jellyfin.apiclient.interaction.AndroidDevice;
|
||||
import org.jellyfin.apiclient.interaction.ApiClient;
|
||||
import org.jellyfin.apiclient.interaction.ApiEventListener;
|
||||
import org.jellyfin.apiclient.interaction.connectionmanager.ConnectionManager;
|
||||
import org.jellyfin.apiclient.interaction.device.IDevice;
|
||||
import org.jellyfin.apiclient.interaction.http.IAsyncHttpClient;
|
||||
import org.jellyfin.apiclient.model.logging.ILogger;
|
||||
import org.jellyfin.apiclient.model.serialization.IJsonSerializer;
|
||||
import org.jellyfin.apiclient.model.session.ClientCapabilities;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
|
|
@ -19,6 +31,7 @@ public class App extends Application {
|
|||
public static final String PRO_VERSION_PRODUCT_ID = "pro_version";
|
||||
|
||||
private static App app;
|
||||
private static ApiClient apiClient;
|
||||
|
||||
private BillingProcessor billingProcessor;
|
||||
|
||||
|
|
@ -64,6 +77,25 @@ public class App extends Application {
|
|||
return BuildConfig.DEBUG || app.billingProcessor.isPurchased(PRO_VERSION_PRODUCT_ID);
|
||||
}
|
||||
|
||||
public static ConnectionManager getConnectionManager(Context context, IJsonSerializer jsonSerializer, ILogger logger, IAsyncHttpClient httpClient) {
|
||||
String appName = context.getString(R.string.app_name);
|
||||
String appVersion = BuildConfig.VERSION_NAME;
|
||||
|
||||
IDevice device = new AndroidDevice(context);
|
||||
ClientCapabilities capabilities = new ClientCapabilities();
|
||||
ApiEventListener eventListener = new ApiEventListener();
|
||||
|
||||
return new AndroidConnectionManager(context, jsonSerializer, logger, httpClient, appName, appVersion, device, capabilities, eventListener);
|
||||
}
|
||||
|
||||
public static ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public static void setApiClient(ApiClient client) {
|
||||
apiClient = client;
|
||||
}
|
||||
|
||||
public static App getInstance() {
|
||||
return app;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,116 @@
|
|||
package com.kabouzeid.gramophone.ui.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||
import com.kabouzeid.gramophone.App;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.ui.activities.base.AbsBaseActivity;
|
||||
|
||||
import org.jellyfin.apiclient.interaction.AndroidCredentialProvider;
|
||||
import org.jellyfin.apiclient.interaction.ConnectionResult;
|
||||
import org.jellyfin.apiclient.interaction.GsonJsonSerializer;
|
||||
import org.jellyfin.apiclient.interaction.Response;
|
||||
import org.jellyfin.apiclient.interaction.VolleyHttpClient;
|
||||
import org.jellyfin.apiclient.interaction.connectionmanager.ConnectionManager;
|
||||
import org.jellyfin.apiclient.interaction.http.IAsyncHttpClient;
|
||||
import org.jellyfin.apiclient.logging.AndroidLogger;
|
||||
import org.jellyfin.apiclient.model.apiclient.ServerCredentials;
|
||||
import org.jellyfin.apiclient.model.logging.ILogger;
|
||||
import org.jellyfin.apiclient.model.serialization.IJsonSerializer;
|
||||
import org.jellyfin.apiclient.model.users.AuthenticationResult;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class LoginActivity extends AbsBaseActivity implements View.OnClickListener {
|
||||
public static final String TAG = SplashActivity.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
@BindView(R.id.username)
|
||||
EditText username;
|
||||
@BindView(R.id.password)
|
||||
EditText password;
|
||||
@BindView(R.id.server)
|
||||
EditText server;
|
||||
@BindView(R.id.login)
|
||||
Button login;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
setDrawUnderStatusbar();
|
||||
ButterKnife.bind(this);
|
||||
|
||||
setStatusbarColorAuto();
|
||||
setNavigationbarColorAuto();
|
||||
setTaskDescriptionColorAuto();
|
||||
|
||||
setUpViews();
|
||||
}
|
||||
|
||||
private void setUpViews() {
|
||||
setUpToolbar();
|
||||
setUpOnClickListeners();
|
||||
}
|
||||
|
||||
private void setUpToolbar() {
|
||||
toolbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
private void setUpOnClickListeners() {
|
||||
login.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
onBackPressed();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v == login) {
|
||||
final Context context = this;
|
||||
IJsonSerializer jsonSerializer = new GsonJsonSerializer();
|
||||
ILogger logger = new AndroidLogger(TAG);
|
||||
IAsyncHttpClient httpClient = new VolleyHttpClient(logger, this);
|
||||
|
||||
AndroidCredentialProvider credentialProvider = new AndroidCredentialProvider(jsonSerializer, this, logger);
|
||||
ConnectionManager connectionManager = App.getConnectionManager(context, jsonSerializer, logger, httpClient);
|
||||
connectionManager.Connect(server.getText().toString(), new Response<ConnectionResult>() {
|
||||
@Override
|
||||
public void onResponse(ConnectionResult result) {
|
||||
App.setApiClient(result.getApiClient());
|
||||
ServerCredentials serverCredentials = new ServerCredentials();
|
||||
serverCredentials.AddOrUpdateServer(result.getServers().get(0));
|
||||
App.getApiClient().AuthenticateUserAsync(username.getText().toString(), password.getText().toString(), new Response<AuthenticationResult>() {
|
||||
@Override
|
||||
public void onResponse(AuthenticationResult result) {
|
||||
if (result.getAccessToken() == null) return;
|
||||
serverCredentials.GetServer(result.getServerId()).setAccessToken(result.getAccessToken());
|
||||
credentialProvider.SaveCredentials(serverCredentials);
|
||||
context.startActivity(new Intent(context, MainActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,8 +53,6 @@ import butterknife.ButterKnife;
|
|||
public class MainActivity extends AbsSlidingMusicPanelActivity {
|
||||
|
||||
public static final String TAG = MainActivity.class.getSimpleName();
|
||||
public static final int INTRO_REQUEST = 100;
|
||||
public static final int PURCHASE_REQUEST = 101;
|
||||
|
||||
private static final int LIBRARY = 0;
|
||||
private static final int FOLDERS = 1;
|
||||
|
|
@ -70,8 +68,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity {
|
|||
@Nullable
|
||||
private View navigationDrawerHeader;
|
||||
|
||||
private boolean blockRequestPermissions;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
@ -94,7 +90,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity {
|
|||
private void setMusicChooser(int key) {
|
||||
if (!App.isProVersion() && key == FOLDERS) {
|
||||
Toast.makeText(this, R.string.folder_view_is_a_pro_feature, Toast.LENGTH_LONG).show();
|
||||
startActivityForResult(new Intent(this, PurchaseActivity.class), PURCHASE_REQUEST);
|
||||
key = LIBRARY;
|
||||
}
|
||||
|
||||
|
|
@ -120,27 +115,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity {
|
|||
currentFragment = (MainActivityFragmentCallbacks) getSupportFragmentManager().findFragmentById(R.id.fragment_container);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == INTRO_REQUEST) {
|
||||
blockRequestPermissions = false;
|
||||
if (!hasPermissions()) {
|
||||
requestPermissions();
|
||||
}
|
||||
checkSetUpPro(); // good chance that pro version check was delayed on first start
|
||||
} else if (requestCode == PURCHASE_REQUEST) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
checkSetUpPro();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void requestPermissions() {
|
||||
if (!blockRequestPermissions) super.requestPermissions();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View createContentView() {
|
||||
@SuppressLint("InflateParams")
|
||||
|
|
@ -166,7 +140,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity {
|
|||
new Handler().postDelayed(() -> setMusicChooser(FOLDERS), 200);
|
||||
break;
|
||||
case R.id.buy_pro:
|
||||
new Handler().postDelayed(() -> startActivityForResult(new Intent(MainActivity.this, PurchaseActivity.class), PURCHASE_REQUEST), 200);
|
||||
new Handler().postDelayed(() -> startActivity(new Intent(MainActivity.this, PurchaseActivity.class)), 200);
|
||||
break;
|
||||
case R.id.action_scan:
|
||||
new Handler().postDelayed(() -> {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package com.kabouzeid.gramophone.ui.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.kabouzeid.gramophone.App;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.ui.activities.base.AbsBaseActivity;
|
||||
|
||||
import org.jellyfin.apiclient.interaction.AndroidCredentialProvider;
|
||||
import org.jellyfin.apiclient.interaction.ConnectionResult;
|
||||
import org.jellyfin.apiclient.interaction.GsonJsonSerializer;
|
||||
import org.jellyfin.apiclient.interaction.Response;
|
||||
import org.jellyfin.apiclient.interaction.VolleyHttpClient;
|
||||
import org.jellyfin.apiclient.interaction.connectionmanager.ConnectionManager;
|
||||
import org.jellyfin.apiclient.interaction.http.IAsyncHttpClient;
|
||||
import org.jellyfin.apiclient.logging.AndroidLogger;
|
||||
import org.jellyfin.apiclient.model.apiclient.ConnectionState;
|
||||
import org.jellyfin.apiclient.model.logging.ILogger;
|
||||
import org.jellyfin.apiclient.model.serialization.IJsonSerializer;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class SplashActivity extends AbsBaseActivity {
|
||||
public static final String TAG = SplashActivity.class.getSimpleName();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash);
|
||||
setDrawUnderStatusbar();
|
||||
ButterKnife.bind(this);
|
||||
|
||||
setStatusbarColorAuto();
|
||||
setNavigationbarColorAuto();
|
||||
setTaskDescriptionColorAuto();
|
||||
|
||||
IJsonSerializer jsonSerializer = new GsonJsonSerializer();
|
||||
ILogger logger = new AndroidLogger(TAG);
|
||||
IAsyncHttpClient httpClient = new VolleyHttpClient(logger, this);
|
||||
|
||||
AndroidCredentialProvider credentialProvider = new AndroidCredentialProvider(jsonSerializer, this, logger);
|
||||
if (credentialProvider.GetCredentials().getServers().size() == 0) {
|
||||
Intent intent = new Intent(this, LoginActivity.class);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
final Context context = this;
|
||||
ConnectionManager connectionManager = App.getConnectionManager(this, jsonSerializer, logger, httpClient);
|
||||
connectionManager.Connect(credentialProvider.GetCredentials().getServers().get(0), new Response<ConnectionResult>() {
|
||||
@Override
|
||||
public void onResponse(ConnectionResult result) {
|
||||
if (result.getState() != ConnectionState.SignedIn) return;
|
||||
App.setApiClient(result.getApiClient());
|
||||
context.startActivity(new Intent(context, MainActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -74,9 +74,6 @@ public final class PreferenceUtil {
|
|||
|
||||
public static final String IGNORE_MEDIA_STORE_ARTWORK = "ignore_media_store_artwork";
|
||||
|
||||
public static final String LAST_CHANGELOG_VERSION = "last_changelog_version";
|
||||
public static final String INTRO_SHOWN = "intro_shown";
|
||||
|
||||
public static final String AUTO_DOWNLOAD_IMAGES_POLICY = "auto_download_images_policy";
|
||||
|
||||
public static final String START_DIRECTORY = "start_directory";
|
||||
|
|
@ -449,24 +446,6 @@ public final class PreferenceUtil {
|
|||
return mPreferences.getBoolean(ARTIST_COLORED_FOOTERS, true);
|
||||
}
|
||||
|
||||
public void setLastChangeLogVersion(int version) {
|
||||
mPreferences.edit().putInt(LAST_CHANGELOG_VERSION, version).apply();
|
||||
}
|
||||
|
||||
public final int getLastChangelogVersion() {
|
||||
return mPreferences.getInt(LAST_CHANGELOG_VERSION, -1);
|
||||
}
|
||||
|
||||
@SuppressLint("CommitPrefEdits")
|
||||
public void setIntroShown() {
|
||||
// don't use apply here
|
||||
mPreferences.edit().putBoolean(INTRO_SHOWN, true).commit();
|
||||
}
|
||||
|
||||
public final boolean introShown() {
|
||||
return mPreferences.getBoolean(INTRO_SHOWN, false);
|
||||
}
|
||||
|
||||
public final boolean rememberShuffle() {
|
||||
return mPreferences.getBoolean(REMEMBER_SHUFFLE, true);
|
||||
}
|
||||
|
|
|
|||
83
app/src/main/res/layout/activity_login.xml
Normal file
83
app/src/main/res/layout/activity_login.xml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activities.LoginActivity">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:hint="@string/username" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:inputType="textPassword"
|
||||
android:hint="@string/password" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/server"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:hint="@string/server" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="login" />
|
||||
|
||||
</LinearLayout>
|
||||
15
app/src/main/res/layout/activity_splash.xml
Normal file
15
app/src/main/res/layout/activity_splash.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activities.SplashActivity">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
style="?android:attr/progressBarStyleLarge" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
<string name="action_settings">"Settings"</string>
|
||||
<string name="action_grant">Grant</string>
|
||||
<string name="action_about">About</string>
|
||||
<string name="action_login">Login</string>
|
||||
<string name="action_clear_playlist">Clear playlist</string>
|
||||
<string name="action_add_to_favorites">Add to favorites</string>
|
||||
<string name="action_remove_from_favorites">Remove from favorites</string>
|
||||
|
|
@ -242,6 +243,7 @@
|
|||
<string name="bug_report_manual">Send manually</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="server">Server</string>
|
||||
<string name="bug_report_no_title">Please enter an issue title</string>
|
||||
<string name="bug_report_no_description">Please enter an issue description</string>
|
||||
<string name="bug_report_no_username">Please enter your valid GitHub username</string>
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
include ':app'
|
||||
|
||||
include ':apiclient'
|
||||
project(':apiclient').projectDir = new File(settingsDir, '../jellyfin-apiclient-java/android')
|
||||
|
||||
include ':library'
|
||||
project(':library').projectDir = new File(settingsDir, '../jellyfin-apiclient-java/library')
|
||||
Loading…
Add table
Add a link
Reference in a new issue