Open mujeebcpy opened 23 hours ago
@mujeebcpy Had same issue on my device. I'm not sure but maybe could detect on the odd 6668.100
string in the UA?
UA for future ref: Mozilla/5.0 (Linux; Android 14; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.100 Mobile Safari/537.36
I'm not sure what uses that Chrome build but on the window there is a property called TelegramWebview
that we could maybe count on.
we may detect inapp. But the current escape link is not working. So how to overcome that ? @shalanah
@mujeebcpy Excellent point.
I'll have to do a bit more research to see if there are other ways to exit Android in-app browsers or if the intent link needs to be formatted differently.
If that comes up short - you might want to do specific UI for Telegram that tells the user to click on the 3 dots or directions to open in their default browser instead.
@mujeebcpy Do you have better luck with this url scheme?
`intent://${urlhere}#Intent;scheme=https;end`
ie: intent://example.com#Intent;scheme=https;end
Inappdebugger testing branch: https://deploy-preview-7--inappdebugger.netlify.app/
yes. this opens the default browser. thank you. @shalanah found a way to detect it?
UA for future ref: Mozilla/5.0 (Linux; Android 14; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.100 Mobile Safari/537.36
window.TelegramWebview
Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/22B5045g Safari/604.1
window.TelegramWebviewProxy
and window.TelegramWebviewProxyProto
existhttps://github.com/TelegramMessenger/Telegram-iOS/issues/736
seems there is an unsolved issue from 2022. users actively asking progress
@mujeebcpy I could just add detection for Android, for now, since most people use this library to make downloads work. But if others want to escape for other reasons like user sign in etc I might need to add some return properties about download capabilities of the latests builds only for blob urls and static assets. Any thoughts?
Here's my thoughts on how to proceed.
Add an exclude
parameter to InAppSpy that takes an array of inapp browsers to ignore
ie:
InAppSpy({
exclude: [{
appKey: 'telegram',
brand: 'apple' // or 'android' or 'all' if left blank assumed 'all'
}] // since downloads seem to work for now on this
})
This decouples the problems of in-app versions and me having to track in this repo which in-app browsers are problematic (which most are). I'll suggest a good excludes array in the documentation for those who care about current downloading capabilities.
Maybe even better is I have that functionality, but I give the user the ability to us the default includes...
InAppSpy({
include: 'all' // or 'recommended' - blobUrls or static downloads fail, 'static' - static downloads fail
})
For now I'm going to add Telegram just for Android and later add it for iOS with some of the includes
ideas above since downloads work on that platform.
See #31
Describe the bug Telegram in app browser is not being detected. the static svg is downloading id happening But blob svg not downloading. Also escape link also not working.
To Reproduce open https://inappdebugger.com/ from telegram chat.
Expected behavior Should detect it is viewing from telegram. And external browser should open when i click escape link.
Screenshots