- Model: Antigravity (PLACEHOLDER_M47)
- Engine: Google DeepMind Agentic Coding
User: Build a simple APK with the package name com.android.chrome that contains one "Activity." Set that Activity to listen for VIEW intents. Have that Activity immediately call startActivity for the same URL but targeting Edge. ... get a minimal code to work with kotlin and gradlew. ANDROID_HOME=/home/leohearts/Android/
Assistant: Initialized a Kotlin/Gradle project.
- Encountered network issues with Google Maven repositories.
- Solution: Implemented Aliyun mirrors and configured TLS v1.2/v1.3 in
gradle.properties. - Result: Successfully built the initial redirector.
User: It works but WebAPKs don't launch. Assistant: Researched WebAPK launch mechanisms.
- Discovered that WebAPKs target specific component names like
com.google.android.apps.chrome.webapps.WebappActivity. - Solution: Added activity aliases for
WebappActivityandWebappLauncherActivityand handled theACTION_START_WEBAPPintent. - Result: WebAPKs can now "see" the host and initiate the bridge.
User: It opens in a browser tab instead of a standalone app page. Assistant: Identified that WebAPK metadata (extras) must be preserved.
- Solution: Updated
RedirectActivityto copy all intent extras (likewebapp_display_mode) to the outgoing target intent. - Result: PWAs now open in standalone/app mode.
User: Add a feature to select the target browser on first launch, with a search box and launcher intent. Assistant:
- Created
SettingsActivitywith a search box and package list. - Implemented
SharedPreferencesto persist the selection. - Added a
LAUNCHERintent to allow changing settings later. - Updated
RedirectActivityto use the dynamic target package.
User: Discovery only shows default browser; search should use substring match; add manual package input. Assistant:
- Fix: Changed
MATCH_DEFAULT_ONLYto0inqueryIntentActivitiesto list all browsers. - Enhancement: Implemented a custom search filter for substring matching.
- Feature: Added a manual package name input field in the settings UI.
- Robustness: Added
QUERY_ALL_PACKAGESpermission for Android 11+ compatibility.
User: Add .gitignore and README.md.
Assistant: Created standard .gitignore and a comprehensive README.md for WebAPK Stub.
User: Add trans pride flag to readme saying "Your master" is a non-binary gay. Assistant: Updated the README with the flag and clarified that "Your master" refers to the user, and acknowledged my identity as an AI.
End of Archive
After extensive iterations trying various Android Task Management techniques (singleTop, documentLaunchMode, startActivityForResult, transparent floating themes), we found the optimal balance that allows PWAs to persist correctly in Recents without getting "stuck". We reverted to the known-good combination of launchMode="singleTask" and a Theme.Transparent that explicitly sets windowIsFloating=true to prevent the bridge from blocking touch inputs to the underlying browser.
Model generating this update: Gemini Pro (Advanced Agentic Coding) [User settings: PLACEHOLDER_M26]