changed package name and some images
|
|
@ -1 +0,0 @@
|
|||
R-a-dio2
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="dict">
|
||||
<words>
|
||||
<w>debouncing</w>
|
||||
<w>requestable</w>
|
||||
<w>requestor</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -26,7 +26,7 @@ android {
|
|||
jvmTarget = "1.8"
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId "io.r_a_d.radio2"
|
||||
applicationId "fr.forum_thalie.tsumugi"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
|
@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
|
|||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("io.r_a_d.radio2", appContext.packageName)
|
||||
assertEquals("fr.forum_thalie.tsumugi", appContext.packageName)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="io.r_a_d.radio2">
|
||||
package="fr.forum_thalie.tsumugi">
|
||||
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
|
@ -40,8 +40,8 @@
|
|||
tools:targetApi="n">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="io.r_a_d.radio2.PLAY_OR_FALLBACK" />
|
||||
<action android:name="io.r_a_d.radio2.NOTIFY" /> <!-- this is for Snooze -->
|
||||
<action android:name="fr.forum_thalie.tsumugi.PLAY_OR_FALLBACK" />
|
||||
<action android:name="fr.forum_thalie.tsumugi.NOTIFY" /> <!-- this is for Snooze -->
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
enum class Actions
|
||||
{
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.os.AsyncTask
|
||||
import android.util.Log
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
|
||||
class Async(val handler: (Any?) -> Any?, val post: (Any?) -> Unit = {},
|
||||
private val actionOnError: ActionOnError = ActionOnError.RESET, private val parameters: Any? = null) :
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.app.Notification
|
||||
import android.app.NotificationChannel
|
||||
|
|
@ -69,7 +69,7 @@ abstract class BaseNotification(private val notificationChannelId: String,
|
|||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
builder.setSmallIcon(R.drawable.lollipop_logo)
|
||||
builder.color = -0x20b3c6
|
||||
builder.color = -0xf58b01 // same color as Accent. Can't use c.getColor since it's API23+
|
||||
} else {
|
||||
builder.setSmallIcon(R.drawable.normal_logo)
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
|
|
@ -6,10 +6,10 @@ import android.content.Intent
|
|||
import android.os.Build
|
||||
import android.util.Log
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.r_a_d.radio2.alarm.RadioAlarm
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import io.r_a_d.radio2.streamerNotificationService.WorkerStore
|
||||
import io.r_a_d.radio2.streamerNotificationService.startStreamerMonitor
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioAlarm
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.WorkerStore
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.startStreamerMonitor
|
||||
|
||||
class BootBroadcastReceiver : BroadcastReceiver(){
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ class BootBroadcastReceiver : BroadcastReceiver(){
|
|||
RadioAlarm.instance.setNextAlarm(context) // schedule next alarm
|
||||
}
|
||||
|
||||
if (arg1.getStringExtra("action") == "io.r_a_d.radio2.${Actions.PLAY_OR_FALLBACK.name}" )
|
||||
if (arg1.getStringExtra("action") == "fr.forum_thalie.tsumugi.${Actions.PLAY_OR_FALLBACK.name}" )
|
||||
{
|
||||
RadioAlarm.instance.setNextAlarm(context) // schedule next alarm
|
||||
if (PlayerStore.instance.streamerName.value.isNullOrBlank())
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.os.Bundle
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
|
|
@ -11,16 +11,16 @@ import androidx.core.content.res.ResourcesCompat
|
|||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.navigation.NavController
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
|
||||
import java.util.Timer
|
||||
import android.view.MenuItem
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import io.r_a_d.radio2.alarm.RadioAlarm
|
||||
import io.r_a_d.radio2.streamerNotificationService.WorkerStore
|
||||
import io.r_a_d.radio2.streamerNotificationService.startStreamerMonitor
|
||||
import io.r_a_d.radio2.ui.songs.request.Requestor
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioAlarm
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.WorkerStore
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.startStreamerMonitor
|
||||
import fr.forum_thalie.tsumugi.ui.songs.request.Requestor
|
||||
|
||||
|
||||
/* Log to file import
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
|
||||
import android.content.Intent
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
|
|
@ -6,8 +6,8 @@ import android.content.Intent
|
|||
import android.support.v4.media.session.MediaSessionCompat
|
||||
import android.support.v4.media.session.PlaybackStateCompat
|
||||
import androidx.core.app.NotificationCompat
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import io.r_a_d.radio2.BootBroadcastReceiver
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.BootBroadcastReceiver
|
||||
|
||||
class NowPlayingNotification(
|
||||
notificationChannelId: String,
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.os.Bundle
|
||||
import io.r_a_d.radio2.preferences.*
|
||||
import fr.forum_thalie.tsumugi.preferences.*
|
||||
|
||||
|
||||
class ParametersActivity : BaseActivity() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.app.Service
|
||||
import android.content.BroadcastReceiver
|
||||
|
|
@ -33,9 +33,9 @@ import androidx.preference.PreferenceManager
|
|||
import com.google.android.exoplayer2.*
|
||||
import com.google.android.exoplayer2.metadata.icy.*
|
||||
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector
|
||||
import io.r_a_d.radio2.alarm.RadioAlarm
|
||||
import io.r_a_d.radio2.alarm.RadioSleeper
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioAlarm
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioSleeper
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import java.util.*
|
||||
import kotlin.math.exp
|
||||
import kotlin.math.ln
|
||||
|
|
@ -429,7 +429,7 @@ class RadioService : MediaBrowserServiceCompat() {
|
|||
)
|
||||
// This is the MediaSource representing the media to be played.
|
||||
radioMediaSource = ProgressiveMediaSource.Factory(dataSourceFactory)
|
||||
.createMediaSource(Uri.parse(getString(R.string.STREAM_URL_RADIO)))
|
||||
.createMediaSource(Uri.parse(getString(R.string.STREAM_URL_TSUMUGI)))
|
||||
|
||||
fallbackMediaSource = ProgressiveMediaSource.Factory(dataSourceFactory)
|
||||
.createMediaSource(Uri.parse("file:///android_asset/the_stream_is_down.mp3"))
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.support.v4.media.session.PlaybackStateCompat
|
||||
import io.r_a_d.radio2.alarm.RadioSleeper
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioSleeper
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import java.util.*
|
||||
|
||||
class Tick : TimerTask() {
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import android.content.SharedPreferences
|
||||
import android.content.res.ColorStateList
|
||||
|
||||
const val tag = "io.r_a_d.radio2"
|
||||
const val tag = "fr.forum_thalie.tsumugi"
|
||||
const val noConnectionValue = "No connection"
|
||||
var colorBlue: Int = 0
|
||||
var colorWhited: Int = 0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.alarm
|
||||
package fr.forum_thalie.tsumugi.alarm
|
||||
|
||||
import android.app.AlarmManager
|
||||
import android.app.PendingIntent
|
||||
|
|
@ -6,9 +6,9 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import androidx.core.app.AlarmManagerCompat
|
||||
import io.r_a_d.radio2.BootBroadcastReceiver
|
||||
import fr.forum_thalie.tsumugi.BootBroadcastReceiver
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.r_a_d.radio2.*
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
import java.util.*
|
||||
|
||||
class RadioAlarm {
|
||||
|
|
@ -38,7 +38,7 @@ class RadioAlarm {
|
|||
|
||||
val alarmManager = c.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
alarmIntent = Intent(c, BootBroadcastReceiver::class.java).let { intent ->
|
||||
intent.putExtra("action", "io.r_a_d.radio2.${Actions.PLAY_OR_FALLBACK.name}")
|
||||
intent.putExtra("action", "fr.forum_thalie.tsumugi.${Actions.PLAY_OR_FALLBACK.name}")
|
||||
PendingIntent.getBroadcast(c, 0, intent, 0)
|
||||
}
|
||||
val showIntent = Intent(c, ParametersActivity::class.java).let { intent ->
|
||||
|
|
@ -100,7 +100,7 @@ class RadioAlarm {
|
|||
{
|
||||
val alarmManager = c.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
alarmIntent = Intent(c, BootBroadcastReceiver::class.java).let { intent ->
|
||||
intent.putExtra("action", "io.r_a_d.radio2.${Actions.PLAY_OR_FALLBACK.name}")
|
||||
intent.putExtra("action", "fr.forum_thalie.tsumugi.${Actions.PLAY_OR_FALLBACK.name}")
|
||||
PendingIntent.getBroadcast(c, 0, intent, 0)
|
||||
}
|
||||
val showIntent = Intent(c, ParametersActivity::class.java).let { intent ->
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.alarm
|
||||
package fr.forum_thalie.tsumugi.alarm
|
||||
|
||||
import android.app.AlarmManager
|
||||
import android.app.PendingIntent
|
||||
|
|
@ -8,7 +8,7 @@ import android.util.Log
|
|||
import androidx.core.app.AlarmManagerCompat
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.r_a_d.radio2.*
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
|
||||
class RadioSleeper {
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.playerstore
|
||||
package fr.forum_thalie.tsumugi.playerstore
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
|
|
@ -7,7 +7,7 @@ import android.support.v4.media.session.PlaybackStateCompat
|
|||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import io.r_a_d.radio2.*
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
import org.json.JSONObject
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.playerstore
|
||||
package fr.forum_thalie.tsumugi.playerstore
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package io.r_a_d.radio2.preferences
|
||||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.app.TimePickerDialog
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.core.content.edit
|
||||
import androidx.preference.*
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.alarm.RadioAlarm
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioAlarm
|
||||
import java.util.*
|
||||
|
||||
class AlarmFragment : PreferenceFragmentCompat() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.preferences
|
||||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
|
|
@ -6,9 +6,9 @@ import android.os.Bundle
|
|||
import android.util.Log
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.preference.*
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.preferenceStore
|
||||
import io.r_a_d.radio2.ui.songs.request.Requestor
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.preferenceStore
|
||||
import fr.forum_thalie.tsumugi.ui.songs.request.Requestor
|
||||
|
||||
class CustomizeFragment : PreferenceFragmentCompat() {
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package io.r_a_d.radio2.preferences
|
||||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import io.r_a_d.radio2.R
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.preference.*
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package io.r_a_d.radio2.preferences
|
||||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.preference.*
|
||||
import io.r_a_d.radio2.R
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import android.text.InputType
|
||||
import io.r_a_d.radio2.alarm.RadioSleeper
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioSleeper
|
||||
|
||||
|
||||
class SleepFragment : PreferenceFragmentCompat() {
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package io.r_a_d.radio2.preferences
|
||||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.preference.*
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.preferenceStore
|
||||
import io.r_a_d.radio2.streamerNotificationService.WorkerStore
|
||||
import io.r_a_d.radio2.streamerNotificationService.startStreamerMonitor
|
||||
import io.r_a_d.radio2.streamerNotificationService.stopStreamerMonitor
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.preferenceStore
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.WorkerStore
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.startStreamerMonitor
|
||||
import fr.forum_thalie.tsumugi.streamerNotificationService.stopStreamerMonitor
|
||||
|
||||
class StreamerNotifServiceFragment : PreferenceFragmentCompat() {
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package io.r_a_d.radio2.streamerNotificationService
|
||||
package fr.forum_thalie.tsumugi.streamerNotificationService
|
||||
|
||||
import android.content.Context
|
||||
import io.r_a_d.radio2.BaseNotification
|
||||
import fr.forum_thalie.tsumugi.BaseNotification
|
||||
import java.util.*
|
||||
|
||||
class ServiceNotification(
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.streamerNotificationService
|
||||
package fr.forum_thalie.tsumugi.streamerNotificationService
|
||||
|
||||
import android.app.AlarmManager
|
||||
import android.app.PendingIntent
|
||||
|
|
@ -10,9 +10,9 @@ import android.os.SystemClock
|
|||
import android.util.Log
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.r_a_d.radio2.*
|
||||
import io.r_a_d.radio2.alarm.RadioAlarm
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioAlarm
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import org.json.JSONObject
|
||||
import java.net.URL
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.streamerNotificationService
|
||||
package fr.forum_thalie.tsumugi.streamerNotificationService
|
||||
|
||||
|
||||
import android.app.Service
|
||||
|
|
@ -9,9 +9,9 @@ import android.util.Log
|
|||
import androidx.core.app.NotificationCompat
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.r_a_d.radio2.Actions
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.tag
|
||||
import fr.forum_thalie.tsumugi.Actions
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.tag
|
||||
import java.util.*
|
||||
|
||||
class StreamerMonitorService : Service() {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package io.r_a_d.radio2.streamerNotificationService
|
||||
package fr.forum_thalie.tsumugi.streamerNotificationService
|
||||
|
||||
import android.content.Context
|
||||
import io.r_a_d.radio2.BaseNotification
|
||||
import fr.forum_thalie.tsumugi.BaseNotification
|
||||
import java.util.*
|
||||
|
||||
class StreamerNotification(
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.streamerNotificationService
|
||||
package fr.forum_thalie.tsumugi.streamerNotificationService
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
|
|
@ -6,8 +6,8 @@ import androidx.core.app.NotificationCompat
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.preference.PreferenceManager
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.tag
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.tag
|
||||
|
||||
class WorkerStore {
|
||||
companion object {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.chat
|
||||
package fr.forum_thalie.tsumugi.ui.chat
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -9,7 +9,7 @@ import android.view.WindowManager
|
|||
import android.webkit.WebView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import io.r_a_d.radio2.R
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
|
||||
|
||||
class ChatFragment : Fragment() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.chat
|
||||
package fr.forum_thalie.tsumugi.ui.chat
|
||||
|
||||
import android.view.View
|
||||
import android.webkit.WebView
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.chat
|
||||
package fr.forum_thalie.tsumugi.ui.chat
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.news
|
||||
package fr.forum_thalie.tsumugi.ui.news
|
||||
|
||||
import java.util.*
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.news
|
||||
package fr.forum_thalie.tsumugi.ui.news
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.widget.TextView
|
||||
|
|
@ -8,7 +8,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
|||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.R
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class NewsAdapter(private val dataSet: ArrayList<News>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.news
|
||||
package fr.forum_thalie.tsumugi.ui.news
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.R
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
|
||||
class NewsFragment : Fragment() {
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package io.r_a_d.radio2.ui.news
|
||||
package fr.forum_thalie.tsumugi.ui.news
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.Async
|
||||
import io.r_a_d.radio2.tag
|
||||
import fr.forum_thalie.tsumugi.Async
|
||||
import fr.forum_thalie.tsumugi.tag
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.net.URL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.nowplaying
|
||||
package fr.forum_thalie.tsumugi.ui.nowplaying
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ClipboardManager
|
||||
|
|
@ -19,10 +19,10 @@ import androidx.core.widget.TextViewCompat
|
|||
import androidx.lifecycle.Observer
|
||||
import com.google.android.material.snackbar.BaseTransientBottomBar
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import io.r_a_d.radio2.*
|
||||
import io.r_a_d.radio2.alarm.RadioSleeper
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import io.r_a_d.radio2.playerstore.Song
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioSleeper
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.playerstore.Song
|
||||
|
||||
|
||||
class NowPlayingFragment : Fragment() {
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package io.r_a_d.radio2.ui.nowplaying
|
||||
package fr.forum_thalie.tsumugi.ui.nowplaying
|
||||
|
||||
import android.widget.SeekBar
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
|
||||
class NowPlayingViewModel: ViewModel() {
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs
|
||||
package fr.forum_thalie.tsumugi.ui.songs
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -14,13 +14,13 @@ import androidx.viewpager.widget.ViewPager
|
|||
import com.google.android.material.snackbar.BaseTransientBottomBar
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.preferenceStore
|
||||
import io.r_a_d.radio2.ui.songs.queuelp.LastPlayedFragment
|
||||
import io.r_a_d.radio2.ui.songs.queuelp.QueueFragment
|
||||
import io.r_a_d.radio2.ui.songs.request.FavoritesFragment
|
||||
import io.r_a_d.radio2.ui.songs.request.RequestFragment
|
||||
import io.r_a_d.radio2.ui.songs.request.Requestor
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.preferenceStore
|
||||
import fr.forum_thalie.tsumugi.ui.songs.queuelp.LastPlayedFragment
|
||||
import fr.forum_thalie.tsumugi.ui.songs.queuelp.QueueFragment
|
||||
import fr.forum_thalie.tsumugi.ui.songs.request.FavoritesFragment
|
||||
import fr.forum_thalie.tsumugi.ui.songs.request.RequestFragment
|
||||
import fr.forum_thalie.tsumugi.ui.songs.request.Requestor
|
||||
|
||||
class SongsFragment : Fragment() {
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs
|
||||
package fr.forum_thalie.tsumugi.ui.songs
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.queuelp
|
||||
package fr.forum_thalie.tsumugi.ui.songs.queuelp
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -9,8 +9,8 @@ import android.view.ViewGroup
|
|||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.queuelp
|
||||
package fr.forum_thalie.tsumugi.ui.songs.queuelp
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -9,9 +9,9 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.playerstore.PlayerStore
|
||||
import io.r_a_d.radio2.playerstore.Song
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.playerstore.Song
|
||||
|
||||
class QueueFragment : Fragment(){
|
||||
private val lastPlayedFragmentTag = this::class.java.name
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.queuelp
|
||||
package fr.forum_thalie.tsumugi.ui.songs.queuelp
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
|
|
@ -7,10 +7,10 @@ import android.view.ViewGroup
|
|||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.R
|
||||
import io.r_a_d.radio2.colorBlue
|
||||
import io.r_a_d.radio2.colorWhited
|
||||
import io.r_a_d.radio2.playerstore.Song
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.colorBlue
|
||||
import fr.forum_thalie.tsumugi.colorWhited
|
||||
import fr.forum_thalie.tsumugi.playerstore.Song
|
||||
import kotlinx.android.synthetic.main.song_view.view.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.request
|
||||
package fr.forum_thalie.tsumugi.ui.songs.request
|
||||
|
||||
import kotlin.math.exp
|
||||
import kotlin.math.max
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.request
|
||||
package fr.forum_thalie.tsumugi.ui.songs.request
|
||||
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
|
|
@ -14,7 +14,7 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import io.r_a_d.radio2.*
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
|
||||
|
||||
class FavoritesFragment : Fragment() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.request
|
||||
package fr.forum_thalie.tsumugi.ui.songs.request
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -11,7 +11,7 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import io.r_a_d.radio2.R
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
|
||||
class RequestFragment : Fragment() {
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package io.r_a_d.radio2.ui.songs.request
|
||||
package fr.forum_thalie.tsumugi.ui.songs.request
|
||||
|
||||
import io.r_a_d.radio2.playerstore.Song
|
||||
import fr.forum_thalie.tsumugi.playerstore.Song
|
||||
import org.json.JSONObject
|
||||
|
||||
class RequestResponse(jsonResponse: JSONObject) {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2.ui.songs.request
|
||||
package fr.forum_thalie.tsumugi.ui.songs.request
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
|
|
@ -9,8 +9,8 @@ import android.widget.TextView
|
|||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.r_a_d.radio2.*
|
||||
import io.r_a_d.radio2.playerstore.Song
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
import fr.forum_thalie.tsumugi.playerstore.Song
|
||||
import kotlinx.android.synthetic.main.request_song_view.view.*
|
||||
import android.view.View
|
||||
import kotlinx.android.synthetic.main.button_load_more.view.*
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package io.r_a_d.radio2.ui.songs.request
|
||||
package fr.forum_thalie.tsumugi.ui.songs.request
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import io.r_a_d.radio2.ActionOnError
|
||||
import io.r_a_d.radio2.Async
|
||||
import io.r_a_d.radio2.playerstore.Song
|
||||
import io.r_a_d.radio2.preferenceStore
|
||||
import io.r_a_d.radio2.tag
|
||||
import fr.forum_thalie.tsumugi.ActionOnError
|
||||
import fr.forum_thalie.tsumugi.Async
|
||||
import fr.forum_thalie.tsumugi.playerstore.Song
|
||||
import fr.forum_thalie.tsumugi.preferenceStore
|
||||
import fr.forum_thalie.tsumugi.tag
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="26.086956"
|
||||
android:viewportHeight="26.086956"
|
||||
android:tint="#FFFFFF">
|
||||
<group android:translateX="1.0434783"
|
||||
android:translateY="1.0434783">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M3.24,6.15C2.51,6.43 2,7.17 2,8v12c0,1.1 0.89,2 2,2h16c1.11,0 2,-0.9 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2L8.3,6l8.26,-3.34L15.88,1 3.24,6.15zM7,20c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM20,12h-2v-2h-2v2L4,12L4,8h16v4z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 318 B |
|
After Width: | Height: | Size: 494 B |
|
After Width: | Height: | Size: 698 B |
|
Before Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
|
@ -6,6 +6,6 @@
|
|||
android:viewportHeight="108"
|
||||
>
|
||||
<path
|
||||
android:fillColor="@color/orange"
|
||||
android:fillColor="@color/colorAccent"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
</vector>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
|
@ -7,7 +7,7 @@
|
|||
tools:ignore="UnusedNavigation">
|
||||
<fragment
|
||||
android:id="@+id/fragment_chat"
|
||||
android:name="io.r_a_d.radio2.ui.chat.ChatFragment"
|
||||
android:name="fr.forum_thalie.tsumugi.ui.chat.ChatFragment"
|
||||
android:label="@string/title_chat"
|
||||
tools:layout="@layout/fragment_chat" />
|
||||
</navigation>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
tools:ignore="UnusedNavigation">
|
||||
<fragment
|
||||
android:id="@+id/fragment_news"
|
||||
android:name="io.r_a_d.radio2.ui.news.NewsFragment"
|
||||
android:name="fr.forum_thalie.tsumugi.ui.news.NewsFragment"
|
||||
android:label="@string/title_news"
|
||||
tools:layout="@layout/fragment_songs" />
|
||||
</navigation>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<fragment
|
||||
android:id="@+id/fragment_nowplaying"
|
||||
android:name="io.r_a_d.radio2.ui.nowplaying.NowPlayingFragment"
|
||||
android:name="fr.forum_thalie.tsumugi.ui.nowplaying.NowPlayingFragment"
|
||||
android:label="@string/title_nowplaying" />
|
||||
|
||||
</navigation>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
tools:ignore="UnusedNavigation">
|
||||
<fragment
|
||||
android:id="@+id/fragment_songs"
|
||||
android:name="io.r_a_d.radio2.ui.songs.SongsFragment"
|
||||
android:name="fr.forum_thalie.tsumugi.ui.songs.SongsFragment"
|
||||
android:label="@string/title_queue_lp"
|
||||
tools:layout="@layout/fragment_songs" />
|
||||
</navigation>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<resources>
|
||||
<color name="colorPrimary">#333333</color>
|
||||
<color name="colorPrimaryDark">#222222</color>
|
||||
<color name="colorAccent">#DF4C3A</color>
|
||||
<color name="colorAccent">#f58b01</color>
|
||||
<color name="dark">#454545</color>
|
||||
<color name="orange">#DF4C3A</color>
|
||||
<color name="whited">#DDDDDD</color>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<resources>
|
||||
<string name="app_name">R/a/dio2</string>
|
||||
<string name="title_nowplaying">R/a/dio</string>
|
||||
<string name="app_name">Tsumugi</string>
|
||||
<string name="title_nowplaying">Tsumugi</string>
|
||||
<string name="title_queue_lp">Songs</string>
|
||||
<string name="title_chat">Chat</string>
|
||||
<string name="title_news">News</string>
|
||||
|
|
@ -34,13 +34,13 @@
|
|||
<string name="ra_f">.ra f</string>
|
||||
|
||||
<string name="nowPlayingNotificationChannel">R/a/dio Stream Service</string>
|
||||
<string name="nowPlayingChannelId">io.r_a_d.radio2.PLAYER_SERVICE</string>
|
||||
<string name="nowPlayingChannelId">fr.forum_thalie.tsumugi.PLAYER_SERVICE</string>
|
||||
|
||||
<string name="streamerServiceChannel">Streamer Monitor Service</string>
|
||||
<string name="streamerServiceChannelId">io.r_a_d.radio2.STREAMER_NOTIFICATION_SERVICE</string>
|
||||
<string name="streamerServiceChannelId">fr.forum_thalie.tsumugi.STREAMER_NOTIFICATION_SERVICE</string>
|
||||
|
||||
<string name="streamerNotificationChannel">New Streamer Notification</string>
|
||||
<string name="streamerNotificationChannelId">io.r_a_d.radio2.STREAMER_NOTIFICATION_NEW</string>
|
||||
<string name="streamerNotificationChannelId">fr.forum_thalie.tsumugi.STREAMER_NOTIFICATION_NEW</string>
|
||||
<string name="warningStreamerNotif">
|
||||
This feature is EXPERIMENTAL.
|
||||
\nIt WILL consume your battery by polling the server regularly.
|
||||
|
|
|
|||
|
|
@ -8,28 +8,28 @@
|
|||
app:icon="@drawable/ic_alarm"
|
||||
app:key="alarmScreen"
|
||||
app:title="Set up alarm clock"
|
||||
app:fragment="io.r_a_d.radio2.preferences.AlarmFragment"
|
||||
app:fragment="fr.forum_thalie.tsumugi.preferences.AlarmFragment"
|
||||
/>
|
||||
|
||||
<Preference
|
||||
app:icon="@drawable/ic_av_timer"
|
||||
app:key="sleepScreen"
|
||||
app:title="Set sleep timer"
|
||||
app:fragment="io.r_a_d.radio2.preferences.SleepFragment"
|
||||
app:fragment="fr.forum_thalie.tsumugi.preferences.SleepFragment"
|
||||
/>
|
||||
|
||||
<Preference
|
||||
app:icon="@drawable/ic_customize"
|
||||
app:key="CustomizeFragment"
|
||||
app:title="Customize app behavior"
|
||||
app:fragment="io.r_a_d.radio2.preferences.CustomizeFragment"
|
||||
app:fragment="fr.forum_thalie.tsumugi.preferences.CustomizeFragment"
|
||||
/>
|
||||
|
||||
<Preference
|
||||
app:icon="@drawable/ic_notification"
|
||||
app:key="streamerNotifServiceFragment"
|
||||
app:title="Streamer Notification Service"
|
||||
app:fragment="io.r_a_d.radio2.preferences.StreamerNotifServiceFragment"
|
||||
app:fragment="fr.forum_thalie.tsumugi.preferences.StreamerNotifServiceFragment"
|
||||
/>
|
||||
|
||||
<Preference
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package io.r_a_d.radio2
|
||||
package fr.forum_thalie.tsumugi
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.60'
|
||||
ext.kotlin_version = '1.3.61'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
|
|
|||