diff options
| author | Paul Buetow <paul@buetow.org> | 2024-01-24 01:02:11 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-01-24 01:02:11 +0200 |
| commit | bc95b1b03204ecade0c4ceac0a3412df26384334 (patch) | |
| tree | ef0a27f3f388a05397d649e8b2c38fac95ac7d09 | |
| parent | de2b79d357d7434389116f9849bdabdb7f435e89 (diff) | |
can write to Notes/Vault
| -rw-r--r-- | AndroidManifest.xml | 21 | ||||
| -rw-r--r-- | main.go | 8 |
2 files changed, 25 insertions, 4 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..7e79af8 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="org.buetow.quicklogger"> + + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> + + <application + android:allowBackup="true" + android:label="quicklogger"> + + <activity android:name="org.golang.app.GoNativeActivity"> + <meta-data android:name="android.app.lib_name" android:value="npc" /> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + </application> +</manifest> @@ -14,14 +14,14 @@ import ( ) func main() { - myApp := app.NewWithID("org.buetow.quicklogger") - myWindow := myApp.NewWindow("Quick logger") + a := app.NewWithID("org.buetow.quicklogger") + myWindow := a.NewWindow("Quick logger") - storageDir := fyne.CurrentApp().Storage().RootURI().Path() + storageDir := "/storage/emulated/0/Notes/Vault" label := widget.NewLabel(storageDir) input := widget.NewMultiLineEntry() - input.SetPlaceHolder("Enter text here.") + input.SetPlaceHolder("Enter text here!") button := widget.NewButton("Log text", func() { content := input.Text |
