Open Lumi Telegram links directly in the Android app
This commit is contained in:
1 parent
4c66473e07
commit
1fa6d9c8f0
16 files changed
+81
-27
No files matched your search
@@ -1,4 +1,9 @@
|
||||
# Changelog
|
||||
## [2.1.15] - 2026-10-07
|
||||
### Fixed
|
||||
- Open Telegram sync links on Android when the installed chat app is hidden from app availability checks.
|
||||
- Open Lumi in the installed Telegram app on Android, with a web link available when Telegram is not installed.
|
||||
|
||||
## [2.1.14] - 2026-10-07
|
||||
### Changed
|
||||
- Scroll up through Lumi chat history without Older and Newer buttons, keeping your place when replies arrive.
|
||||
|
||||
@@ -53,8 +53,8 @@ android {
|
||||
applicationId "xyz.waozi.inbe"
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
versionCode 151
|
||||
versionName "2.1.14"
|
||||
versionCode 152
|
||||
versionName "2.1.15"
|
||||
manifestPlaceholders = [
|
||||
inbeAppLabel: "Inner Breeze",
|
||||
inbeUsesCleartextTraffic: "false"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Fixed
|
||||
---
|
||||
- Open Telegram sync links on Android when the installed chat app is hidden from app availability checks.
|
||||
- Open Lumi in the installed Telegram app on Android, with a web link available when Telegram is not installed.
|
||||
@@ -1,5 +1,5 @@
|
||||
Package: inbe.waozi
|
||||
Version: 2.1.14
|
||||
Version: 2.1.15
|
||||
Architecture: arm64
|
||||
Maintainer: Waozi <[email protected]>
|
||||
Click-Version: 0.4
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.14" date="2026-10-07"/>
|
||||
<release version="2.1.15" date="2026-10-07"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "inbe",
|
||||
"title": "Inner Breeze",
|
||||
"version": "2.1.14",
|
||||
"version": "2.1.15",
|
||||
"architecture": "arm64",
|
||||
"framework": "ubuntu-sdk-20.04",
|
||||
"description": "Syncable breathing, meditation, and habit practice app.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "Inner Breeze",
|
||||
"short_name": "Inbe",
|
||||
"version": "2.1.14",
|
||||
"version": "2.1.15",
|
||||
"description": "Breathing, meditation, habit tracking, and encrypted sync.",
|
||||
"permissions": [
|
||||
"contextMenus"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.14" date="2026-10-07"/>
|
||||
<release version="2.1.15" date="2026-10-07"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -22,7 +22,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.14" date="2026-10-07"/>
|
||||
<release version="2.1.15" date="2026-10-07"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -60,6 +60,31 @@ LumiTelegramDisconnect :: () {
|
||||
lumi_telegram_disconnect_requested = true
|
||||
}
|
||||
|
||||
LumiTelegramOpen :: (start: string = "") -> bool {
|
||||
#if #defined(ANDROID_BUILD) || #defined(PLATFORM_ANDROID) || #defined(__ANDROID__) {
|
||||
native_link := "tg://resolve?domain=inlumi_bot"
|
||||
if start.count > 0 {
|
||||
native_link = PackageText("tg://resolve?domain=inlumi_bot&start=", start)
|
||||
}
|
||||
native_opened := OpenUri(native_link)
|
||||
if start.count > 0 {
|
||||
PackageFree(native_link)
|
||||
}
|
||||
if native_opened {
|
||||
return true
|
||||
}
|
||||
}
|
||||
web_link := "https://t.me/inlumi_bot"
|
||||
if start.count > 0 {
|
||||
web_link = PackageText("https://t.me/inlumi_bot?start=", start)
|
||||
}
|
||||
opened := OpenUri(web_link)
|
||||
if start.count > 0 {
|
||||
PackageFree(web_link)
|
||||
}
|
||||
return opened
|
||||
}
|
||||
|
||||
LumiTelegramBusy :: () -> bool {
|
||||
return lumi_telegram_link_requested || lumi_telegram_disconnect_requested ||
|
||||
(lumi_telegram_operation.active && (lumi_telegram_stage == 1 || lumi_telegram_stage == 5))
|
||||
@@ -86,6 +111,8 @@ LumiTelegramRequest :: (method: string, path: string, body: string, stage: s32)
|
||||
unused AppCopyText(AppTextFromCString(storage_user_id_buffer(), 64), lumi_telegram_owner[:])
|
||||
return true
|
||||
}
|
||||
print("LUMI: telegram_request_start_failed stage=% result=%\n", stage,
|
||||
lumi_telegram_operation.result)
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -221,7 +248,7 @@ LumiTelegramPump :: (app: *InnerBreeze) {
|
||||
if length > 0 {
|
||||
value := TextFromBytes(url[:length])
|
||||
if value.count == 62 && value[:30] == "https://t.me/inlumi_bot?start=" {
|
||||
lumi_telegram_waiting = OpenUri(value)
|
||||
lumi_telegram_waiting = LumiTelegramOpen(value[30:])
|
||||
lumi_telegram_error = !lumi_telegram_waiting
|
||||
}
|
||||
}
|
||||
@@ -240,6 +267,8 @@ LumiTelegramPump :: (app: *InnerBreeze) {
|
||||
lumi_telegram_error = false
|
||||
lumi_telegram_linked_at = 0
|
||||
} else if !success {
|
||||
print("LUMI: telegram_request_failed stage=% result=% status=%\n", stage,
|
||||
lumi_telegram_operation.result, lumi_telegram_operation.request.status)
|
||||
lumi_telegram_error = true
|
||||
if stage == 1 {
|
||||
lumi_telegram_waiting = false
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
#define APP_VERSION_MAJOR 2
|
||||
#define APP_VERSION_MINOR 1
|
||||
#define APP_VERSION_PATCH 14
|
||||
#define APP_VERSION_STRING "2.1.14"
|
||||
#define APP_VERSION_PATCH 15
|
||||
#define APP_VERSION_STRING "2.1.15"
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// Generated by update_version.sh from CHANGELOG.md. Do not edit by hand.
|
||||
VersionMajor :: 2
|
||||
VersionMinor :: 1
|
||||
VersionPatch :: 14
|
||||
VersionString :: "2.1.14"
|
||||
VersionPatch :: 15
|
||||
VersionString :: "2.1.15"
|
||||
@@ -88,7 +88,7 @@ c :: #system_library "c";
|
||||
method: [64]u8
|
||||
descriptor: [128]u8
|
||||
if !CopyCString(name, method[:]) ||
|
||||
!CopyCString(signature, descriptor[:]) {
|
||||
!CopyCString(signature, descriptor[:]) {
|
||||
return null
|
||||
}
|
||||
if is_static {
|
||||
@@ -104,7 +104,7 @@ c :: #system_library "c";
|
||||
field: [64]u8
|
||||
descriptor: [64]u8
|
||||
if !CopyCString(name, field[:]) ||
|
||||
!CopyCString(signature, descriptor[:]) {
|
||||
!CopyCString(signature, descriptor[:]) {
|
||||
return null
|
||||
}
|
||||
return env.functions.GetStaticFieldID(env, klass,
|
||||
@@ -115,7 +115,7 @@ c :: #system_library "c";
|
||||
text := JniString(env, uri)
|
||||
uri_class := UriFindClass(env, "android/net/Uri")
|
||||
if text == null || uri_class == null ||
|
||||
env.functions.ExceptionCheck(env) != 0 {
|
||||
env.functions.ExceptionCheck(env) != 0 {
|
||||
return null
|
||||
}
|
||||
parse := UriMethod(env, uri_class, "parse",
|
||||
@@ -144,8 +144,8 @@ c :: #system_library "c";
|
||||
add_flags := UriMethod(env, intent_class, "addFlags",
|
||||
"(I)Landroid/content/Intent;", false)
|
||||
if action_field == null || category_field == null || new_task_field == null ||
|
||||
constructor == null || add_category == null || add_flags == null ||
|
||||
env.functions.ExceptionCheck(env) != 0 {
|
||||
constructor == null || add_category == null || add_flags == null ||
|
||||
env.functions.ExceptionCheck(env) != 0 {
|
||||
return null
|
||||
}
|
||||
action := env.functions.GetStaticObjectField(env, intent_class, action_field)
|
||||
@@ -211,12 +211,12 @@ c :: #system_library "c";
|
||||
}
|
||||
result: s32 = 0
|
||||
intent := UriNewIntent(session.env, uri)
|
||||
if intent != null && UriCanOpenAndroid(*session, intent) {
|
||||
result = 1
|
||||
if intent != null {
|
||||
if open {
|
||||
// Android package visibility can hide a launchable handler.
|
||||
// Try the intent directly; a missing handler raises an exception.
|
||||
method := JniMethod(*session, "startActivity",
|
||||
"(Landroid/content/Intent;)V")
|
||||
result = 0
|
||||
if method != null && session.env.functions.ExceptionCheck(session.env) == 0 {
|
||||
arguments: [1]JniValue
|
||||
arguments[0].reference = intent
|
||||
@@ -224,8 +224,13 @@ c :: #system_library "c";
|
||||
session.activity, method, *arguments[0])
|
||||
if session.env.functions.ExceptionCheck(session.env) == 0 {
|
||||
result = 1
|
||||
} else {
|
||||
// A fallback may follow. Do not log a private deep link.
|
||||
session.env.functions.ExceptionClear(session.env)
|
||||
}
|
||||
}
|
||||
} else if UriCanOpenAndroid(*session, intent) {
|
||||
result = 1
|
||||
}
|
||||
}
|
||||
activity_jni_detach(*session)
|
||||
|
||||
@@ -52,7 +52,7 @@ settings_telegram_draw :: (app: *InnerBreeze, x: s32, width: s32, y: *s32) {
|
||||
if !has_account {
|
||||
app_apply_nav_route(app, cast(s32)APP_NAV_ROUTE_PROFILE)
|
||||
} else if linked {
|
||||
if !OpenUri("https://t.me/inlumi_bot") {
|
||||
if !LumiTelegramOpen() {
|
||||
lumi_telegram_error = true
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -32,6 +32,7 @@ detach_count: s32;
|
||||
frame_count: s32;
|
||||
frame_failed: bool;
|
||||
exception_pending: u8;
|
||||
exception_descriptions: s32;
|
||||
method_name: [96]u8;
|
||||
java_strings: [40][256]u8;
|
||||
string_count: s32;
|
||||
@@ -45,6 +46,7 @@ native_dark: NativeIntegerFn;
|
||||
native_practice: NativePracticeFn;
|
||||
native_donation: NativeBooleanFn;
|
||||
resolve_available: bool = true;
|
||||
launch_available: bool = true;
|
||||
network_test: bool;
|
||||
network_state: s32 = -1;
|
||||
network_length: s32 = 3;
|
||||
@@ -117,6 +119,7 @@ FakeException :: (env: *JniEnv) -> u8 {
|
||||
}
|
||||
FakeDescribe :: (env: *JniEnv) {
|
||||
unused env
|
||||
exception_descriptions += 1
|
||||
}
|
||||
FakeClear :: (env: *JniEnv) {
|
||||
unused env
|
||||
@@ -172,6 +175,9 @@ FakeVoid :: (env: *JniEnv, object: *void, method: *void,
|
||||
unused object
|
||||
unused method
|
||||
void_calls += 1
|
||||
if CStringEquals(*method_name[0], "startActivity") && !launch_available {
|
||||
exception_pending = 1
|
||||
}
|
||||
if CStringEquals(*method_name[0], "httpCancel") {
|
||||
Require(arguments[0].integer == 71, 90)
|
||||
network_cancelled += 1
|
||||
@@ -522,7 +528,12 @@ main :: () -> s32 {
|
||||
CopyCString("monero:84abc?tx_amount=0.1", path[:])
|
||||
Require(CanOpenURI(*path[0]) == 1 && OpenURI(*path[0]) == 1, 84)
|
||||
resolve_available = false
|
||||
Require(CanOpenURI(*path[0]) == 0 && OpenURI(*path[0]) == 0, 85)
|
||||
Require(CanOpenURI(*path[0]) == 0 && OpenURI(*path[0]) == 1, 85)
|
||||
launch_available = false
|
||||
descriptions_before_launch := exception_descriptions
|
||||
Require(OpenURI(*path[0]) == 0 && exception_pending == 0 &&
|
||||
exception_descriptions == descriptions_before_launch, 102)
|
||||
launch_available = true
|
||||
Require(frame_count == 0, 86)
|
||||
unused CopyCString("zh-Hant-TW;ja-JP", locale_preferences[:])
|
||||
Require(app_locale_preferences() == "zh-Hant-TW;ja-JP" && frame_count == 0, 89)
|
||||
|
||||
+4
-4
@@ -6,8 +6,8 @@ IDI_APP_ICON ICON "inbe.ico"
|
||||
IDI_NOTIFICATION_ICON ICON "inbe.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,1,14,0
|
||||
PRODUCTVERSION 2,1,14,0
|
||||
FILEVERSION 2,1,15,0
|
||||
PRODUCTVERSION 2,1,15,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -24,11 +24,11 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "waozi"
|
||||
VALUE "FileDescription", "Inner Breeze"
|
||||
VALUE "FileVersion", "2.1.14"
|
||||
VALUE "FileVersion", "2.1.15"
|
||||
VALUE "InternalName", "inbe"
|
||||
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
|
||||
VALUE "ProductName", "Inner Breeze"
|
||||
VALUE "ProductVersion", "2.1.14"
|
||||
VALUE "ProductVersion", "2.1.15"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Reference in new issue
Block a user