tasker: plugin tweaks
This commit is contained in:
@@ -141,7 +141,7 @@
|
|||||||
android:name=".tasker.StartConfigBasicAction"
|
android:name=".tasker.StartConfigBasicAction"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="My Tasker Action">
|
android:label="Start Auxio">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
|
<action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ class StartActionHelper(config: TaskerPluginConfig<Unit>) :
|
|||||||
override fun addToStringBlurb(input: TaskerInput<Unit>, blurbBuilder: StringBuilder) {
|
override fun addToStringBlurb(input: TaskerInput<Unit>, blurbBuilder: StringBuilder) {
|
||||||
blurbBuilder.append(
|
blurbBuilder.append(
|
||||||
"Starts the Auxio Service. This will block until the service is fully initialized." +
|
"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" +
|
"You must start active playback/foreground state after this or Auxio may" +
|
||||||
"crash.")
|
"crash.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,10 +70,7 @@ class StartConfigBasicAction : Activity(), TaskerPluginConfigNoInput {
|
|||||||
class StartActionRunner : TaskerPluginRunnerActionNoOutputOrInput() {
|
class StartActionRunner : TaskerPluginRunnerActionNoOutputOrInput() {
|
||||||
override fun run(context: Context, input: TaskerInput<Unit>): TaskerPluginResult<Unit> {
|
override fun run(context: Context, input: TaskerInput<Unit>): TaskerPluginResult<Unit> {
|
||||||
ContextCompat.startForegroundService(context, Intent(context, AuxioService::class.java))
|
ContextCompat.startForegroundService(context, Intent(context, AuxioService::class.java))
|
||||||
while (!serviceRunning) {
|
while (!serviceRunning) {}
|
||||||
Thread.sleep(100)
|
|
||||||
}
|
|
||||||
|
|
||||||
return TaskerPluginResultSucess()
|
return TaskerPluginResultSucess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user