Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 3.52 KB

File metadata and controls

61 lines (48 loc) · 3.52 KB

Conversation Source Code (Transcript)

Model Info

  • Model: Antigravity (PLACEHOLDER_M47)
  • Engine: Google DeepMind Agentic Coding

Transcript

Initial Request

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/

Phase 1: Project Initialization

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.

Phase 2: WebAPK Fix

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 WebappActivity and WebappLauncherActivity and handled the ACTION_START_WEBAPP intent.
  • Result: WebAPKs can now "see" the host and initiate the bridge.

Phase 3: PWA Standalone Mode

User: It opens in a browser tab instead of a standalone app page. Assistant: Identified that WebAPK metadata (extras) must be preserved.

  • Solution: Updated RedirectActivity to copy all intent extras (like webapp_display_mode) to the outgoing target intent.
  • Result: PWAs now open in standalone/app mode.

Phase 4: Dynamic Browser Selection

User: Add a feature to select the target browser on first launch, with a search box and launcher intent. Assistant:

  • Created SettingsActivity with a search box and package list.
  • Implemented SharedPreferences to persist the selection.
  • Added a LAUNCHER intent to allow changing settings later.
  • Updated RedirectActivity to use the dynamic target package.

Phase 5: Discovery & Search Improvements

User: Discovery only shows default browser; search should use substring match; add manual package input. Assistant:

  • Fix: Changed MATCH_DEFAULT_ONLY to 0 in queryIntentActivities to 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_PACKAGES permission for Android 11+ compatibility.

Phase 6: GitHub Publication

User: Add .gitignore and README.md. Assistant: Created standard .gitignore and a comprehensive README.md for WebAPK Stub.

Final Request

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

Recents Recovery Fix Updates

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]