Skip to content

Pixiewood: init Android version - #44

Draft
GeopJr wants to merge 1 commit into
elly-code:mainfrom
GeopJr:feat/pixiewood/init
Draft

Pixiewood: init Android version#44
GeopJr wants to merge 1 commit into
elly-code:mainfrom
GeopJr:feat/pixiewood/init

Conversation

@GeopJr

@GeopJr GeopJr commented Aug 12, 2026

Copy link
Copy Markdown

Same as elly-code/jorts#144 but with some dep diffs I'll comment on. Parts are from Tuba, the OpenSSL patch is not written by me, I'll have to do proper attribution.

Comment thread data/Application.css
*/

window * {
font-weight: 700;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default android font is very thin and broken on some phones, making it bold fixes it

</key>
<key name="vertical-layout" type="b">
<default>false</default>
<default>true</default>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertical looks better on portrait devices by default, make it conditional on android


<requires>
<display_length compare="ge">360</display_length>
<internet>always</internet>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed for pixiewood to request the network permission on android

secrets = Secrets.get_default ();

system_language = DeepLUtils.detect_system ();
system_language = "EN-GB"; //DeepLUtils.detect_system ();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't detect system lang, assume english, todo conditional on android

Comment thread src/Services/Secrets.vala

construct {
schema = new Secret.Schema (APP_ID, Secret.SchemaFlags.NONE,
schema = new Secret.Schema (APP_ID, Secret.SchemaFlags.DONT_MATCH_NAME,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't remember if needed, sorry

};

var instruction = new Granite.HeaderLabel (_("To be able to do translations, paste your API Key in the field below")) {
var instruction = new Granite.HeaderLabel (_("API Key")) {

@GeopJr GeopJr Aug 12, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only reason was that the string was too long. In general that whole dialog just doesn't fit on mobile because the labels dont wrap

Comment thread src/Application.vala
#if ANDROID
GLib.Environment.set_variable ("SECRET_BACKEND", "file", false);
if (GLib.Environment.get_variable ("SECRET_BACKEND") == "file")
GLib.Environment.set_variable ("SECRET_FILE_TEST_PASSWORD", @"$(GLib.Environment.get_user_name ())", false);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so, on Linux, libsecret uses the keyring, but on Android (and Windows), this forces it to use the "file backend". Usually this is encrypted with a password, but one of the patches removes the encryption because it's annoying to build on android

Comment thread src/Application.vala
GLib.Environment.set_variable ("SECRET_BACKEND", "file", false);
if (GLib.Environment.get_variable ("SECRET_BACKEND") == "file")
GLib.Environment.set_variable ("SECRET_FILE_TEST_PASSWORD", @"$(GLib.Environment.get_user_name ())", false);
g_io_openssl_load (null);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed to load the statically linked gio module (google doesn't approve of loading them dynamically)

Comment thread src/meson.build
dependency ('libsoup-3.0'),
dependency ('libsecret-1')
dependency ('libsecret-1'),
dependency('gioopenssl', required: host_machine.system() == 'android')

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo, required: android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant