Home Blog Page 3

Multimodal picture attachment is now accessible for Gemini in Android Studio



Multimodal picture attachment is now accessible for Gemini in Android Studio

Posted by Paris Hsu – Product Supervisor, Android Studio

At each stage of the event lifecycle, Gemini in Android Studio has change into your AI-powered companion, making it simpler to construct top quality apps. We’re excited to announce a major enlargement: Gemini in Android Studio now helps multimodal inputs, which helps you to connect photos on to your prompts! This unlocks a wealth of recent potentialities that enhance group collaboration and UI improvement workflows.

You possibly can check out this new function by downloading the most recent Android Studio canary. We’ve outlined a number of use circumstances to attempt, however we’d love to listen to what you suppose as we work by bringing this function into future secure releases. Test it out:

Picture attachment – a brand new dimension of interplay

We first previewed Gemini’s multimodal capabilities at Google I/O 2024. This expertise permits Gemini in Android Studio to know easy wireframes, and rework them into working Jetpack Compose code.

You may now discover a picture attachment icon within the Gemini chat window. Merely connect JPEG or PNG recordsdata to your prompts and watch Gemini perceive and reply to visible info. We have noticed that photos with sturdy coloration contrasts yield the perfect outcomes.

New “Attach Image File” icon in chat window

1.1 New “Connect Picture File” icon in chat window

Example of multimodal response in chat

1.2 Instance multimodal response in chat

We encourage you to experiment with varied prompts and pictures. Listed here are a number of compelling use circumstances to get you began:

    • Fast UI prototyping and iteration: Convert a easy wireframe or high-fidelity mock of your app’s UI into working code.
    • Diagram clarification and documentation: Acquire deeper insights into complicated structure or knowledge circulate diagrams by having Gemini clarify their parts and relationships.
    • UI troubleshooting: Seize screenshots of UI bugs and ask Gemini for options.

Fast UI prototyping and iteration

Gemini’s multimodal assist allows you to convert visible designs into purposeful UI code. Merely add your picture and use a transparent immediate. It really works whether or not you are working from your individual sketches or from a designer mockup.

Right here’s an instance immediate: “For this picture supplied, write Android Jetpack Compose code to make a display that is as near this picture as potential. Ensure to incorporate imports, use Material3, and doc the code.” After which you possibly can append any particular or extra directions associated to the picture.

Example prompt: 'For this image provided, write Android Jetpack Compose code to make a screen that's as close to this image as possible. Make sure to include imports, use Material3, and document the code.'

Example of generating Compose code from high-fidelity mock using Gemini in Android Studio

2. Instance of producing Compose code from high-fidelity mock utilizing Gemini in Android Studio (code output)

For extra complicated UIs, refine your prompts to seize particular performance. As an example, when changing a calculator mockup, including “make the interactions and calculations work as you’d anticipate” leads to a completely purposeful calculator:

Example prompt to convert a calculator mock up

Example of generating Compose code from high-fidelity mock using Gemini in Android Studio

3. Instance of producing Compose code from wireframe by way of Gemini in Android Studio (code output)

Word: this function offers an preliminary design scaffold. It’s “first draft” and your edits and changes can be wanted. Frequent refinements embody guaranteeing appropriate drawable imports and importing icons. Think about the generated code a extremely environment friendly start line, accelerating your UI improvement workflow.

Diagram clarification and documentation

With Gemini’s multimodal capabilities, it’s also possible to attempt importing a picture of your diagram and ask for explanations or documentation.

Instance immediate: Add the Now in Android structure diagram and say “Clarify the parts and knowledge circulate on this diagram” or “Write documentation about this diagram”.

Example of generating Compose code from high-fidelity mock using Gemini in Android Studio

4. Instance of asking Gemini to assist doc the NowInAndroid structure diagram

UI troubleshooting

Leverage Gemini’s visible evaluation to determine and resolve bugs rapidly. Add a screenshot of the problematic UI, and Gemini will analyze the picture and recommend potential options. You can too embody related code snippets for extra exact help.

Within the instance under, we used Compose UI examine and located that the button is stretched too huge in pill screens, so we took a screenshot and requested Gemini for options – it was capable of leverage the window measurement courses to offer the suitable repair.

Example of generating Compose code from high-fidelity mock using Gemini in Android Studio

5. Instance of fixing UI bugs utilizing Picture Attachment (code output)

Obtain Android Studio in the present day

Obtain the most recent Android Studio canary in the present day to attempt the brand new multimodal options!

As at all times, Google is dedicated to the accountable use of AI. Android Studio will not ship any of your supply code to servers with out your consent. You possibly can learn extra on Gemini in Android Studio’s dedication to privateness.

We respect any suggestions on belongings you like or options you want to see. For those who discover a bug, please report the problem and in addition try identified points. Keep in mind to additionally comply with us on X, Medium, or YouTube for extra Android improvement updates!



New Quantum GPS Backup Is 50 Occasions Extra Exact Than State-of-the Artwork Options

0


Quantum sensors promise precision far past something doable utilizing classical know-how. Australian startup Q-CTRL has put the gadgets to work in a GPS backup that’s 50 instances higher than the present state-of-the-art.

Whereas quantum computing tends to garner probably the most headlines, there are a number of promising functions for know-how that may harness the bizarre results of quantum mechanics in areas like sensing and communication. And a giant weak spot for quantum computer systems is definitely a serious profit for quantum sensors. These methods’ sensitivity to the setting is a serious supply of error in quantum processors, but it surely additionally means quantum sensors can detect probably the most minute of adjustments in magnetic, electrical, and even gravitational fields.

Q-CTRL exploited these capabilities to create a tool that tracks tiny adjustments in Earth’s magnetic subject to find out its place. They designed the know-how to behave as a backup for GPS, which may lose sign or be intentionally jammed. In subject checks, the corporate confirmed it had a monitoring error 50 instances decrease than an inertial navigation system, the industry-standard GPS backup know-how.

“We’re thrilled to be the worldwide pioneer in taking quantum sensing from analysis to the sphere, being the primary to allow actual capabilities which have beforehand been little greater than a dream,” Q-CTRL CEO and founder Michael J. Biercuk mentioned in a press launch.

GPS jamming is a rising downside, and though most business plane have an inertial navigation system as a backup, their reliability leaves lots to be desired. These gadgets use movement sensors to trace a automobile from a identified place to begin, however errors rapidly creep in and might result in important positioning drift inside simply minutes.

Q-CTRL’s system takes a completely totally different method. A quantum magnetometer produced from trapped ions detects tiny variations within the Earth’s magnetic subject on account of adjustments within the construction of the floor beneath the plane. The gadget then compares these fluctuations to a map of the Earth’s magnetic subject to find out the automobile’s location.

The quantum sensor’s excessive sensitivity makes it doable to pinpoint location with excessive accuracy, but it surely additionally means it’s extremely prone to interference from electromagnetic radiation. To get round this, Q-CTRL mixed their {hardware} with specialised machine studying software program that acknowledges and removes magnetic noise from the sign.

To check the system, the corporate connected it to a small plane and carried out a sequence of 300-mile flights. The gadget pinpointed the airplane’s place to inside a couple of hundred yards all through the flight, in distinction to an inertial navigation system that in a short time strayed a number of miles off the true place and obtained steadily worse thereafter.

The system additionally outperformed a spread of different GPS backups, together with Doppler radar and Doppler velocity lidar by an element of 10. And in contrast to these approaches, the quantum navigation tech doesn’t emit any detectable sign, which might make it helpful in navy functions.

One limitation is that Q-CTRL’s gadget should evaluate its readings to detailed magnetic subject maps, which can not all the time be accessible, Mia Jukić on the Netherlands Group for Utilized Scientific Analysis advised New Scientist. The method all the time requires outstanding magnetic options to behave as landmarks, she added, or the navigation accuracy will endure.

Nonetheless, the know-how has caught the attention of main gamers in protection and aerospace. Q-CTRL is engaged on quantum navigation methods with the Australian Division of Protection, the US Division of Protection, the UK Royal Navy, in addition to Airbus.

Many Brokers Are Higher than One: Reworking Enterprise with AI Orchestration

0


The collaborative energy of multi-agent AI is right here and prepared to transform how companies function, search info, and make choices.

If many palms make gentle work, then think about what a community of AI brokers can obtain.

AI has already improved productiveness throughout industries, however its affect is usually restricted to remoted silos. As an illustration, consider an AI chatbot on an ecommerce website. It may possibly deal with fundamental buyer inquiries however could wrestle to carry out extra advanced duties that require cross-departmental collaboration, corresponding to offering customized suggestions, managing buyer complaints, or coordinating with different elements of the enterprise, corresponding to stock administration. This fragmented strategy not solely limits the shopper expertise but additionally makes it onerous for departments to alternate helpful info—leaving potential improvements and productiveness good points on the desk.

Enter multi-agent AI orchestration – the place a number of AI instruments, or “brokers,” work collectively seamlessly to drive higher and extra environment friendly outcomes. The transfer towards multi-agent collaboration will solely be strengthened by current breakthroughs, corresponding to DeepSeek, which have launched a brand new actuality for the effectivity, scalability, and cost-effectiveness of AI.

Think about multi-agent programs like a group of specialised staff in a manufacturing unit, every with their very own duties however all working collectively to construct a automobile. By coordinating their efforts and sharing info, they will obtain rather more and accomplish that extra effectively than working in isolation. Now, envision this collaborative energy utilized throughout numerous capabilities inside firms in each trade. That is the transformative potential of multi-agent AI orchestration.

Industries like finance, manufacturing, retail, and others stand to learn enormously from these applied sciences. By embracing multi-agent frameworks, organizations can unlock new ranges of effectivity and innovation, enhance the shopper expertise, and in the end convey services to market quicker.

Multi-Agent AI Techniques Have Arrived

Multi-agent programs are now not only a idea; they’ll quickly rework how companies function, search info, and make choices. Enterprises are transferring to them, leaning much less on siloed AI interfaces in favor of a extra collaborative strategy. A yr from now, I anticipate them to be indispensable in driving effectivity and productiveness good points.

Enterprises like biopharmaceutical firm Gilead Sciences are already harnessing these programs to remodel person engagement, increase productiveness, and obtain value financial savings. Automating routine duties and fostering seamless communication permits firms to deal with what they do finest. Within the case of Gilead, this implies their crucial work in stopping and treating life-threatening sicknesses. As soon as accomplished, the system will underpin Gilead’s international IT operations and allow key enterprise capabilities like finance and HR to speak by means of an interconnected system of brokers utilizing Giant Language Fashions.

This instance highlights the huge potential of this expertise past anybody sector. Following are three key takeaways for leaders for this new period of AI, the place multi-agents will work throughout complete companies to help people in each function, from HR and finance to advertising and gross sales:

Embrace Multi-Agent Effectivity for a Aggressive Edge

This expertise gives a strategic benefit by making a framework the place AI brokers work collectively to resolve advanced issues. By leveraging multi-agent orchestration, leaders can improve operational effectivity, positioning their organizations forward of the competitors. In manufacturing, brokers can handle the availability chain extra effectively by analyzing gross sales information and market tendencies to forecast demand, coordinating with suppliers for well timed materials supply, and monitoring stock ranges in real-time. Equally, an AI agent may also help predict gear points and coordinate with others to schedule upkeep in a manner that reduces operational interruptions.

Leverage AI to Improve Cross-Departmental Collaboration

Breaking down silos and enhancing communication throughout departments can result in extra cohesive and environment friendly operations. Within the banking sector, AI brokers can streamline operations and enhance customer support by means of coordinated efforts. For instance, an agent dealing with buyer inquiries can seamlessly switch related info to a different agent chargeable for processing transactions, making certain a clean and environment friendly buyer expertise. By implementing these programs, leaders can foster higher collaboration and drive total organizational effectivity.

Tailor AI Options to Suit your Distinctive Wants

These programs should not one-size-fits-all. They need to be tailor-made to fulfill the distinctive challenges of every firm or trade. In retail, for instance, AI brokers can improve the buying expertise by analyzing buyer buy historical past for customized suggestions and managing stock to maintain fashionable gadgets in inventory. In healthcare, these programs can help in affected person prognosis, handle medical data, and streamline appointment scheduling. Whereas the underlying expertise is analogous, its utility is far completely different. Leaders ought to work with AI and area consultants to create options that align with their targets, making certain higher worth.

The Path Ahead

Multi-agent AI programs will rework enterprise operations and innovation. By embracing these applied sciences, organizations can unlock new ranges of effectivity and deal with bringing modern options to market quicker.  For leaders, the message is obvious: the way forward for enterprise lies in harnessing the facility of multi-agent orchestration. Firms that fail to behave will fall behind.

ios – The best way to detect iPad trackpad touch-down (indirectPointer) to instantly cease coasting animation


I requested the query on Apple’s developer boards and that is the reply from “Apple Frameworks Engineer”:

There is a false impression right here that’s inflicting you issues. I might advocate this video from WWDC20 beginning right here (however actually simply the entire video):

https://developer.apple.com/movies/play/wwdc2020/10094/?time=146

A pointer-based contact is just going to be UITouch.Section.started -> UITouch.Section.ended when you could have clicked down on the pointing system (there can even be an related buttonMask). When your finger is on the contact floor of the trackpad or Magic Mouse it can not be in these phases, however a section like UITouch.Section.regionEntered or UITouch.Section.regionMoved.

Gestures like UIPanGestureRecognizer, UITapGestureRecognizer, and UILongPressGestureRecognizer don’t eat touches in these phases, in order that’s why they aren’t working for you. And to be clear, there is no such thing as a solution to inform these gestures to take action.

The one gesture that consumes these kind of hovering touches is UIHoverGestureRecognizer. I might advocate including a UIHoverGestureRecognizer to one among your views. Do word that that is going to fireplace at any time when the pointer is seen and inside your view, so if this can be a giant container, that may very well be frequent. You might wish to allow this gesture when the momentum spinning begins, however in any other case maintain it disabled.

Hope that helps!

This did resolve my drawback, nevertheless it turned out that I could not simply activate the hover recognizer instantly after my pan recognizer ended — it could hearth off some residual .modified occasions and trigger the coasting animation to freeze instantly.

So my implementation was to start out looking forward to the touches when my pan recognizer ended, however after a brief delay of 1/tenth of a second. I wrote this scheduleStartWatchingForTrackpadTouches() methodology for my view controller and had the .ended handler for the pan recognizer name it:

func scheduleStartWatchingForTrackpadTouches() {
    DispatchQueue.major.asyncAfter(deadline: .now() + 0.1) { [weak self] in
        self?.startWatchingForTrackpadTouches()
    }
}

Then I used this pair of strategies to create and activate/deactivate the recognizer as wanted:

func startWatchingForTrackpadTouches() {
    // Create the recognizer the primary time by way of
    if hoverRecognizer == nil {
        hoverRecognizer = UIHoverGestureRecognizer(goal: self, motion: #selector(handleHover(_:)))
    }
        
    // Add the recognizer to the view
    if let recognizer = hoverRecognizer {
        view.addGestureRecognizer(recognizer)
    }
}

func stopWatchingForTrackpadTouches() {
    // Take away the recognizer from the view
    if let recognizer = hoverRecognizer {
        view.removeGestureRecognizer(recognizer)
    }
}

Lastly, that is the occasion handler for the recognizer:

@objc non-public func handleHover(_ recognizer: UIHoverGestureRecognizer) {
    if recognizer.state == .modified {
        // Notify of contact start
        touchesBegan()
        
        // Don’t watch till explicitly requested
        stopWatchingForTrackpadTouches()
    }
}

On the primary .modified message I name a technique named touchesBegan() in my opinion controller to freeze the animations, after which I take away the recognizer so it solely fires as soon as and is disabled till it is wanted for the subsequent pan gesture.

Multimodal for Gemini in Android Studio, information for gaming devs, the newest gadgets at MWC, XR and extra!



Multimodal for Gemini in Android Studio, information for gaming devs, the newest gadgets at MWC, XR and extra!

Posted by Anirudh Dewani – Director, Android Developer Relations

We simply dropped our Winter episode of #TheAndroidShow, on YouTube and on developer.android.com, and this time we have been in Barcelona to provide the newest from Cellular World Congress and throughout the Android Developer world. We unveiled a giant replace to Gemini in Android Studio (multi-modal help, so you possibly can translate picture to code) and we shared some information for video games builders forward of GDC later this month. Plus we unpacked the newest Android {hardware} gadgets from our companions popping out of Cellular World Congress and recapped the entire newest in Android XR. Let’s dive in!

Multimodality image-to-code, now obtainable for Gemini in Android Studio

At each stage of the event lifecycle, Gemini in Android Studio has develop into your AI-powered companion. At the moment, we took the wraps off a brand new characteristic: Gemini in Android Studio now helps multimodal picture to code, which helps you to connect pictures on to your prompts! This unlocks a wealth of recent prospects that enhance collaboration and design workflows. You possibly can check out this new characteristic by downloading the newest canary – Android Studio Narwal, and browse extra about multimodal picture attachment – now obtainable for Gemini in Android Studio.

Constructing wonderful video games with higher graphics and efficiency

Forward of subsequent week’s Video games Developer Convention (GDC), we introduced new developer instruments that may assist enhance gameplay throughout the Android ecosystem. We’re making Vulkan the official graphics API on Android, enabling you to construct immersive visuals, and we’re enhancing the Android Dynamic Efficiency Framework (ADPF) that will help you ship longer, extra secure gameplay classes. Be taught extra about how we’re constructing wonderful video games with higher graphics and efficiency.

A deep dive into Android XR

Since we unveiled Android XR in December, it has been thrilling to see builders making ready their apps for the following era of Android XR gadgets. Within the newest episode of #TheAndroidShow we dove into this new kind issue and spoke with a developer who has already been constructing. Growing for this new platform leverages your present Android improvement abilities and acquainted instruments like Android Studio, Kotlin, and Jetpack libraries. The Android XR SDK Developer Preview is obtainable now, full with an emulator, so you can begin experimenting and constructing XR experiences instantly! Go to developer.android.com/xr for extra.

New Android foldables and tablets, at Cellular World Congress

Cellular World Congress is a giant second for Android, with companions from world wide exhibiting off their newest gadgets. And should you’re already constructing adaptive apps, we wished to share among the cool new foldable and tablets that our companions launched in Barcelona:

    • OPPO: OPPO launched their Discover N5, their slim 8.93mm foldable with a 8.12” giant display – making it as compact or expansive as wanted.
    • Xiaomi: Xiaomi debuted the Xiaomi Pad 7 sequence. Xiaomi Pad 7 supplies a crystal-clear show and, with the productiveness equipment, customers get a desktop-like expertise with the comfort of a pill.
    • Lenovo: Lenovo showcased their Yoga Tab Plus, the newest highly effective pill from their lineup designed to empower creativity and productiveness.

These new gadgets are an ideal cause to construct adaptive apps that scale throughout display sizes and system varieties. Plus, Android 16 removes the power for apps to limit orientation and resizability on the platform stage, so that you’ll wish to put together. That will help you get began, the Compose Materials 3 adaptive library lets you shortly and simply create layouts throughout all display sizes whereas decreasing the general improvement value.

Watch the Winter episode of #TheAndroidShow

That’s a wrap on this quarter’s episode of #TheAndroidShow. A particular because of our co-hosts for the Fall episode, Simona Milanović and Alejandra Stamato! You possibly can watch the total present on YouTube and on developer.android.com/occasions/present.

Have an thought for our subsequent episode of #TheAndroidShow? It’s your dialog with the broader group, and we’d love to listen to your concepts for our subsequent quarterly episode – you possibly can tell us on X or LinkedIn.