tasker: remove
Can't do this right now, lifecycle is broken.
This commit is contained in:
parent
b955e2f3ab
commit
0f691ee65b
4 changed files with 5 additions and 93 deletions
|
@ -5,11 +5,10 @@
|
|||
#### What's New
|
||||
- Android Auto support
|
||||
- Full media browser implementation
|
||||
- Service can now operate independently of app
|
||||
- Added basic tasker plugin
|
||||
|
||||
#### What's Improved
|
||||
- Album covers are now loaded on a per-song basis
|
||||
- Correctly interpret MP4 sort tags
|
||||
|
||||
#### What's Fixed
|
||||
- Fixed repeat mode not restoring on startup
|
||||
|
@ -18,6 +17,10 @@
|
|||
- For the time being, the media notification will not follow Album Covers or 1:1 Covers settings
|
||||
- Playback will close automatically after some time left idle
|
||||
|
||||
#### dev -> dev1 changes
|
||||
- Re-added ability to open app from clicking on notification
|
||||
- Removed tasker plugin
|
||||
|
||||
## 3.4.3
|
||||
|
||||
#### What's Improved
|
||||
|
|
|
@ -151,9 +151,6 @@ dependencies {
|
|||
// Speed dial
|
||||
implementation "com.leinardi.android:speed-dial:3.3.0"
|
||||
|
||||
// Tasker
|
||||
implementation 'com.joaomgcd:taskerpluginlibrary:0.4.10'
|
||||
|
||||
// Testing
|
||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
|
|
|
@ -135,17 +135,5 @@
|
|||
android:resource="@xml/widget_info" />
|
||||
</receiver>
|
||||
|
||||
|
||||
<!-- Tasker integration -->
|
||||
<activity
|
||||
android:name=".tasker.StartConfigBasicAction"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="Start Auxio">
|
||||
<intent-filter>
|
||||
<action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
</manifest>
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Auxio Project
|
||||
* Start.kt is part of Auxio.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.oxycblt.auxio.tasker
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.joaomgcd.taskerpluginlibrary.action.TaskerPluginRunnerActionNoOutputOrInput
|
||||
import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfig
|
||||
import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfigHelperNoOutputOrInput
|
||||
import com.joaomgcd.taskerpluginlibrary.config.TaskerPluginConfigNoInput
|
||||
import com.joaomgcd.taskerpluginlibrary.input.TaskerInput
|
||||
import com.joaomgcd.taskerpluginlibrary.runner.TaskerPluginResult
|
||||
import com.joaomgcd.taskerpluginlibrary.runner.TaskerPluginResultSucess
|
||||
import org.oxycblt.auxio.AuxioService
|
||||
|
||||
private var serviceRunning = false
|
||||
|
||||
fun indicateServiceRunning() {
|
||||
serviceRunning = true
|
||||
}
|
||||
|
||||
fun indicateServiceStopped() {
|
||||
serviceRunning = false
|
||||
}
|
||||
|
||||
class StartActionHelper(config: TaskerPluginConfig<Unit>) :
|
||||
TaskerPluginConfigHelperNoOutputOrInput<StartActionRunner>(config) {
|
||||
override val runnerClass: Class<StartActionRunner>
|
||||
get() = StartActionRunner::class.java
|
||||
|
||||
override fun addToStringBlurb(input: TaskerInput<Unit>, blurbBuilder: StringBuilder) {
|
||||
blurbBuilder.append(
|
||||
"Starts the Auxio Service. This will block until the service is fully initialized." +
|
||||
"You must start active playback/foreground state after this or Auxio may" +
|
||||
"crash.")
|
||||
}
|
||||
}
|
||||
|
||||
class StartConfigBasicAction : Activity(), TaskerPluginConfigNoInput {
|
||||
override val context: Context
|
||||
get() = applicationContext
|
||||
|
||||
private val taskerHelper by lazy { StartActionHelper(this) }
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
taskerHelper.finishForTasker()
|
||||
}
|
||||
}
|
||||
|
||||
class StartActionRunner : TaskerPluginRunnerActionNoOutputOrInput() {
|
||||
override fun run(context: Context, input: TaskerInput<Unit>): TaskerPluginResult<Unit> {
|
||||
ContextCompat.startForegroundService(context, Intent(context, AuxioService::class.java))
|
||||
while (!serviceRunning) {}
|
||||
return TaskerPluginResultSucess()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue