Skip to content

Tafhim/LogseqAndroidApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logseq Android Client

An Android application that communicates with the Logseq API to interact with your Logseq knowledge base.

Features

  • Connect to Logseq's local HTTP API server
  • Browse all pages in your graph
  • Search through blocks and content
  • Create new blocks
  • Authentication support with API tokens

Setup

  1. Start Logseq on your computer with the HTTP API server enabled
  2. Install and run this Android app
  3. Enter your Logseq server URL (default: http://localhost:12315)
  4. Optionally enter an API token if authentication is required
  5. Connect and start interacting with your Logseq graph

API Endpoints Used

  • GET /api/pages - Get all pages
  • GET /api/page/{name} - Get specific page
  • POST /api/block - Create new block
  • PUT /api/block/{id} - Update block
  • DELETE /api/block/{id} - Delete block
  • GET /api/search?q={query} - Search blocks

Dependencies

  • OkHttp for HTTP client
  • Gson for JSON parsing
  • Material Design Components
  • Kotlin Coroutines for async operations

Android SDK installation process

Install Android SDK command-line tools

wget https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip
unzip commandlinetools-linux-10406996_latest.zip
mkdir -p ~/android-sdk/cmdline-tools
mv cmdline-tools ~/android-sdk/cmdline-tools/latest

Set environment variables

export ANDROID_HOME=~/android-sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools

Accept licenses and install required SDK components

yes | sdkmanager --licenses
sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"

Then create the local.properties file:

echo "sdk.dir=$HOME/android-sdk" > local.properties

Generating Launcher Icons

If you need to regenerate the launcher icons (the app icons that appear on the Android home screen), use these ImageMagick commands:

# Create regular launcher icons for all densities
magick -size 192x192 xc:"#4CAF50" -gravity center -pointsize 48 -fill white -annotate +0+0 "L" app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
magick -size 144x144 xc:"#4CAF50" -gravity center -pointsize 36 -fill white -annotate +0+0 "L" app/src/main/res/mipmap-xxhdpi/ic_launcher.png
magick -size 96x96 xc:"#4CAF50" -gravity center -pointsize 24 -fill white -annotate +0+0 "L" app/src/main/res/mipmap-xhdpi/ic_launcher.png
magick -size 72x72 xc:"#4CAF50" -gravity center -pointsize 18 -fill white -annotate +0+0 "L" app/src/main/res/mipmap-hdpi/ic_launcher.png
magick -size 48x48 xc:"#4CAF50" -gravity center -pointsize 12 -fill white -annotate +0+0 "L" app/src/main/res/mipmap-mdpi/ic_launcher.png

# Create round launcher icons for all densities
magick -size 192x192 xc:"#4CAF50" -fill white -draw "circle 96,96 96,10" -gravity center -pointsize 48 -fill "#4CAF50" -annotate +0+0 "L" app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
magick -size 144x144 xc:"#4CAF50" -fill white -draw "circle 72,72 72,8" -gravity center -pointsize 36 -fill "#4CAF50" -annotate +0+0 "L" app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
magick -size 96x96 xc:"#4CAF50" -fill white -draw "circle 48,48 48,5" -gravity center -pointsize 24 -fill "#4CAF50" -annotate +0+0 "L" app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
magick -size 72x72 xc:"#4CAF50" -fill white -draw "circle 36,36 36,4" -gravity center -pointsize 18 -fill "#4CAF50" -annotate +0+0 "L" app/src/main/res/mipmap-hdpi/ic_launcher_round.png
magick -size 48x48 xc:"#4CAF50" -fill white -draw "circle 24,24 24,3" -gravity center -pointsize 12 -fill "#4CAF50" -annotate +0+0 "L" app/src/main/res/mipmap-mdpi/ic_launcher_round.png

Building

Open the project in Android Studio and build normally, or use Gradle:

./gradlew assembleDebug

About

A small app to add some Log Seq widgets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages