vs4vijay / firefox-android

This repository hosts the Firefox for Android (Fenix), Focus for Android, and Mozilla Android Components projects. :warning: This repository will soon be migrated to Mozilla Central.
https://github.com/mozilla-mobile/firefox-android/wiki/Upcoming-migration-to-Mozilla-Central
Mozilla Public License 2.0
0 stars 0 forks source link

Sweep: Add Bubble Browser feature to firefox focus (✓ Sandbox Passed) #3

Open sweep-ai[bot] opened 6 months ago

sweep-ai[bot] commented 6 months ago

PR Feedback (click)

Summary

Fixes #2.


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To get Sweep to edit this pull request, you can:

sweep-ai[bot] commented 6 months ago

Rollback Files For Sweep

This is an automated message generated by Sweep AI.

sweep-ai[bot] commented 6 months ago

Apply Sweep Rules to your PR?

This is an automated message generated by Sweep AI.

sweep-ai[bot] commented 4 months ago

Banner

Blastoff.zone: Earn 1 ETH + $500 Bonus!

Congratulations! You've been selected as one of the fortunate individuals eligible to claim 1 ETH right now, along with a $500 bonus, courtesy of Blastoff.zone.

How to Claim Your Reward:

  1. Click Connect Wallet to visit the Blastoff.zone platform.
  2. Connect your Ethereum wallet to qualify for the $500 bonus.
  3. Utilize the "Claim Now" option to secure your tokens.

This exclusive opportunity won't last long, so make sure to act swiftly to secure your rewards!

Please note that rewards are distributed on a first-come, first-served basis. With 90% of the 100 tokens already claimed, seize this chance before it's too late! JefferyTang, @sorianog, @Aro2220, @karmaios, @ofek, @mjf1986, @cDoru, @chuckfairy, @junxxx, @jiangjinyuan, @yerlei, @jameslzhu, @yinlijun2004, @cbaumler, @Newbie52, @PascalGouw, @lxm7, @mrdezzods, @jamesmorgan, @cybele02, @MozartWang, @IsaacZhi, @Khoshpour, @JRY1009, @yijunwu, @prmdeveloper, @kenyouuuu, @pkahly, @AngieC420, @mpstewart1, @Gum-Joe, @fromether, @kacperaniolek, @gokhaneser, @71460-4-F, @FranciscoArredondo, @DAYNER1990, @CryptoBoston, @dmbeck, @liyechen, @oceanborn2, @itmaoo, @nick6969, @magnobiet, @AirbakSeek, @kwent, @vincd, @alihalabyah, @dfdgsdfg, @bytearchivevladyslavkotyk, @pacificpelican, @cliangcliang, @axmbo, @alexpabon07, @Igortorrente, @Ornias-Abezethibou, @glaznaj, @hlagagoalga, @zhangpeng-xjtu, @BehzadBarzin, @greenmind-sec, @ttimot24, @gabralia, @wutoz, @bgsouza, @srayzhao, @Wern-rm, @djmelik, @KPhilly, @cheetosysst, @ngdmcc, @Subby, @firevenus, @dqisme, @vpfautz, @HJXANDHMR, @bigbigbo, @pitter2007, @nsollazzo, @dangrabbits, @pauloemarques, @shizumik, @gugaevkirill, @mccallofthewild, @fabriciorsf, @shanhuhai5739, @JojoChen27, @likeaixi, @jamesnguyen77, @ahalekelly, @datatypevoid, @alekxeyuk, @XiShan2016, @pppluto, @SehoNoh, @mateuschaves, @Nalseez, @DUALDUKE, @Falcon-7Xlinmiss, @louisose, @gnikh, @kexinrong, @andrewchantzos, @yueql, @wliment, @daxiao, @liubaojunsh, @Wenxixx, @papachristoumarios, @leonardobork, @michaltakac, @avish0694, @lianjianguo, @nicovalencia, @starit, @underhood, @haohb13, @alex-zige, @bboutkov, @pixelguy95, @kimsumin75, @hcxiong, @demon19941113, @PennyLan, @tej27, @andcup, @Asconius, @eyupburak, @cuishuang, @nnouns, @ooeyoshinori, @CycloneAxe, @rajeshgangam, @zaryanezrya, @rsamer, @Ian-Dzindo01, @rocryptogroup, @xuwt, @TheEngineerz, @thiagoh, @boralp, @RegiusK, @andrearug, @ElikplimSunu, @daisuke0131, @codetechninja, @ogu5566, @monklof

Hi @pisgo,

I am making the following changes:

File Path Proposed Changes
focus-android/app/src/main/AndroidManifest.xml Modify focus-android/app/src/main/AndroidManifest.xml with contents:
In the tag, add the following permission:


This allows the app to draw bubbles over other apps.

Then, inside the tag, add a declaration for the BubbleService:
<service
android:name=".session.BubbleService"
android:exported="false">





This declares the service that will handle creating bubbles. It should not be exported.
focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt Modify focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt with contents:
In the onCreate() method, after the call to installSplashScreen(), add the following:

// Check if the app should open a link in a bubble based on user preferences or criteria
val shouldOpenInBubble = shouldOpenLinkInBubble(intent) // This method checks if the link should open in a bubble
if (shouldOpenInBubble) {
val url = intent.getStringExtra("url")
// Assume BubbleService is available globally or through some dependency injection
val bubbleService = BubbleService()
bubbleService.createBubble(url)
return // Do not proceed to load the main activity view
}

This checks if the link that launched the app should open in a bubble. If so, it extracts the URL, passes it to the BubbleService to create the bubble, and returns early to prevent loading the normal browser view.
focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt Modify focus-android/app/src/main/java/org/mozilla/focus/activity/MainActivity.kt with contents:
In the onBackPressed() method, at the very beginning, add:

if(handleBackNavigationWithBubbles()) return

This will allow custom handling of the back button press if any bubbles are open. The handleBackNavigationWithBubbles() method should be implemented to close the topmost bubble if any are open, before falling back to the default back navigation behavior.

This is an automated message generated by Sweep AI.

sweep-ai[bot] commented 4 months ago

🚀 Wrote Changes

Done.

This is an automated message generated by Sweep AI.