Quantcast
Jump to content

Adapt Your App to Foldable Devices for an Optimal User Experience


STF News
 Share

Recommended Posts

2021-09-14-01-banner.jpg

Foldable technology for mobile is a groundbreaking experience not only for users but also for developers. The presence of many form factors like immersive display, app continuity, Flex mode and UX optimization challenge developers to think outside of the box to adapt to this technology. In this blog, we discuss a checklist to provide a better understanding about the adaptation, modification and design changes that are required. So, let's go through each point, one-by-one.

Large screen optimization

Samsung foldable devices have two different physical screens: the cover display and the main display. As the cover display is much smaller than the main display, large screen optimization is one of the key areas of designing UX for foldable devices. In a nutshell, your app can utilize the extra space in the main display by showing more information. Just having a different UI design with the same information can do the trick of optimization as well.

Large screen optimization of a note app Large screen optimization of a note app

To implement this scenario, define different layout files for each display using the alternate resources option. For example, if you want to define a different UI for the main display, create a new directory named layout-sw600dp under the res directory and then create an xml file named activity_main. Then add the layout code as required.

UI is designed separately for the main display and the cover display UI is designed separately for the main display and the cover display

Flex mode optimization

In Galaxy Z series devices, Samsung introduced a new mode called Flex mode. This mode allows users to use apps while the book-like phone is partially folded. Creative design can really make your app stand out from others in Flex mode.

Google Duo App in Flex mode in Galaxy Z series devices Google Duo app in Flex mode in Galaxy Z series devices

Using Google’s new Jetpack library, WindowManager, you can detect the current posture of a Galaxy Z series device and update the UI accordingly by following these steps:

Step 1: Add the dependencies in the build.gradle.

implementation "androidx.window:window:1.0.0-alpha01"

Step 2: Define a WindowManager instance.

val windowManager = WindowManager(this, null)

Step 3: Register the DeviceState change listener. The listener notices changes in the device state (for example CLOSED, OPENED, HALF_OPENED).

windowManager.registerDeviceStateChangeCallback( 
mainThreadExecutor /* Executor */, 
callback /* Consumer<DeviceState> */
)

Step 4: Write a callback function to check deviceState.posture to get the current posture of the device. If the posture is POSTURE_HALF_OPENED, the app UI gets updated for Flex mode.

val callback = Consumer<DeviceState> { deviceState ->
  if (deviceState.posture == DeviceState.POSTURE_HALF_OPENED) {
    // Display is folded, show Split UX
  } else {
    // Display is not folded, show Full Screen UX
  }
}

Check out the CodeLab challenge on Flex mode for a more hands-on experience.

App continuity

While folding and unfolding the device, the app must prevent data loss thus ensuring its continuity. This is achievable by using the onSaveInstanceState() method. First, save the data to retain the current state with onSaveInstanceState().

@Override
public void onSaveInstanceState(Bundle savedInstanceState)
{
    //Save the current state
}

Then, restore the data in the onCreate() function.

@Override
protected void onCreate(Bundle savedInstanceState)
{
    if (savedInstanceState != null) {
        //restore the previous state
    }
}
2020-11-26-01-02.jpg 2020-11-26-01-03.jpg

Stopwatch app continuity while unfolding device

To have a better understanding of implementing app continuity, see the CodeLab challenge on app continuity.

Responsive UI layout

To adapt to new form factors such as a diverse aspect ratio, Flex mode, multi-window, and pop-up window, utilize the following guidelines :

  • Design a responsive UI layout for your app using ConstraintLayout.
  • Define the activity of your app as resizable, to ensure the maximum compatibility of your app with both the cover display and the main display of the device. Set the resizableActivity attribute to true in Manifest.xml.
<activity android:name=".MainActivity" android:resizeableActivity="true">
  
…
</activity>

Responsive layout of the Spotify app Responsive layout of the Spotify app

Cutout and punch hole of the main display

The main display of a Galaxy Z Fold is covered by an area on the top-right side called the “L-cut” whereas the Galaxy Z Fold2 and Fold3 have a punch hole in the upper right side and the Galaxy Z Flip devices have a punch hole in the middle. Some portion of your app’s UI could be covered by the L-cut or the punch hole.

Content is covered by the L-cut in a Galaxy Fold device Content is covered by the L-cut in a Galaxy Fold device in landscape mode

To avoid such a scenario, depending on your UI content style, define a display cutout mode. For example, the content is letterboxed in landscape mode whereas it is rendered into the cutout area in portrait mode by default. Define the display cutout mode in the style.xml as shortEdges so that your content is rendered into the cutout area in both portrait and landscape modes.

<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
2020-11-26-01-07.jpg 2020-11-26-01-08.jpg

Display cutout in the default mode and the shortEdges mode, respectively

Last but not the least, you can test your app on our device cloud, Samsung Remote Test Lab, to make sure you have implemented all the checkpoints discussed in this blog. You can also participate in our Codelab challenges to have a clear understanding of the implementation details.

In this blog we have discussed about how to adapt your app for foldable devices. We hope it is a good guide for you to start with. You can also check out Samsung’s official documentation and reach out to our developer community if you have any queries.

View the full blog at its source

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Similar Topics

    • By STF News
      Samsung Electronics today announced the latest development in its ongoing partnership with streaming giant, Netflix, to herald the release of the second season of its hit-show, Emily in Paris, produced by MTV Entertainment Studios. The Emmy-nominated show, renowned for its 21st century celebration of iconic Parisian style, has collaborated with Samsung to showcase world-class premium technology to fans of the series.
       
      In the first season, the beautiful setting and quintessentially Parisian characters gave viewers an insight into French style and culture and are some of the driving forces behind the show’s success. This sense of escapism was created and elevated by the global cast, including the iconic character of Sylvie Grateau. Played by Samsung ambassador Philippine Leroy-Beaulieu, Sylvie acts as lead protagonist Emily’s boss, and the CMO of luxury marketing agency Savoir. Sylvie’s character embodies true stylish authority; great at her job, powerful, commanding and effortlessly chic, she became one of the most widely recognized and loved characters from the show’s debut season. In season two, to make sure she keeps on top of her personal and professional life, Sylvie has chosen the stylish and snappy Samsung Galaxy Z Flip 5G to keep Emily and the rest of the agency on their toes.
       

       

       
      But Sylvie is not the only one to benefit from the style and glamour of the Galaxy Z Flip 5G. To launch the second season, Samsung and Netflix will bring iconic style and innovative technology to fans of Emily in Paris through an integrated campaign; featuring offline ads, social and influencer content, and a TikTok filter that provides a new way for fans to enjoy the show, through the lens of the iconic Galaxy Z Flip 5G. The filter will allow fans to “flip the script” and become the lead character in their own Emily in Paris animated poster. The stunning Galaxy Z Flip 5G will unfold in front of the user, putting them front and center before the iconic Eiffel Tower. TikTok users* can try out the Flip the Script TikTok Effect on the platform as of 28th of December.
       
      Benjamin Braun, Samsung CMO for Europe, said, “At Samsung, we are always at the forefront of creativity and innovation. We are excited to partner with Netflix for the second season of one of their biggest shows, Emily in Paris, and to see Sylvie wielding the iconic Galaxy Z Flip 5G fits the personality of the device perfectly. We’re looking forward to developing this partnership further and deeper in the future.”
       
      Samsung’s latest line of premium products are set to push the boundaries of innovation for fans of Emily in Paris, showcasing the brands’ ability for combining style with flagship innovation and craftmanship. Some of the Samsung products include:
       
      The Galaxy Z Flip 5G: A premium and innovative foldable phone developed for trend-setters and multi-taskers who want to easily flip between capturing the perfect selfie and sending out a series of emails, or catch-up on the latest episode on the go.  

       
      The Galaxy Watch3: A fashionable and functional wearable that enables you to track all your wellness metrics with a flip of your wrist, turning your daily walk into a dazzling catwalk. The Serif: A one-of-a-kind television that blends iconic design and startling picture to transform every show or film into the ultimate viewing experience, as if you’re walking through the Musée D’Orsay yourself.  

       
      The Sero: The revolutionary Sero TV is a world-first design, enabling you to seamlessly flip between horizontal and vertical content so you can watch Netflix and mobile social content with ease.  

       
      The Bespoke Cube: A compact and multi-functional refrigerator solution that can easily be placed anywhere in the home, keeping everything from wine to cosmetics fresh for longer. The Bespoke Fridge Freezer: The iconic modular refrigerator solution that allows you to welcome personalization and innovative technology into your home.  
      Emily in Paris season 2 will be available to watch on Netflix on the 22nd of December.
       
       
      * TikTok filter will be available in the UK, Germany, France Italy and Spain from Dec 28th ’21 to 26 Feb ’22.
       
       
      About Netflix, Inc.
      Netflix is the world’s leading streaming entertainment service with over 209 million paid memberships in over 190 countries enjoying TV series, documentaries and feature films across a wide variety of genres and languages. Members can watch as much as they want, anytime, anywhere, on any internet-connected screen. Members can play, pause and resume watching, all without commercials or commitments.
      View the full article
    • By STF News
      As we emerge from the pandemic, our world has become more virtual and continues to shift online at a rapid pace. Keeping up with these changes, Samsung introduces a range of innovative display products and solutions at InfoComm 2021 in Orlando, Florida.
       

       
      In addition, Samsung is hosting ‘InfoComm 2021 Samsung VX’, a new-concept event that will allow people who cannot attend InfoComm in person this year, including key customers and retailers, to experience its products and solutions virtually.
       
      The cutting-edge commercial display solutions set to be introduced by Samsung, which can be used in a variety of business settings, include:
       
      ‘The Wall’ – a MICRO LED technology-based commercial display. Neo QLED 8K Signage that offers industry-leading picture quality with Quantum Mini LEDs and Quantum Matrix Technology Pro. Outdoor signage products that are dustproof and waterproof, producing bright and brilliant messages on displays that are built for the outdoors.  

       
      The Wall, a next-generation display that comes equipped with a MICRO AI processor and the latest display technology, features a bezel-free modular screen that can be easily customized to suit the design of any space. It can be implemented across a range of commercial environments and can be installed in various positions including in an L-shape, concave, convex, on a ceiling or hanging to offer customers and partners more convenience.
       

       
      During the event, Samsung unveils Neo QLED 8K Signage for the first time, which is powered by Quantum Matrix Technology Pro. Neo QLED 8K Signage delivers unrivaled picture quality thanks to Quantum Mini LEDs. The display will also be available in a choice of 65-, 75- and 85-inch models, and will offer the option of either portrait or landscape orientation. Neo QLED 8K Signage also features an Infinity One Design, seamlessly fitting into any business environment with its slim and minimalistic look.
       

       
      Finally, as sales of EVs (electric vehicles) continue to increase significantly, demand for the installation of charging stations has been rapidly growing too. Samsung’s outdoor signage displays are currently being used at EV charging stations, ensuring that the stations are equipped with the best visual display technology to offer customers an optimal experience. This outdoor signage features enhanced visibility, brightness greater than 3,500nits, and 24/7 performance ensuring crisp content at all times. These advanced displays provide customers with a variety of important information such as maps, traffic updates and digital advertisements – for businesses such as convenience stores, gas stations and quick service restaurants.
       
      Samsung introduces the future of displays at InfoComm 2021, North America’s largest pro-AV industry event, which features more than 40,000 attendees. We look forward to seeing you there, either in person or virtually.
       
      To learn more about InfoComm 2021 Samsung VX, please visit: https://displaysolutions.samsung.com/showcase/virtual-experience/infocomm-2021.
      View the full article
    • By STF News
      Samsung Electronics today announced a new partnership with CJ ENM, Asia’s leading entertainment and media group behind the Oscar-winning film ‘Parasite’, to build a virtual production studio to spearhead the production of future video content. Combining its cutting-edge Micro LED technology with CJ ENM’s globally recognized content production of television series and films, Samsung is taking the next step in a new initiative to innovate in the rapidly expanding virtual production market.
       
      Through this partnership, Samsung will supply its state-of-the-art display technology, The Wall, to CJ ENM’s virtual studio, a part of its television and film production studio complex scheduled to open in Paju, Korea later this year. The custom virtual production volume studio will be the first in the world to leverage The Wall’s boundless LED technology, unlocking new possibilities for video content production operations and virtual production solutions. The main display will be installed in an oval shape with a diameter of 20 meters and a height of seven meters or more, creating a seemingly endless backdrop to capture content.
       

       
      “We are excited to collaborate with CJ ENM to build a virtual production studio featuring Samsung’s most cutting-edge display technologies,” said Jong-hee Han, President of Visual Display Business at Samsung Electronics. “With this partnership, Samsung is launching a new virtual production industry initiative with a commitment to deliver innovative products and solutions that offer the optimal environment for next-generation content production.”
       
      This virtual production studio will use LED displays and connected cameras to create virtual settings in real-time. This solution will save time and reduce image compositing and on-location production costs while helping filmmakers to see the camera on the live-action set in any direction.
       
      The Wall’s modular technology allows creators to design environments to their specific requirements, enabling a variety of installation options such as ceiling installation and convex or concave design, depending on the internal studio design.
       

       
      The 2021 model of The Wall (Model Name: IWA) with Micro LED technology enhances visual expression with ultra-deep blacks and wide viewing angles, giving filmmakers and content creators the ultimate canvas to fulfill their visions. The modular screens are ideal for studios thanks to their precise color expression, HDR10+ and cinema LED picture quality technology and optimized frame rates for production houses. A new molding process is also applied to the modular surfaces of The Wall to minimize any moiré patterns from forming, a nuisance typically associated with filming standard LED screens.
       
      The Wall’s massive screen measures over 1,000 inches, producing vibrant colors and details supporting up to 16K high-resolution1 content. Dedicated frame rates for studio production, a new addition to this year’s model, allows producers to run content at frame rates such as 23.976, 29.97 and 59.94Hz, ensuring seamless videos sync with the most widely used camera framerates. Frame Rate Sync technology further reduces screen disruptions for true-to-life accuracy. With thoughtful dust and contamination-resistant LED protective films, plus a variety of easy-to-use solutions, such as remote management and color adjustment, The Wall is built for convenient management in any environment.
       
      CJ ENM Virtual Studio Concept Visual
       
      Both companies expect this collaboration to improve content production possibilities while satisfying a variety of customers by reimagining content production for today’s fast-paced entertainment environment.
       
      “The strategic partnership with Samsung will allow CJ ENM to push forward the creation of a new powerhouse of the next-generation content,” said Ho-sung Kang, CJ ENM CEO. “While CJ ENM is investing $4.4 billion over the next five years in entertainment content, we are taking the lead in building a global No. 1 production studio to become a world leading entertainment company.”
       
       
      About CJ ENM
      CJ ENM is Asia’s leading entertainment and lifestyle company headquartered in Seoul, Korea. Since 1995, the company has engaged in a wide array of businesses across the industry spectrum including media content, music, film, performing arts, and animation, providing its top notch original content to various media platforms. CJ ENM has created, produced and distributed globally acclaimed contents including Cannes-winning film Parasite, Tony Award-winning musical Kinky Boots, record-breaking Korean box office hits Roaring Currents, Extreme Job, Ode to My Father, along with sought-after television series such as Crash Landing On You, Mr. Sunshine, Guardian: The Lonely and Great God, Grandpas over Flowers, I Can See Your Voice and more. To offer the best K-Culture experiences worldwide, CJ ENM presents KCON/KCON:TACT, the world’s largest K-culture convention & festival celebrating Hallyu and Mnet Asian Music Awards (MAMA), Asia’s biggest music awards. With regional offices in Asia, Europe and the U.S., CJ ENM currently employs over 3,600 people.
       
       
      1 16K resolution is only available for horizontal layouts with a 15,360 x 2,160-pixel arrangement.
      View the full article
    • By STF News
      With their 2021 MICRO LED line, Samsung is bringing users breathtaking visual experiences on an ultra-large TV for the very first time. In order to celebrate the next-generation display technology of MICRO LED, globally renowned media art and design studio Refik Anadol Studio has custom-designed a series of dynamic data sculptures, entitled Artificial Landscapes.
       
      Mirroring the way Samsung seeks to bring transformation to its users’ daily lives through innovative technologies, the data sculptures that comprise the collaboration explore the connection between reality, simulation and systemic reflection.
       
       
      Blurring the Lines
      Anadol’s body of work addresses the challenges and possibilities imposed on mankind by ubiquitous computing, and what it means to be a human in the age of machine intelligence. Artificial Landscapes consists of three unique chapters, each offering a visual representation of how memories of nature can be simulated and represented through cutting-edge machine learning algorithms such as those included in Samsung’s innovative new MICRO LED TV line.
       
       
      Fluid Dreams
       
      Fluid Dreams, the first in the Artificial Landscapes collection, draws inspiration from fluid dynamics. The millions of particles that form the MICRO LED display are illustrated in this piece through cinematic visuals that resemble the dynamic movements of the sea and ocean surfaces, with the waves transforming into shades of Samsung Blue as a nod to the way the MICRO LED line serves as a means for visualizing information.
       
       
      Land Dreams
       
      Land Dreams, the second data sculpture in Artificial Landscapes, offers a unique visual experience showcasing the natural colors able to be showcased on MICRO LED displays, and is based on the data of landscapes and ecological scenery of the world around us. The piece incorporates pigments, shapes and patterns that we associate with our experiences of nature as an homage to the realism offered in the display quality of the innovative MICRO LED TV line.
       
       
      Space Dreams
       
      The final piece in the Artificial Landscapes series is Space Dreams, an artwork that takes a more avant-garde approach to showcasing cartographic aesthetics. In the same way that the MICRO LED TV’s Monolith design removes the boundaries between content and screen, the artwork applies machine learning to millions of celestial images of Earth’s topology in order to generate a layered design that removes the boundaries between known and unknown, and alludes to an infinite cosmos of unimaginably vast data, all without bounds.
       
      Like a canvas, a screen can contain anything. Standing out thanks to its simplicity, Samsung’s MICRO LED TV’s Monolith design allows users to make the most of their viewing experiences without any obstructions. Both Samsung’s designers and Refik Anadol have sought to demonstrate the sheer possibility of the MICRO LED display with Artificial Landscapes, and the company will continue to work towards the future and all the possibilities it holds with their latest display innovations.
       
      You can also find more details at Design Samsung website.
       

      View the full article
    • By BGR
      Samsung isn’t the only company making foldable smartphones, but it’s certainly the leading player. Huawei, Motorola, and Xiaomi have launched or unveiled their own foldable devices already, and Lenovo made a foldable laptop. Other smartphone makers released dual-screen handsets (Microsoft and LG), rollable phones (Oppo and LG), and showed off foldable concepts of their own.
      But Samsung was the first mainstream smartphone maker to reveal a foldable handset, and the first to launch two different form-factors. Several reports claim that Samsung wants to increase foldable phone sales significantly. Its recent moves show that the company is looking to make foldable phones more affordable to interested buyers. But a new rumor indicates that Samsung doesn’t have any exciting foldable surprises in store for 2021.

      Today's Top Deal
      Amazon shoppers are obsessed with this nonstick frying pan – today it’s only $14!
      Price: $13.99
      You Save: $3.00 (18%)
      Buy Now
      Samsung said a few weeks ago that the current chip crisis might force it to cancel this year’s Galaxy Note 21. But the chip shortage might really just be the “perfect storm” for Samsung to kill the Note line without many questions. Various rumors claimed in the past that the Note brand is dying and might be replaced by foldables.
      Samsung has not announced any new foldable devices this year, choosing instead to offer extensive trial periods for the existing Galaxy Z Flip and Z Fold 2. We would have expected the new Z Flip 2 to launch in the first half of the year, with the Z Fold 3 set for the second half.
      According to SamMobile, the two phones are coming this year, and they will both launch in the second half of 2021. But Samsung will not unveil a third foldable form-factor this year or a cheaper Galaxy Z Fold.
      Samsung has an abundance of design patents for foldable devices, including one that shows a dual-foldable handset that would feature two hinges and three display sides. Samsung also patented a foldable tablet design. As always with patent documentation, the technology innovations that companies want to protect might not always be used in commercial products.
      A different rumor said a few months ago that Samsung was also working for a more exciting Galaxy Z Fold version. The “Lite” variation would help Samsung lower the entry price for the handset and lure in more buyers who aren’t comfortable paying nearly $2,000 for a high-end Fold. The Lite would launch alongside the more expensive Z Fold upgrade.
      That doesn’t appear to be the case. But Samsung might not even need a Lite version of its foldables. As it introduces new models, it could drop the prices of the current Z Flip and Z Fold 2. Samsung already cut the Z Fold 2’s price a few days ago, when it launched an extended trial promo in the UK — a similar promotion was available to US buyers until a few days ago. That way, it could sell more affordable foldables alongside the brand new models, which would probably be priced between $1,500 and $2,000. The arrival of Xiaomi’s first foldable will help in that regard, as the Chinese smartphone maker has a very aggressive price for its high-end foldable, which will put additional pressure on Samsung.
      That said, SamMobile doesn’t say when Samsung will launch its 2021 foldable handsets. The likeliest scenario is for Samsung to host an Unpacked event in August, which would have been the new Note’s traditional press conference.

      Today's Top Deal
      Crazy Amazon deal gets you Sylvania color LED smart light bulbs for only $7 each!
      Price: $27.99
      You Save: $7.00 (20%)
      Buy Now View the full article

×
×
  • Create New...