How to Implement a Floating Window in Android (Picture-in-Picture Mode) - Android Studio Tutorial

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • If you want to implement a floating window in Android that allows the user to use your app while using others, picture in picture mode is what you're looking for. In this video, you'll learn how you can use it.
    ⭐ Get certificates for your future job
    ⭐ Save countless hours of time
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become a professional Android developer now:
    pl-coding.com/...
    💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
    pl-coding.com/...
    Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
    pl-coding.com/...
    Join this channel to get access to perks:
    / @philipplackner
    Get the source code for this video here:
    github.com/phi...
    Join my Discord server:
    / discord
    Regular programming advice on my Instagram page: / _philipplackner_
    Checkout my GitHub: github.com/phi...
    You like my free content? Here you can buy me a coffee:
    www.buymeacoff...

КОМЕНТАРІ • 53

  • @tch.777
    @tch.777 2 роки тому +13

    Every time I see your content I love Android more and more, everything suddenly seems simple after learning from you, thank you so much!! Beautiful video as always!! 🙏

  • @syedovaiss
    @syedovaiss 2 роки тому +13

    Something different to me ♥️ your collaborations to this community will pay you off bro ♥️

  • @elfarouk3306
    @elfarouk3306 2 роки тому +4

    the best Android channel ever

  • @confuste
    @confuste Рік тому

    OMG. Just a couple days ago I thought: "I have to investigate how to do a picture in picture mode". You read minds.

  • @Akshaykumar-xr9yj
    @Akshaykumar-xr9yj 2 роки тому

    Ohh man, how did you read my mind. I was searching pip mode implementation with jetpack compose yesterday and today you uploaded video on same topic.

  • @mwai_dev
    @mwai_dev Рік тому +1

    Amazing content Philipp! Thank you for all you do!

  • @anthonygirdler606
    @anthonygirdler606 Рік тому +1

    Please explain how to use setActions to pause and play the video in java.
    There's a few videos floating around explaining how to implement PiP and send a message, but none explaining something useful.

  • @gstarentertainmentedits2415
    @gstarentertainmentedits2415 Рік тому +1

    Keeping uploading such good content, thank you 🙏🙏

  • @datel666
    @datel666 2 роки тому

    Big thank you for all of your tutorials!

  • @naveena3897
    @naveena3897 3 місяці тому

    How can I know if the user drag pip window and closes it. Suppose in video calling app if pip window closed by dragging down how can I end call and goto home fragment?

  • @JossEnssy
    @JossEnssy Рік тому

    Just what I need to finish my video player...

  • @mohammadabusayeed7259
    @mohammadabusayeed7259 Рік тому

    Beautiful video & informative. Thanks, Philipp

  • @theophilus494
    @theophilus494 Рік тому

    thank you Philipp. great tutorial in due time.

  • @Max_Yang
    @Max_Yang Рік тому

    Oh God, I do MISS my old Visual Basic
    It's so easy to make it happen.

  • @triplezgames3882
    @triplezgames3882 5 місяців тому

    Hello, I'm really stuck with an issue I can't seem to fix.
    I want a floating UI with a button to start and stop recording the underlaying apps.
    To record the screen I seem to need an Activity, but the button to start the recording is controlled by a Floating Window Service...
    So my theory was that I needed to create a communication between a capturingActivity and my FloatingWindowService, but nothing works and I have a strong feeling that I am going wrong somewhere...
    The recording has to be extremely fast, so I can process the captured screen using OpenCV in realtime. I also want to be able to click the screen really fast in case that changes anything about the infrastructure.
    Help would be awesome. thanks!

  • @rokas1
    @rokas1 Рік тому

    You also need to check if app has permission to open pip, user can remove such permission in app settings

  • @ghimias
    @ghimias 2 роки тому +1

    thanks for the video. Can you make project playest using Compose. like some real application.

    • @PhilippLackner
      @PhilippLackner  2 роки тому +1

      I have tons of videos building full projects in Compose

  • @arielmoreno1350
    @arielmoreno1350 11 місяців тому

    Phillip , excellent video very well explained by the way do you have this tutorial in java ?

  • @nguyencodervn
    @nguyencodervn 2 роки тому

    Thank you

  • @sourabh22
    @sourabh22 2 роки тому

    Thanks for the video. Can you make video on trigerring call pickup UI using firebase notifications in any app state.

  • @renanzumas4422
    @renanzumas4422 2 роки тому

    Its a very cool, the its very simples implementartion

  • @nipunshah1373
    @nipunshah1373 Рік тому

    What is difference between BroadCast Reciever (Pending Intent) and Implicit Intent, conceptually ?

  • @luisdanielmartinezbarrios532
    @luisdanielmartinezbarrios532 2 роки тому

    could you make a video of this for jetpack compose?

  • @harshwardhanparmar8258
    @harshwardhanparmar8258 2 роки тому

    Hi i want to add a question post layout in which user can add image, video, text , speech as question. How can I achieve this

  • @mehtabahmed4696
    @mehtabahmed4696 2 роки тому

    I have my player in a fragment is it possible to do something like configChanges in that fragment only and not the whole activity.

  • @androiddevelopment9012
    @androiddevelopment9012 2 роки тому

    Hi Phillip can you do a video on how to write a test class for clean architecture mvvm or test class for jetpack compose since we don't have many tutorial on that thanks

    • @ChrisAthanas
      @ChrisAthanas Рік тому

      he has many of those on this channel and in his paid courses

  • @omkarpawar1741
    @omkarpawar1741 Рік тому

    thanks for a great tutorial, I watched your Spotify clone tutorial , however Android has now introduced, jetpack media3 and exoplayer will be deprecated soon , can you PLEASE make a tutorial series for jetpack media3 and jetpack compose, using local storage audio files and media session , instead of the firebase files as were used in the Spotify clone tutorial , there is absolutely no tutorial available for jetpack media3 and android UAMP implementation is really complex thanks, regards.

    • @PhilippLackner
      @PhilippLackner  Рік тому +2

      Would be an idea 😁

    • @omkarpawar1741
      @omkarpawar1741 Рік тому

      @@PhilippLackner thanks for considering it , hopefully you make the tutorial soon, sorry I had not read the comment correctly earlier . thanks for all the great tutorials.

  • @mustafaammar551
    @mustafaammar551 2 роки тому

    very cool video
    wish you all the best

  • @jjjjjffeer
    @jjjjjffeer Рік тому

    I took a good look at this content. I have one question. I am trying to implement a function to take a screenshot by pressing a button in pip state, but since the receiver class is outside onCreate, I cannot use functions such as getWindow() related to the View type. Is there any good way?

  • @pangsatabam
    @pangsatabam 2 роки тому

    How is your editor so different? I mean the colors are better than the orange ones

  • @deviantstudio
    @deviantstudio 2 роки тому

    is it possible to draw floating window on top of system bars? or at least status bar?

  • @tehmooramjad8584
    @tehmooramjad8584 2 роки тому

    Make a video on floating window view in compose,Just like the button in video recording apps.

  • @camilohernandezruiz2776
    @camilohernandezruiz2776 Рік тому

    Thank you !!!!

  • @maskedredstonerproz
    @maskedredstonerproz 2 роки тому

    (just to clarify this is before watching) Is it possible to do this with any part of your activity/fragment?? not just a video view??

    • @PhilippLackner
      @PhilippLackner  2 роки тому

      Yeah, but the user can't interact with it apart from clicking some actions. If it should be interactable, you need a system overlay which requires a permission in the settings and a service

  • @programmer8979
    @programmer8979 Рік тому

    very good man good job😉

  • @ahmedshakr7802
    @ahmedshakr7802 2 роки тому

    Good job ❤️🌹

  • @venkatesh4307
    @venkatesh4307 2 роки тому

    There is a lot to learn in android

  • @mark-147
    @mark-147 2 роки тому

    Isn't it more standard to save/restore state rather than do the configchanges manifest tweak?

    • @PhilippLackner
      @PhilippLackner  2 роки тому

      This is not about state, it's just a requirement from PIP, since going into PIP mode will trigger a config change. You should be able to leave away the orientation though, since otherwise landscape specific layouts wouldn't be used in landscape mode

  • @Adam0001
    @Adam0001 2 роки тому

    😯 🔥
    Thank you 👏

  • @xalikv
    @xalikv 2 роки тому

    the very good video

  • @John-qt6qk
    @John-qt6qk Рік тому

    Aye lad, thats how it is, lol

  • @fhaaj66
    @fhaaj66 Рік тому

    It is werid that you guys focused so hard on Nice tutorialm saying "No homo" or that what he wrote softs gay. I an co one he just

  • @user-hs8zs5xi7q
    @user-hs8zs5xi7q Рік тому

    Is it possible to use the same method on the web view, for example, as a floating web browser? And if you don't mind, I hope you explain it to us, no one talked about this before