Home Blog

Showcasing the Energy of Cisco Companions to Ship Actual Outcomes


The wants of consumers are evolving quicker than ever — and Cisco is evolving with them.

As you already know, we’re re-architecting the way in which we design options and ship them to market — with a One Cisco strategy throughout our portfolio and AI technique — as a result of yesterday’s approaches now not assist at present’s actuality.

Prospects at present count on quicker innovation, seamless experiences, and higher impression from their know-how investments.

That’s why we’re constructing the Cisco 360 Associate Program — designed to drive actual buyer outcomes, acknowledge various companion enterprise fashions, and reward worth creation by way of functionality constructing, go-to-market energy, and deeper engagement.

Along with you — our companions — we’re creating one thing essentially new to satisfy the challenges and alternatives forward.

 

Bringing Prospects Alongside

You’ve advised us loud and clear: We have to begin bringing prospects alongside now.

And we couldn’t agree extra.

We’re excited to share that we’ve formally launched a buyer consciousness marketing campaign to assist prospects perceive the evolution underway — and the way Cisco and our companions are higher positioned than ever to assist them obtain their enterprise objectives.

What This Means for You

We all know that prospects’ expectations are altering. They want trusted guides who may help them modernize infrastructure, deploy AI options, safe their operations, and ship measurable enterprise outcomes. The Cisco 360 Associate Program — and this buyer marketing campaign — are designed to place you on the middle of that chance.

  • Acknowledged for worth creation: Not simply transactions, however the outcomes you assist prospects obtain.
  • Rewarded for functionality constructing and engagement: Targeted on the abilities and experience prospects are looking for.
  • Aligned for progress: With a framework constructed for at present’s wants and tomorrow’s prospects.

We’re dedicated to supporting you each step of the way in which as we transfer towards the official launch on February 1, 2026 — supplying you with the instruments to have interaction prospects confidently and present the distinctive worth you deliver.

Thank You

Thanks on your continued partnership, innovation, and dedication to buyer success.

Collectively, we’re main a metamorphosis that may drive mutual progress and ship higher outcomes for patrons all over the world.

 


We’d love to listen to what you assume. Ask a Query, Remark Under, and Keep Related with #CiscoPartners on social!

Cisco Companions Fb  |  @CiscoPartners X/Twitter  |  Cisco Companions LinkedIn

Share:



Constructing pleasant UIs with Compose



Constructing pleasant UIs with Compose

Posted by Rebecca Franks – Developer Relations Engineer

Androidify is a brand new pattern app we constructed utilizing the most recent finest practices for cellular apps. Beforehand, we lined all of the completely different options of the app, from Gemini integration and CameraX performance to adaptive layouts. On this publish, we dive into the Jetpack Compose utilization all through the app, constructing upon our base information of Compose so as to add pleasant and expressive touches alongside the best way!

Materials 3 Expressive

Materials 3 Expressive is an enlargement of the Materials 3 design system. It’s a set of latest options, up to date parts, and design techniques for creating emotionally impactful UX.

It’s been launched as a part of the alpha model of the Materials 3 artifact (androidx.compose.material3:material3:1.4.0-alpha10) and comprises a variety of latest parts you should utilize inside your apps to construct extra customized and pleasant experiences. Study extra about Materials 3 Expressive’s part and theme updates for extra partaking and user-friendly merchandise.

Material Expressive Component updates

Materials Expressive Element updates

Along with the brand new part updates, Materials 3 Expressive introduces a brand new movement physics system that is encompassed within the Materials theme.

In Androidify, we’ve utilized Materials 3 Expressive in a couple of alternative ways throughout the app. For instance, we’ve explicitly opted-in to the brand new MaterialExpressiveTheme and chosen MotionScheme.expressive() (that is the default when utilizing expressive) so as to add a little bit of playfulness to the app:

@Composable
enjoyable AndroidifyTheme(
   content material: @Composable () -> Unit,
) {
   val colorScheme = LightColorScheme


   MaterialExpressiveTheme(
       colorScheme = colorScheme,
       typography = Typography,
       shapes = shapes,
       motionScheme = MotionScheme.expressive(),
       content material = {
           SharedTransitionLayout {
               CompositionLocalProvider(LocalSharedTransitionScope gives this) {
                   content material()
               }
           }
       },
   )
}

A number of the new componentry is used all through the app, together with the HorizontalFloatingToolbar for the Immediate sort choice:

moving example of expressive button shapes in slow motion

The app additionally makes use of MaterialShapes in varied places, that are a preset record of shapes that enable for simple morphing between one another. For instance, try the lovable cookie form for the digital camera seize button:

Material Expressive Component updates

Digicam button with a MaterialShapes.Cookie9Sided form

Animations

Wherever potential, the app leverages the Materials 3 Expressive MotionScheme to acquire a themed movement token, making a constant movement feeling all through the app. For instance, the dimensions animation on the digital camera button press is powered by defaultSpatialSpec(), a specification used for animations that transfer one thing throughout a display screen (comparable to x,y or rotation, scale animations):

val interactionSource = keep in mind { MutableInteractionSource() }
val animationSpec = MaterialTheme.motionScheme.defaultSpatialSpec()
Spacer(
   modifier
       .indication(interactionSource, ScaleIndicationNodeFactory(animationSpec))
       .clip(MaterialShapes.Cookie9Sided.toShape())
       .measurement(measurement)
       .drawWithCache {
           //.. and so on
       },
)

Camera button scale interaction

Digicam button scale interplay

Shared ingredient animations

The app makes use of shared ingredient transitions between completely different display screen states. Final yr, we showcased how one can create shared parts in Jetpack Compose, and we’ve prolonged this within the Androidify pattern to create a enjoyable instance. It combines the brand new Materials 3 Expressive MaterialShapes, and performs a transition with a morphing form animation:

moving example of expressive button shapes in slow motion

To do that, we created a customized Modifier that takes within the goal and resting shapes for the sharedBounds transition:

@Composable
enjoyable Modifier.sharedBoundsRevealWithShapeMorph(
   sharedContentState: 
SharedTransitionScope.SharedContentState,
   sharedTransitionScope: SharedTransitionScope = 
LocalSharedTransitionScope.present,
   animatedVisibilityScope: AnimatedVisibilityScope = 
LocalNavAnimatedContentScope.present,
   boundsTransform: BoundsTransform = 
MaterialTheme.motionScheme.sharedElementTransitionSpec,
   resizeMode: SharedTransitionScope.ResizeMode = 
SharedTransitionScope.ResizeMode.RemeasureToBounds,
   restingShape: RoundedPolygon = RoundedPolygon.rectangle().normalized(),
   targetShape: RoundedPolygon = RoundedPolygon.circle().normalized(),
)

Then, we apply a customized OverlayClip to supply the morphing form, by tying into the AnimatedVisibilityScope supplied by the LocalNavAnimatedContentScope:

val animatedProgress =
   animatedVisibilityScope.transition.animateFloat(targetValueByState = targetValueByState)


val morph = keep in mind {
   Morph(restingShape, targetShape)
}
val morphClip = MorphOverlayClip(morph, { animatedProgress.worth })


return this@sharedBoundsRevealWithShapeMorph
   .sharedBounds(
       sharedContentState = sharedContentState,
       animatedVisibilityScope = animatedVisibilityScope,
       boundsTransform = boundsTransform,
       resizeMode = resizeMode,
       clipInOverlayDuringTransition = morphClip,
       renderInOverlayDuringTransition = renderInOverlayDuringTransition,
   )

View the full code snippet for this Modifer on GitHub.

Autosize textual content

With the most recent launch of Jetpack Compose 1.8, we added the flexibility to create textual content composables that routinely alter the font measurement to suit the container’s accessible measurement with the brand new autoSize parameter:

BasicText(textual content,
type = MaterialTheme.typography.titleLarge,
autoSize = TextAutoSize.StepBased(maxFontSize = 220.sp),
)

That is used entrance and heart for the “Customise your personal Android Bot” textual content:

Text reads Customize your own Android Bot with an inline moving image

“Customise your personal Android Bot” textual content with inline GIF

This textual content composable is attention-grabbing as a result of it wanted to have the enjoyable dancing Android bot in the course of the textual content. To do that, we use InlineContent, which permits us to append a composable in the course of the textual content composable itself:

@Composable
personal enjoyable DancingBotHeadlineText(modifier: Modifier = Modifier) {
   Field(modifier = modifier) {
       val animatedBot = "animatedBot"
       val textual content = buildAnnotatedString {
           append(stringResource(R.string.customise))
           // Connect "animatedBot" annotation on the placeholder
           appendInlineContent(animatedBot)
           append(stringResource(R.string.android_bot))
       }
       var placeHolderSize by keep in mind {
           mutableStateOf(220.sp)
       }
       val inlineContent = mapOf(
           Pair(
               animatedBot,
               InlineTextContent(
                   Placeholder(
                       width = placeHolderSize,
                       top = placeHolderSize,
                       placeholderVerticalAlign = PlaceholderVerticalAlign.TextCenter,
                   ),
               ) {
                   DancingBot(
                       modifier = Modifier
                           .padding(prime = 32.dp)
                           .fillMaxSize(),
                   )
               },
           ),
       )
       BasicText(
           textual content,
           modifier = Modifier
               .align(Alignment.Middle)
               .padding(backside = 64.dp, begin = 16.dp, finish = 16.dp),
           type = MaterialTheme.typography.titleLarge,
           autoSize = TextAutoSize.StepBased(maxFontSize = 220.sp),
           maxLines = 6,
           onTextLayout = { consequence ->
               placeHolderSize = consequence.layoutInput.type.fontSize * 3.5f
           },
           inlineContent = inlineContent,
       )
   }
}

Composable visibility with onLayoutRectChanged

With Compose 1.8, a brand new modifier, Modifier.onLayoutRectChanged, was added. This modifier is a extra performant model of onGloballyPositioned, and contains options comparable to debouncing and throttling to make it performant inside lazy layouts.

In Androidify, we’ve used this modifier for the colour splash animation. It determines the place the place the transition ought to begin from, as we connect it to the “Let’s Go” button:

var buttonBounds by keep in mind {
   mutableStateOf(null)
}
var showColorSplash by keep in mind {
   mutableStateOf(false)
}
Field(modifier = Modifier.fillMaxSize()) {
   PrimaryButton(
       buttonText = "Let's Go",
       modifier = Modifier
           .align(Alignment.BottomCenter)
           .onLayoutRectChanged(
               callback = { bounds ->
                   buttonBounds = bounds
               },
           ),
       onClick = {
           showColorSplash = true
       },
   )
}

We use these bounds as a sign of the place to begin the colour splash animation from.

moving image of a blue color splash transition between Androidify demo screens

Study extra pleasant particulars

From enjoyable marquee animations on the outcomes display screen, to animated gradient buttons for the AI-powered actions, to the trail drawing animation for the loading display screen, this app has many pleasant touches so that you can expertise and be taught from.

animated marquee example

animated gradient button for AI powered actions example

animated loading screen example

Try the total codebase at github.com/android/androidify and be taught extra in regards to the newest in Compose from utilizing Materials 3 Expressive, the brand new modifiers, auto-sizing textual content and naturally a few pleasant interactions!

Discover this announcement and all Google I/O 2025 updates on io.google beginning Might 22.

Cease SMB Exploits and Advance Your Profession in Cybersecurity


WannaCry. NotPetya. EternalBlue. These names mark a number of the most devastating cyberattacks in historical past, they usually all exploited flaws in Server Message Block (SMB). Figuring out methods to detect and defend towards SMB vulnerabilities isn’t simply good cybersecurity—it’s important for anybody severe a few profession within the discipline.

Why SMB exploits matter

SMB is a community protocol used primarily by Microsoft for sharing recordsdata, printers, and different sources throughout the community. It permits customers to learn, create, and replace recordsdata on distant servers and talk with different packages over the community. The shift to distant work led many organizations to reveal inner providers like SMB over the web, usually with out satisfactory safety controls, considerably growing the danger of exploitation.

An SMB exploit is a method utilized by cybercriminals to make the most of vulnerabilities within the SMB protocol. For instance, in WannaCry, the assault appeared for uncovered SMB ports (mostly port 445). On this case, they have been uncovered resulting from misconfiguration. As soon as an uncovered port was discovered, the chain of exploits continued. EternalBlue was exploited on susceptible programs to unfold a worm all through the community, in the end deploying ransomware on contaminated machines. The WannaCry ransomware worm unfold to greater than 200,000 computer systems in over 150 nations.

As proven on this instance, when attackers exploit SMB vulnerabilities, they acquire unauthorized entry to programs, run malicious code, and trigger widespread disruption.

Why our Operation SMB Exploit problem issues

Our newest Seize the Flag: Operation SMB Exploit problem in Cisco U. hones the talents you’ll want to determine the SMB vulnerabilities in working programs (reminiscent of Home windows and Linux) that depart your community open to those assaults.

To higher equip your self for a job in offensive safety with this vital talent set, you’ll get hands-on apply analyzing community safety from an attacker’s perspective:

  • Discover password cracking and vulnerability scanning methods.
  • Try a brute-force assault towards SSH to uncover any SMB vulnerabilities.
  • Enumerate SMB shares.

The tip consequence: Perceive potential impacts and the way they can be utilized to determine SMB vulnerabilities that may be exploited in providers like Microsoft’s.

The very best information: When you efficiently full our newest Seize the Flag problem, you’re positive to return out a winner by studying methods to proactively crush any possibilities of exploits in your simulated assault.

New to the Cisco Certificates in Moral Hacking program?

If figuring out SMB exploits sounds intriguing, however you’re new to the certificates program or want a refresher, view the certificates program infographic.

When you’ve handed the Moral Hacker course from Cisco Networking Academy, full the brand new problem to earn a Cisco Certificates in Moral Hacking.

Be part of our new group

Proceed full steam forward and be a part of a group of like-minded friends and consultants within the Cisco Certificates in Moral Hacking Neighborhood. They may help make sure you maintain your momentum going and end sturdy.

It’s the problem that retains on giving badges—gather ‘em all

Plus, you may proceed to gather extra badges with extra Seize the Flag challenges in Cisco U. They’re launched each 90 days. It’s a enjoyable and interesting solution to present you’re all the time a step forward of menace actors within the newest cyberthreat panorama.

Why wait?

Begin the Operation SMB Exploit problem in Cisco U. now to construct vital abilities in moral hacking—an in-demand discipline that simply retains rising.

 

Join Cisco U. | Be part of the  Cisco Studying Community right now without spending a dime.

Comply with Cisco Studying & Certifications

X | Threads | Fb | LinkedIn | Instagram | YouTube

Use  #CiscoU and #CiscoCert to hitch the dialog.

Every thing You Wish to Know About Cisco U. Seize the Flag Challenges

Share:



Using Darkish Fiber to Handle Price of DCI within the AI Period


In my earlier weblog submit, I talked concerning the rising monetary burden that AI-driven information development will place on enterprises. IDC predicts that information era will develop explosively, at a compound annual development fee (CAGR) of 40.5% via 2027, which can result in unprecedented development within the want for extra sturdy information heart interconnect (DCI) options by enterprises.

Historically, enterprises have leased high-capacity circuits from service suppliers for DCI. These leased circuits are sometimes 10G hyperlinks utilizing Service Ethernet or wavelength companies—that are completely enough for assembly enterprises’ present necessities. Nonetheless, AI is beginning to push DCI capability in the direction of high-bandwidth 100G, 400G, and 800G connections. Because the price construction of DCI is often primarily based on bandwidth utilization, prices will shortly multiply, as enterprises will want extra circuits to assist elevated capability calls for. A more cost effective various for enterprises is to lease darkish fiber from service suppliers and create their very own non-public community.

Calculating the price of DCI for AI

The massive query for enterprise IT, particularly for community architects, is when to make the swap from leasing circuits to leasing darkish fiber. Organizations will doubtless attain a tipping level when the price of including extra capability to leased circuits to assist AI workloads will develop into too excessive. That is when a transfer to a special DCI mannequin with a extra sustainable price construction is absolutely justified.

ACG Analysis investigated the three-year complete price of possession (TCO) of Service Ethernet, wavelength companies, and darkish fiber in several use instances throughout metro (50 km), short-haul (200 km), and long-haul (500 km) DCI networks. This evaluation revealed that darkish fiber is probably the most strategic long-term funding for enterprises to handle exponential AI-driven bandwidth development. Listed below are the outcomes of this TCO analysis for the completely different community sorts:

Metro networks TCO benefit

The tipping level for transferring to darkish fiber in metro networks happens when bandwidth wants exceed 100G, with TCO financial savings at 400G of 48% in comparison with Service Ethernet and 55% in comparison with wavelength companies. Not like Service Ethernet or wavelength companies, the flat transport prices of darkish fiber permit enterprises to scale bandwidth with out incurring incremental charges.

Quick-haul networks TCO benefit

In regional networks, darkish fiber exhibits important TCO advantages over Service Ethernet starting at 100G, with 61% financial savings at 400G. For wavelength companies, darkish fiber has a tipping level of 30% TCO financial savings past 400G and 48% TCO financial savings at 800G. Whereas distance-based prices are increased, the flat pricing mannequin of darkish fiber ensures long-term financial savings.

Lengthy-haul networks TCO benefit

For long-haul connections, darkish fiber is 46% cheaper than Service Ethernet at bandwidths better than 400G. It’s 14% cheaper than wavelength companies at bandwidths better than 800G. Nonetheless, when evaluating darkish fiber and wavelength companies, it’s necessary to notice that darkish fiber scales linearly with distance whereas wavelength prices rise in step increments that aren’t at all times proportional to bandwidth. So, in long-haul deployments, wavelength companies could also be cheaper due to the upper price of long-distance fiber development or restricted availability. That’s the reason you will need to consider prices for every service, considering the placement of knowledge facilities.

 

 

How one can make the swap

Given the speedy tempo of AI innovation and the inevitable surge in AI information, forward-thinking enterprises ought to begin planning a swap to darkish fiber now to keep away from future stability sheet hits. The only and most cost-effective manner ahead is to mix darkish fiber with Cisco Routed Optical Networking, which allows optical wavelengths to be delivered straight from high-capacity ports in routers or switches within the information heart. It simplifies the community by changing devoted transponders with industry-standard coherent pluggable optics and easier optical line methods. For point-to-point DCI options, enterprises can deploy Cisco ZR/ZR+ coherent pluggable optics with switches to break down the switching and optical layers at Layer 2. For extra complicated companies, they’ll converge routing and optical layers onto a single IP/MPLS community the place all switching occurs at Layer 3.

This modern strategy brings many advantages for enterprises. The mixture of darkish fiber and Routed Optical Networking presents cost-effective scaling to multi-terabit capacities, whereas streamlining operations and decreasing OpEx. The standardized capabilities of coherent pluggable optics get rid of the necessity for complicated site visitors engineering, whereas delivering the resilient, low-latency connectivity that AI functions want. Moreover, enterprises can now acquire end-to-end observability and management over their DCI community, guarantee SLA compliance with necessities for bandwidth, latency, and availability, and improve DCI efficiency throughout darkish fiber hyperlinks. Cisco Supplier Connectivity Assurance, previously Accedian Skylight, gives enterprises with these capabilities, with steady and real-time telemetry throughout the bodily and logical layers of their DCI connections.

Whereas leasing 10G circuits would possibly meet the present DCI wants of enterprises, it’s not a matter of if however when the associated fee will develop into too excessive. It’s sure that AI workloads will contribute to unprecedented development in information site visitors, which makes switching to darkish fiber now a strategic transfer. Since working DCI over darkish fiber is extra complicated than a managed service, enterprises can accomplice with service suppliers that lease darkish fiber and profit from their operational experience. By investing in scalable DCI infrastructure utilizing darkish fiber at this time, enterprises can place themselves to capably assist the elevated information volumes from AI and different data-intensive workloads tomorrow.

Study extra about Cisco DCI options with Routed Optical Networking.

 

 

Associated blogs:

Share:

Constructing highly effective AI-driven experiences with Jetpack Compose, Gemini and CameraX


The Android bot is a beloved mascot for Android customers and builders, with earlier variations of the bot builder being extremely popular – we determined that this 12 months we’d rebuild the bot maker from the bottom up, utilizing the newest expertise backed by Gemini. At this time we’re releasing a brand new open supply app, Androidify, for studying the way to construct highly effective AI pushed experiences on Android utilizing the newest applied sciences resembling Jetpack Compose, Gemini by means of Firebase, CameraX, and Navigation 3.

Right here’s an instance of the app operating on the machine, showcasing changing a photograph to an Android bot that represents my likeness:

moving image showing the conversion of an image of a woman in a pink dress holding na umbrella into a 3D image of a droid bot wearing a pink dress holding an umbrella

Beneath the hood

The app combines quite a lot of completely different Google applied sciences, resembling:

    • Gemini API – by means of Firebase AI Logic SDK, for accessing the underlying Imagen and Gemini fashions.
    • Jetpack Compose – for constructing the UI with pleasant animations and making the app adapt to completely different display sizes.
    • Navigation 3 – the newest navigation library for increase Navigation graphs with Compose.
    • CameraX Compose and Media3 Compose – for increase a customized digital camera with customized UI controls (rear digital camera assist, zoom assist, tap-to-focus) and taking part in the promotional video.

This pattern app is at present utilizing a normal Imagen mannequin, however we have been engaged on a fine-tuned mannequin that is skilled particularly on the entire items that make the Android bot cute and enjoyable; we’ll share that model later this 12 months. Within the meantime, do not be shocked if the pattern app places out some attention-grabbing trying examples!

How does the Androidify app work?

The app leverages our greatest practices for Structure, Testing, and UI to showcase an actual world, trendy AI utility on machine.

Flow chart describing Androidify app flow

Androidify app circulate chart detailing how the app works with AI

AI in Androidify with Gemini and ML Package

The Androidify app makes use of the Gemini fashions in a mess of how to complement the app expertise, all powered by the Firebase AI Logic SDK. The app makes use of Gemini 2.5 Flash and Imagen 3 below the hood:

    • Picture validation: We be certain that the captured picture incorporates adequate info, resembling a clearly centered particular person, and assessing for security. This characteristic makes use of the multi-modal capabilities of Gemini API, by giving it a immediate and picture on the identical time:

val response = generativeModel.generateContent(
   content material {
       textual content(immediate)
       picture(picture)
   },
)

    • Textual content immediate validation: If the consumer opts for textual content enter as an alternative of picture, we use Gemini 2.5 Flash to make sure the textual content incorporates a sufficiently descriptive immediate to generate a bot.

    • Picture captioning: As soon as we’re certain the picture has sufficient info, we use Gemini 2.5 Flash to carry out picture captioning., We ask Gemini to be as descriptive as doable,specializing in the clothes and its colours.

    • “Assist me write” characteristic: Much like an “I’m feeling fortunate” sort characteristic, “Assist me write” makes use of Gemini 2.5 Flash to create a random description of the clothes and coiffure of a bot.

    • Picture technology from the generated immediate: As the ultimate step, Imagen generates the picture, offering the immediate and the chosen pores and skin tone of the bot.

The app additionally makes use of the ML Package pose detection to detect an individual within the viewfinder and allow the seize button when an individual is detected, in addition to including enjoyable indicators across the content material to point detection.

Discover extra detailed details about AI utilization in Androidify.

Jetpack Compose

The consumer interface of Androidify is constructed utilizing Jetpack Compose, the trendy UI toolkit that simplifies and accelerates UI improvement on Android.

Pleasant particulars with the UI

The app makes use of Materials 3 Expressive, the newest alpha launch that makes your apps extra premium, fascinating, and fascinating. It gives pleasant bits of UI out-of-the-box, like new shapes, componentry, and utilizing the MotionScheme variables wherever a movement spec is required.

MaterialShapes are utilized in numerous areas. These are a preset record of shapes that permit for straightforward morphing between one another—for instance, the lovable cookie form for the digital camera seize button:

Androidify app UI showing camera button

Digicam button with a MaterialShapes.Cookie9Sided form

Past utilizing the usual Materials parts, Androidify additionally options customized composables and pleasant transitions tailor-made to the precise wants of the app:

    • There are many shared ingredient transitions throughout the app—for instance, a morphing form shared ingredient transition is carried out between the “take a photograph” button and the digital camera floor.

      moving example of expressive button shapes in slow motion

    • Customized enter transitions for the ResultsScreen with the utilization of marquee modifiers.

      animated marquee example

    • Enjoyable coloration splash animation as a transition between screens.

      moving image of a blue color splash transition between Androidify demo screens

    • Animating gradient buttons for the AI-powered actions.

      animated gradient button for AI powered actions example

To be taught extra concerning the distinctive particulars of the UI, learn Androidify: Constructing pleasant UIs with Compose

Adapting to completely different gadgets

Androidify is designed to look nice and performance seamlessly throughout sweet bar telephones, foldables, and tablets. The final purpose of creating adaptive apps is to keep away from reimplementing the identical app a number of instances on every kind issue by extracting out reusable composables, and leveraging APIs like WindowSizeClass to find out what sort of structure to show.

a collage of different adaptive layouts for the Androidify app across small and large screens

Numerous adaptive layouts within the app

For Androidify, we solely wanted to leverage the width window dimension class. Combining this with completely different structure mechanisms, we had been capable of reuse or prolong the composables to cater to the multitude of various machine sizes and capabilities.

    • Responsive layouts: The CreationScreen demonstrates adaptive design. It makes use of helper capabilities like isAtLeastMedium() to detect window dimension classes and alter its structure accordingly. On bigger home windows, the picture/immediate space and coloration picker may sit side-by-side in a Row, whereas on smaller home windows, the colour picker is accessed by way of a ModalBottomSheet. This sample, referred to as “supporting pane”, highlights the supporting dependencies between the primary content material and the colour picker.

    • Foldable assist: The app actively checks for foldable machine options. The digital camera display makes use of WindowInfoTracker to get FoldingFeature info to adapt to completely different options by optimizing the structure for tabletop posture.

    • Rear show: Help for gadgets with a number of shows is included by way of the RearCameraUseCase, permitting for the machine digital camera preview to be proven on the exterior display when the machine is unfolded (so the primary content material is often displayed on the interior display).

Utilizing window dimension lessons, coupled with making a customized @LargeScreensPreview annotation, helps obtain distinctive and helpful UIs throughout the spectrum of machine sizes and window sizes.

CameraX and Media3 Compose

To permit customers to base their bots on photographs, Androidify integrates CameraX, the Jetpack library that makes digital camera app improvement simpler.

The app makes use of a customized CameraLayout composable that helps the structure of the standard composables {that a} digital camera preview display would come with— for instance, zoom buttons, a seize button, and a flip digital camera button. This structure adapts to completely different machine sizes and extra superior use circumstances, just like the tabletop mode and rear-camera show. For the precise rendering of the digital camera preview, it makes use of the brand new CameraXViewfinder that’s a part of the camerax-compose artifact.

CameraLayout in Compose

CameraLayout composable that takes care of various machine configurations, resembling desk high mode

CameraLayout in Compose

CameraLayout composable that takes care of various machine configurations, resembling desk high mode

The app additionally integrates with Media3 APIs to load an educational video for displaying the way to get the most effective bot from a immediate or picture. Utilizing the brand new media3-ui-compose artifact, we are able to simply add a VideoPlayer into the app:

@Composable
personal enjoyable VideoPlayer(modifier: Modifier = Modifier) {
    val context = LocalContext.present
    var participant by bear in mind { mutableStateOf(null) }
    LifecycleStartEffect(Unit) {
        participant = ExoPlayer.Builder(context).construct().apply {
            setMediaItem(MediaItem.fromUri(Constants.PROMO_VIDEO))
            repeatMode = Participant.REPEAT_MODE_ONE
            put together()
        }
        onStopOrDispose {
            participant?.launch()
            participant = null
        }
    }
    Field(
        modifier
            .background(MaterialTheme.colorScheme.surfaceContainerLowest),
    ) {
        participant?.let { currentPlayer ->
            PlayerSurface(currentPlayer, surfaceType = SURFACE_TYPE_TEXTURE_VIEW)
        }
    }
}

Utilizing the brand new onLayoutRectChanged modifier, we additionally pay attention for whether or not the composable is totally seen or not, and play or pause the video based mostly on this info:

var videoFullyOnScreen by bear in mind { mutableStateOf(false) }     

LaunchedEffect(videoFullyOnScreen) {
     if (videoFullyOnScreen) currentPlayer.play() else currentPlayer.pause()
} 

// We add this onto the participant composable to find out if the video composable is seen, and mutate the videoFullyOnScreen variable, that then toggles the participant state. 
Modifier.onVisibilityChanged(
                containerWidth = LocalView.present.width,
                containerHeight = LocalView.present.peak,
) { fullyVisible -> videoFullyOnScreen = fullyVisible }

// A easy model of visibility modified detection
enjoyable Modifier.onVisibilityChanged(
    containerWidth: Int,
    containerHeight: Int,
    onChanged: (seen: Boolean) -> Unit,
) = this then Modifier.onLayoutRectChanged(100, 0) { layoutBounds ->
    onChanged(
        layoutBounds.boundsInRoot.high > 0 &&
            layoutBounds.boundsInRoot.backside < containerHeight &&
            layoutBounds.boundsInRoot.left > 0 &&
            layoutBounds.boundsInRoot.proper < containerWidth,
    )
}

Moreover, utilizing rememberPlayPauseButtonState, we add on a layer on high of the participant to supply a play/pause button on the video itself:

val playPauseButtonState = rememberPlayPauseButtonState(currentPlayer)
            OutlinedIconButton(
                onClick = playPauseButtonState::onClick,
                enabled = playPauseButtonState.isEnabled,
            ) {
                val icon =
                    if (playPauseButtonState.showPlay) R.drawable.play else R.drawable.pause
                val contentDescription =
                    if (playPauseButtonState.showPlay) R.string.play else R.string.pause
                Icon(
                    painterResource(icon),
                    stringResource(contentDescription),
                )
            }

Take a look at the code for extra particulars on how CameraX and Media3 had been utilized in Androidify.

Navigation 3

Display transitions are dealt with utilizing the brand new Jetpack Navigation 3 library androidx.navigation3. The MainNavigation composable defines the completely different locations (House, Digicam, Creation, About) and shows the content material related to every vacation spot utilizing NavDisplay. You get full management over your again stack, and navigating to and from locations is so simple as including and eradicating gadgets from a listing.

@Composable
enjoyable MainNavigation() {
   val backStack = rememberMutableStateListOf(House)
   NavDisplay(
       backStack = backStack,
       onBack = { backStack.removeLastOrNull() },
       entryProvider = entryProvider {
           entry { entry ->
               HomeScreen(
                   onAboutClicked = {
                       backStack.add(About)
                   },
               )
           }
           entry {
               CameraPreviewScreen(
                   onImageCaptured = { uri ->
                       backStack.add(Create(uri.toString()))
                   },
               )
           }
           // and so on
       },
   )
}

Notably, Navigation 3 exposes a brand new composition native, LocalNavAnimatedContentScope, to simply combine your shared ingredient transitions while not having to maintain observe of the scope your self. By default, Navigation 3 additionally integrates with predictive again, offering pleasant again experiences when navigating between screens, as seen on this prior shared ingredient transition:

CameraLayout in Compose

Be taught extra about Jetpack Navigation 3, at present in alpha.

Be taught extra

By combining the declarative energy of Jetpack Compose, the digital camera capabilities of CameraX, the clever options of Gemini, and considerate adaptive design, Androidify is a personalised avatar creation expertise that feels proper at house on any Android machine. You’ll find the total code pattern at github.com/android/androidify the place you’ll be able to see the app in motion and be impressed to construct your personal AI-powered app experiences.

Discover this announcement and all Google I/O 2025 updates on io.google beginning Could 22.