[Beyond Viewing] ③ Taking Smartphone Content Viewing To the Next Level With Mobile View
-
Similar Topics
-
Dev Insight Jan 2025: Unveiling Invites to "Galaxy Unpacked 2025" Ushering in a New Era of Mobile AIBy Samsung Newsroom
January 2025 Unveiling Invites to "Galaxy Unpacked 2025" Ushering in a New Era of Mobile AI
New Galaxy products are unveiled at Galaxy Unpacked 2025! Galaxy Unpacked 2025 commences on January 23, 3 AM KST (January 22, 10 AM local time) in San Jose, USA. It is streamed live online via the Samsung Electronics Newsroom, Samsung.com, and Samsung Electronics YouTube channel. Samsung Electronics' innovations are going to usher in a new era of the mobile AI experience with the natural and intuitive Galaxy UI. See for yourself.
Learn More Highlights from the CES 2025 Samsung Press Conference
On January 6, Samsung Electronics held the CES 2025 Samsung Press Conference under the theme "AI for All: Everyday, Everywhere," unveiling its technological visions. The full inter-device connectivity and hyper-personalized user experience through AI, both introduced at the conference, have attracted media attention from all over the world. Check out the innovative technologies that will change the future in our video.
Learn More Updates for Samsung In-App Purchase: Resubscription and Grace Period Features
Managing subscriptions is now more convenient with the new Samsung in-app purchase (IAP) updates. The newly updated features are resubscription and grace period.
Users can now reactivate their canceled subscription in Galaxy Store using the resubscribe feature. Even if there is a problem with the payment when renewing a subscription, the subscription is not canceled if the problem is resolved during the set grace period. If the developer activates the grace period feature in the item settings of Galaxy Store's Seller Portal, the system automatically retries the payment and sends the information about the failed automatic payment to the user so that they can change their payment method.
Developers can also see new information in the subscription API and ISN services, such as the subscription API's response parameters and ISN service events. Manage your subscriptions more effectively using these new features. Tutorial: Manage the Purchase/Subscription of Digital Items with Samsung In-App Purchases
The hassle of managing digital item purchases and subscriptions is no more! Samsung in-app purchase (IAP) is a powerful tool that provides a more secure and convenient payment environment for users and expands commercialization opportunities for developers. This tutorial covers how to smoothly and efficiently implement item purchase/consumption processing and subscription management. A step-by-step guide and practical code examples are used to walk developers through the complex API integration process even if they're just starting out. Check out the tutorial on the Samsung Developer Portal.
Learn More Tutorial: Step into Galaxy Watch Application Development Using Flutter
Did you know that you can develop an application for Galaxy Watches with a single codebase? The tutorial shows software developers how they can develop applications for Galaxy Watch using the Flutter framework. Flutter is an open-source framework for building multi-platform applications from a single codebase. An easy step-by-step guide that can be followed without much preparation is provided for beginners, as well as practical tips and a code example for Flutter developers who are new to developing Galaxy Watch applications. Check out the tutorial and start developing Galaxy Watch applications!
Learn More Tutorial: Monitoring Your Cards in Samsung Wallet in Real Time
Do you want to monitor the status of cards added to Samsung Wallet on user devices in real time? Samsung Wallet provides the Send Card State API to make it easy to track the cards, as the API notifies the server of any changes whenever a card is added, deleted, or updated.
The tutorial covers how to set up server notifications, how to receive notifications to a Spring server, and how to securely verify the received notifications. Learn how to monitor the status of cards in Samsung Wallet in real time.
Learn More Samsung Electronics Demonstrates AI-RAN Technologies, Paving the Way for the Convergence of Telecommunications and AI
Telecommunications technology is evolving beyond just improvements in data transmission speed, moving towards emphasizing user experience, energy efficiency, and sustainability. Samsung Electronics is accelerating the emergence of the era of future communications by showcasing the AI-RAN technology which integrates AI technology with the Radio Access Network (RAN), which is the core technology for communications networking.
In particular, at the Silicon Valley Future Wireless Summit held in November 2024, Samsung Electronics demonstrated the results of the AI-RAN PoC to global communications providers, the first in the industry to do so. The technology indicated a possibility to greatly improve data throughput, communication coverage, and energy efficiency compared to the existing 5G RAN. It also proved the convergence of communications and AI could significantly enhance network performance. Learn more about Samsung Electronics' AI-RAN technology that goes beyond the boundary of communications and creates smarter networks with AI.
Learn More Building a Trusted Execution Environment on RISC-V Microcontrollers
In embedded systems such as IoT devices, it is crucial to protect sensitive data. For this, a Trusted Execution Environment (TEE) is required. It creates an isolated environment within the processor, so that security-sensitive tasks can be executed without risk of external threats.
Samsung Research is conducting a study on how to implement the TEE technology on RISC-V-based microcontrollers (MCU), an open-source hardware architecture, and has introduced mTower, a core project related to this study. Learn more about stronger security for IoT devices on the Samsung Research blog.
Learn More
https://developer.samsung.com
Copyright© %%xtyear%% SAMSUNG All Rights Reserved.
This email was sent to %%emailaddr%% by Samsung Electronics Co.,Ltd.
You are receiving this email because you have subscribed to the Samsung Developer Newsletter through the website.
Samsung Electronics · 129 Samsung-ro · Yeongtong-gu · Suwon-si, Gyeonggi-do 16677 · South Korea
Privacy Policy Unsubscribe
View the full blog at its source
-
Dev Insight Jan 2025: Unveiling Invites to "Galaxy Unpacked 2025" Ushering in a New Era of Mobile AIBy Samsung Newsroom
View the full blog at its source
-
By maljaros
There is no native Strava mobile app for Tizen OS smartphones, so what app could be used for tracking trail run and cycling activities on a Samsung Z4? Or is there a "non-native" route to Strava itself?
Thank you, Maljaros
-
By Samsung Newsroom
Samsung Galaxy Fold devices have taken the mobile industry by storm, offering users a revolutionary way to interact with their applications. One of their key features is the rear display mode that enables users to continue their tasks seamlessly on the cover display while the main display remains turned off. Jetpack WindowManager has introduced APIs to enable this mode programmatically, and starting from One UI 6.0, developers can now utilize these APIs to integrate rear display mode into their applications, enhancing usability and maximizing the potential of foldable devices.
In this blog post, we dive deeper into implementing Jetpack WindowManager's rear display mode in a camera application. By leveraging this mode, users can take selfies with superior image quality using the rear camera instead of the front camera. Join us as we explore the exciting possibilities of foldable technology and uncover how to optimize your applications for the Samsung Galaxy Fold.
You can download the sample camera application here.
CameraXApp.zip (623.3 KB) Sep 26, 2024 Step 1: Add the WindowManager library into the project
WindowManager, a Jetpack library introduced by Google, supports rear display mode starting from version 1.2.0-beta03. To add the WindowManager library, go to Gradle Scripts > build.gradle (Module: app) and enter the following to the dependencies block:
implementation "androidx.window:window:1.3.0" Step 2: Implement the WindowAreaSessionCallback interface in MainActivity.kt
The WindowAreaSessionCallback interface updates an Activity about when the WindowAreaSession is started and ended. Using the onSessionStarted method, this interface provides the current WindowAreaSession as soon as a new window session is started.
class MainActivity : AppCompatActivity() , WindowAreaSessionCallback { … override fun onSessionEnded(t: Throwable?) { if(t != null) { println("Something was broken: ${t.message}") } } override fun onSessionStarted(session: WindowAreaSession) { } } Step 3: Declare variables
The WindowAreaController provides information about the moving windows between the cover display and the main display of the Galaxy Fold device.
The WindowAreaSession interface provides an active window session in the onSessionStarted method.
WindowAreaInfo represents the current state of a window area. It provides a token which is used later to activate rear display mode.
WindowAreaCapability.Status represents the availability and capability status of the window area defined by the WindowAreaInfo object. We utilize this status to change the UI of our application. The status of the Galaxy Fold device can be one of the following:
WINDOW_AREA_STATUS_ACTIVE: if the cover display is currently active.
WINDOW_AREA_STATUS_AVAILABLE: if the cover display is available to be enabled.
WINDOW_AREA_STATUS_UNAVAILABLE: if the cover display is currently not available to be enabled.
WINDOW_AREA_STATUS_UNSUPPORTED: if the Galaxy Fold device is running on Android 13 or lower.
private lateinit var windowAreaController: WindowAreaController private var windowAreaSession: WindowAreaSession? = null private var windowAreaInfo: WindowAreaInfo? = null private var capabilityStatus: WindowAreaCapability.Status = WindowAreaCapability.Status.WINDOW_AREA_STATUS_UNSUPPORTED private val operation = WindowAreaCapability.Operation.OPERATION_TRANSFER_ACTIVITY_TO_AREA Step 4: Create an instance of WindowAreaController in the onCreate method
windowAreaController = WindowAreaController.getOrCreate() Step 5: Set up a flow to get information from WindowAreaController
In the onCreate() method, add a lifecycle-aware coroutine to query the list of available WindowAreaInfo objects and their status. The coroutine executes each time the lifecycle starts.
lifecycleScope.launch(Dispatchers.Main) { lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) { windowAreaController.windowAreaInfos .map { info -> info.firstOrNull { it.type == WindowAreaInfo.Type.TYPE_REAR_FACING } } .onEach { info -> windowAreaInfo = info } .map { it?.getCapability(operation)?.status ?: WindowAreaCapability.Status.WINDOW_AREA_STATUS_UNSUPPORTED } .distinctUntilChanged() .collect { capabilityStatus = it updateUI() } } } Step 6: Update the UI according to the device's WindowAreaCapability.Status
private fun updateUI() { if(windowAreaSession != null) { viewBinding.switchScreenButton.isEnabled = true } else { when(capabilityStatus) { WindowAreaCapability.Status.WINDOW_AREA_STATUS_UNSUPPORTED -> { viewBinding.switchScreenButton.isEnabled = false Toast.makeText(baseContext, "RearDisplay is not supported on this device", Toast.LENGTH_SHORT).show() } WindowAreaCapability.Status.WINDOW_AREA_STATUS_UNAVAILABLE -> { viewBinding.switchScreenButton.isEnabled = false Toast.makeText(baseContext, "RearDisplay is not currently available", Toast.LENGTH_SHORT).show() } WindowAreaCapability.Status.WINDOW_AREA_STATUS_AVAILABLE -> { viewBinding.switchScreenButton.isEnabled = true } WindowAreaCapability.Status.WINDOW_AREA_STATUS_ACTIVE -> { viewBinding.switchScreenButton.isEnabled = true Toast.makeText(baseContext, "RearDisplay is currently active", Toast.LENGTH_SHORT).show() } else -> { viewBinding.switchScreenButton.isEnabled = false Toast.makeText(baseContext, "RearDisplay status is unknown", Toast.LENGTH_SHORT).show() } } } } Step 7: Toggle to rear display mode with WindowAreaController
Close the session if it is already active, otherwise start a transfer session to move the MainActivity to the window area identified by the token.
While activating rear display mode, the system creates a dialog to request the user’s permission to allow the application to switch screens. This dialog is not customizable.
private fun toggleRearDisplayMode() { if(capabilityStatus == WindowAreaCapability.Status.WINDOW_AREA_STATUS_ACTIVE) { if(windowAreaSession == null) { windowAreaSession = windowAreaInfo?.getActiveSession( operation ) } windowAreaSession?.close() } else { windowAreaInfo?.token?.let { token -> windowAreaController.transferActivityToWindowArea( token = token, activity = this, executor = displayExecutor, windowAreaSessionCallback = this ) } } } Step 8: Start the camera preview
Call startCamera() when onSessionStarted is triggered by the WindowAreaSessionCallback interface.
override fun onSessionStarted(session: WindowAreaSession) { startCamera() } Step 9: Add a button and set a listener to it for activating rear display mode
<Button android:id="@+id/switch_screen_button" android:layout_width="110dp" android:layout_height="110dp" android:layout_marginStart="50dp" android:elevation="2dp" android:text="@string/switch_screen" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toTopOf="@+id/horizontal_baseline" app:layout_constraintStart_toEndOf="@id/vertical_centerline" /> viewBinding.switchScreenButton.setOnClickListener{ updateUI() toggleRearDisplayMode() } Incorporating rear display mode into your application can significantly enhance user experience by providing more intuitive control and greater flexibility. By following the outlined steps, you can create a more dynamic and user-friendly interface. As technology continues to evolve, staying ahead with features like rear display mode can set your application apart and offer users a seamless, professional-quality experience. To learn more about developing applications for Galaxy Foldable devices, visit: developer.samsung.com/galaxy-z.
View the full blog at its source
-
-
Recommended Posts
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.