Compare commits
3
Commits
v0.2.0-b13
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37346d8bde | ||
|
|
4d6fc3402b | ||
|
|
4b813c91e2 |
No files matched your search
@@ -9,6 +9,7 @@ import android.view.*;
|
||||
import android.widget.*;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import ca.rewr.clawdash.databinding.ActivityMainBinding;
|
||||
import ca.rewr.clawdash.databinding.ItemServiceBinding;
|
||||
import okhttp3.*;
|
||||
@@ -134,12 +135,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
return;
|
||||
}
|
||||
String path = SCRIPTS + scriptName;
|
||||
Intent intent = new Intent("com.termux.RUN_COMMAND");
|
||||
intent.setPackage("com.termux");
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("com.termux.RUN_COMMAND");
|
||||
intent.setClassName("com.termux", "com.termux.app.RunCommandService");
|
||||
intent.putExtra("com.termux.RUN_COMMAND_PATH", path);
|
||||
intent.putExtra("com.termux.RUN_COMMAND_ARGUMENTS", new String[0]);
|
||||
intent.putExtra("com.termux.RUN_COMMAND_WORKDIR", "/data/data/com.termux/files/home");
|
||||
intent.putExtra("com.termux.RUN_COMMAND_BACKGROUND", true);
|
||||
|
||||
try {
|
||||
sendBroadcast(intent);
|
||||
ContextCompat.startForegroundService(this, intent);
|
||||
} catch (Exception e) {
|
||||
showAlertDialog("Failed", "Could not execute " + scriptName + "\n" + e.getMessage());
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -1,9 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/bg" />
|
||||
<foreground>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/accent" />
|
||||
</shape>
|
||||
</foreground>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
Reference in new issue
Block a user