Posted by Mayank Jain – Product Supervisor and Jomo Fisher – Software program Engineer
Get able to improve your app’s efficiency as Android embraces 16 KB reminiscence web page sizes
Android’s transition to 16 KB Web page measurement
Historically, Android has operated with the 4 KB reminiscence web page measurement. Nonetheless many ARM CPUs (the most typical processors for Android telephones) assist the bigger 16 KB web page measurement, providing improved efficiency features. With Android 15, the Android working system is page-size-agnostic, permitting gadgets to run effectively with both 4 KB or 16 KB web page measurement.
Beginning November 1st, 2025, all new apps and app updates that use native C/C++ code focusing on Android 15+ gadgets submitted to Google Play should assist 16 KB web page sizes. This can be a essential step in the direction of making certain your app delivers the absolute best efficiency on the newest Android {hardware}. Apps with out native C/C++ code or dependencies, that simply use the Kotlin and Java programming languages, are already appropriate, however should you’re utilizing native code, now could be the time to behave.
This transition to bigger 16 KB web page sizes interprets straight into a greater person expertise. Gadgets configured with 16 KB web page measurement can see an general efficiency increase of 5-10%. This implies sooner app launch instances (as much as 30% for some apps, 3.16% on common), improved battery utilization (4.56% discount in energy draw), faster digital camera begins (4.48-6.60% sooner), and even speedier system boot-ups (round 0.8 seconds sooner). Whereas there’s a marginal improve in reminiscence use, a sooner reclaim path is value it.
The native code problem – and the way Android Studio equips you
In case your app makes use of native C/C++ code from the Android NDK or depends on SDKs that do, you will must recompile and doubtlessly alter your code for 16 KB compatibility. The excellent news? As soon as your software is up to date for the 16 KB web page measurement, the similar software binary can run seamlessly on each 4 KB and 16 KB gadgets.
This desk describes who must transition and recompile their apps
We’ve created a number of Android Studio instruments and guides that may enable you to put together for migrating to utilizing 16 KB web page measurement.
Detect compatibility points
APK Analyzer: Simply establish in case your app comprises native libraries by checking for .so recordsdata within the lib folder. The APK Analyzer also can visually point out your app’s 16 KB compatibility. You possibly can then decide and replace libraries as wanted for 16 KB compliance.
Alignment Checks: Android Studio additionally offers warnings in case your prebuilt libraries or APKs should not 16 KB compliant. You need to then use the APK Analyzer instrument to overview which libraries have to be up to date or if any code modifications are required. If you wish to detect the 16 KB web page measurement compatibility checks in your CI (steady integration) pipeline, you possibly can leverage scripts and command line instruments.
Lint in Android Studio now additionally highlights the native libraries which aren’t 16 KB aligned.
Construct with 16 KB alignment
Instruments Updates:Rebuild your native code with 16 KB alignment. Android Gradle Plugin (AGP) model 8.5.1 or larger routinely permits 16 KB alignment by default (throughout packaging) for uncompressed shared libraries. Equally, Android NDK r28 and better compile 16 KB-aligned by default. In the event you depend upon different native SDK’s, in addition they have to be 16 KB aligned. You would possibly want to succeed in out to the SDK developer to request a 16 KB compliant SDK.
Repair code for page-size agnosticism
Eradicate Hardcoded Assumptions: Establish and take away any hardcoded dependencies on PAGE_SIZE or assumptions that the web page measurement is 4 KB (e.g., 4096). As an alternative, use getpagesize() or sysconf(_SC_PAGESIZE) to question the precise web page measurement at runtime.
Take a look at in a 16 KB atmosphere
Android Emulator Assist: Android Studio gives a 16 KB emulator goal (for each arm64 and x86_64) straight within the Android Studio SDK Supervisor, permitting you to check your purposes earlier than importing to Google Play.
On-Machine Testing: For appropriate gadgets like Pixel 8 and eight Professional onwards (beginning with Android 15 QPR1), a brand new developer possibility means that you can swap between 4 KB and 16 KB web page sizes for real-device testing. You possibly can confirm the web page measurement utilizing adb shell getconf PAGE_SIZE.
Do not wait – put together your apps immediately
Leverage Android Studio’s highly effective instruments to detect points, construct appropriate binaries, repair your code, and totally check your app for the brand new 16 KB reminiscence web page sizes. By doing so, you will guarantee an improved finish person expertise and contribute to a extra performant Android ecosystem.
Posted by Dan Galpin – Android Developer Relations
To higher help you and supply earlier, extra constant entry to in-development options, we’re saying a major evolution in our pre-release program. Transferring ahead, the Android platform can have a Canary launch channel, which can substitute the earlier developer preview program. This Canary launch channel will operate alongside the present beta program.
This alteration is designed to offer a extra streamlined and steady alternative so that you can check out new platform capabilities and supply suggestions all through the whole 12 months, not simply within the early months of a brand new launch cycle.
Limitations of the earlier developer preview mannequin
The Developer Preview program has been a vital a part of our launch cycle, however its construction had inherent limitations:
Developer Previews weren’t tied to a launch channel, and needed to be manually flashed to gadgets each time the cycle would restart.
As a result of previews had been tied to the following designated Android launch, they had been solely accessible through the earliest a part of the cycle. As soon as a platform model reached the Beta stage, the preview monitor would finish, creating a niche the place options that had been promising however not but prepared for Beta had no official channel for suggestions.
A steady circulation of options with the Canary channel
The brand new Android platform Canary channel addresses these challenges immediately. By flashing your supported Pixel gadget to the Canary launch channel, now you can obtain a steady, rolling stream of the most recent platform builds by way of over-the-air (OTA) updates.
You may check out and supply enter on new options and deliberate habits adjustments of their earliest levels. These adjustments might not all the time make it right into a secure Android launch.
The Canary launch channel will run in parallel with the beta program. The beta program stays the way in which so that you can attempt a extra polished set of seemingly soon-to-be-released options.
You should utilize the Canary builds along with your CI to see if any of our in-development options trigger sudden issues along with your app, maximizing the time we’ve got to deal with your issues.
Who ought to use the Canary channel?
The Canary channel is meant for builders that wish to discover and take a look at with the earliest pre-release Android APIs and potential habits adjustments. Builds from the Canary channel can have handed our automated exams in addition to skilled a brief take a look at cycle with inner customers. You must anticipate bugs and breaking adjustments. These bleeding-edge builds won’t be your best option for somebody to make use of as their major or solely gadget.
The prevailing beta channel will stay the first means so that you can guarantee that your apps are each suitable with and benefit from upcoming platform options.
Getting began and offering suggestions
You should utilize the Android Flash Software to get the latest Canary construct onto your supported Pixel gadget. As soon as flashed, you must anticipate OTA updates for the most recent Canary builds as they grow to be accessible. To exit the channel, flash a Beta or Public construct to your gadget. This can require a knowledge partition wipe.
Canary releases will likely be accessible on the Android Emulator by means of the Gadget Supervisor in Android Studio (presently, simply within the Android Studio Canary channel), and Canary SDKs will likely be accessible so that you can develop towards by means of the SDK Supervisor.
Since most habits adjustments require concentrating on a launch, you’ll be able to goal Canary releases the way in which you’ll be able to goal every other platform SDK model, or use the Compatibility Framework with supported options to allow habits adjustments in your apps.
Suggestions is a vital element of this new program, so please file characteristic suggestions and bug experiences in your Canary expertise by means of the Google Concern Tracker.
By transitioning to a real Canary channel, we intention to create a extra clear, collaborative, and environment friendly improvement course of, supplying you with the seamless entry you have to put together for the way forward for Android.
I’ve been on-call throughout outages that ruined weekends, sat by means of postmortems that felt like remedy, and seen instances the place a single log line would have saved six hours of debugging. These experiences will not be edge instances; they’re the norm in fashionable manufacturing methods.
We’ve come a great distance since Google’s Web site Reliability Engineering e-book reframed uptime as an engineering self-discipline. Error budgets, observability, and automation have made constructing and working software program much more sane.
However right here’s the uncomfortable fact: Most manufacturing methods are nonetheless basically reactive. We detect after the very fact. We reply too slowly. We scatter context throughout instruments and folks.
We’re overdue for a shift.
Manufacturing methods ought to:
Inform us when one thing’s improper
Clarify it
Be taught from it
And assist us repair it.
The following period of reliability engineering is what I name “Vibe Loop.” It’s a good, AI-native suggestions cycle of writing code, observing it in manufacturing, studying from it, and bettering it quick.
Builders are already “vibe coding,” or enlisting a copilot to assist form code collaboratively. “Vibe ops” extends the identical idea to DevOps.
Vibe Loopadditionallyextends the identical idea to manufacturing reliability engineering to shut the loop from incident to perception to enchancment with out requiring 5 dashboards.
It’s not a instrument, however a brand new mannequin for working with manufacturing methods, one the place:
Instrumentation is generated with code
Observability improves as incidents occur
Blind spots are surfaced and resolved routinely
Telemetry turns into adaptive, specializing in sign, not noise
Postmortems aren’t artifacts however inputs to studying methods
Step 1: Immediate your AI CodeGen Instrument to Instrument
With instruments like Cursor and Copilot, code doesn’t have to be born blind. You possibly can — and will — immediate your copilot to instrument as you construct. For instance:
“Write this handler and embrace OpenTelemetry spans for every main step.”
“Monitor retries and log exterior API standing codes.”
“Emit counters for cache hits and DB fallbacks.”
The aim is Observability-by-default.
OpenTelemetry makes this potential. It’s the de facto customary for structured, vendor-agnostic instrumentation. When you’re not utilizing it, begin now. You’ll wish to feed your future debugging loops with wealthy, standardized knowledge.
Step 2: Add the Mannequin Context Layer
Uncooked telemetry is just not sufficient. AI instruments wantcontext, not simply knowledge. That’s the place theMannequin Context Protocol (MCP)is available in. It’s a proposed customary for sharing info throughout AI fashions to enhance efficiency and consistency throughout completely different purposes.
Consider MCP because the glue between your code, infrastructure, and observability. Use it to reply questions like:
What companies exist?
What modified lately?
Who owns what?
What’s been alerting?
What failed earlier than, and the way was it fastened?
The MCP server presents this in a structured, queryable manner.
When one thing breaks, you possibly can ask:
“Why is checkout latency up?”
“Has this failure sample occurred earlier than?”
“What did we study from incident 112?”
You’ll get extra than simply charts; you’ll get reasoning involving previous incidents, correlated spans, and up to date deployment differentials. It’s the type of context your greatest engineers would convey, however immediately out there.
It’s anticipated that the majority methods will quickly assist MCP, making it just like an API. Your AI agent can use it to assemble context throughout a number of instruments and cause about what they study.
Step 3: Shut the Observability Suggestions Loop
Right here’s the place vibe loop will get highly effective: AI doesn’t simply allow you to perceive manufacturing; it helps you evolve it.
It will probably provide you with a warning to blind spots and provide corrective actions:
“You’re catching and retrying 502s right here, however not logging the response.”
“This span is lacking key attributes. Need to annotate it?”
“This error path has by no means been traced — need me so as to add instrumentation?”
It helps you trim the fats:
“This log line has been emitted 5M occasions this month, by no means queried. Drop it?”
“These traces are sampled however unused. Cut back cardinality?”
“These alerts fireplace ceaselessly however are by no means actionable. Need to suppress?”
You’re now not chasing each hint; you’re curating telemetry with intent.
Observability is now not reactionary however adaptive.
From Incident to Perception to Code Change
What makes vibe loop completely different from conventional SRE workflows isvelocity and continuity. You’re not simply firefighting after which writing a doc. You’re tightening the loop:
An incident occurs
AI investigates, correlates, and surfaces potential root causes
It recollects previous related occasions and their resolutions
It proposes instrumentation or mitigation modifications
It helps you implement these modifications in codeinstantly
The system truly helps you examine incidents and write higher code after each failure.
What This Appears to be like Like Day-to-Day
When you’re a developer, right here’s what this would possibly seem like:
You immediate AI to write down a service and instrument itself.
Every week later, a spike in latency hits manufacturing.
You immediate, “Why did the ninety fifth percentile latency bounce in EU after 10 am”?
AI solutions, “Deploy at 09:45, added a retry loop. Downstream service B is rate-limiting.”
You agree with the speculation and take motion.
AI suggests you shut the loop: “Need to log headers and scale back retries?”
You say sure. It generates the pull request.
You merge, deploy, and resolve.
No Jira ticket. No handoff. No forgetting.
That’s vibe loop.
Closing Thought: Web site Reliability Taught Us What to Intention For. Vibe Loop Will get There.
Vibe loop isn’t a single AI agent however a community of brokers that get particular, repeatable duties finished. They recommend hypotheses with higher accuracy over time. They gained’t exchange engineers however will empower the common engineer to function at an knowledgeable stage.
It’s not good, however for the primary time, our instruments are catching as much as the complexity of the methods we run.
A world examine led by researchers on the College of Colorado Anschutz Medical Campus has recognized a promising technique to boost the security of nanomedicines, superior therapies usually utilized in most cancers and vaccine therapies, by utilizing medication already permitted by the FDA for unrelated situations.
Their analysis means that repurposing current drugs can scale back dangerous immune responses related to nanoparticles. These ultra-small particles are designed to ship therapies with precision however, in some instances, the immune system can react adversely.
“Nanoparticles are highly effective instruments in medication, however the physique usually acknowledges them as threats,” mentioned Dmitri Simberg, Ph.D., co-director and professor on the Colorado Heart for Nanomedicine and Nanosafety on the Skaggs Faculty of Pharmacy and Pharmaceutical Sciences at CU Anschutz and lead creator of the examine.
“We discovered that sure current medication used for immune-related situations may help mitigate these reactions.”
When launched into the physique for remedy or imaging, nanoparticles can set off irritation and different immune-related unintended effects. This happens when the immune system, significantly the complement system, a bunch of blood proteins chargeable for detecting potential threats, mistakenly targets useful nanoparticles.
“This method is essential for preventing infections, however it could actually turn into overactive in response to nanomedicine,” Simberg defined.
These overreactions could trigger signs equivalent to pores and skin rashes, respiratory misery, cardiovascular issues or severe anaphylactic reactions. To handle this, the group examined immune-modulating compounds that inhibit complement activation, aiming to scale back immune assaults on nanoparticles with out broadly weakening the immune system.
Among the many medication examined in blood samples, iptacopan, presently permitted to deal with sure uncommon blood, nerve, and kidney issues, was notably efficient in blocking complement exercise and minimizing adversarial results.
“We have been impressed by how nicely iptacopan carried out in preclinical animal fashions and a few human samples,” mentioned Simberg. “It not solely diminished immune responses but additionally prevented extra extreme signs.”
The researchers additionally famous appreciable variability in how people reply to nanoparticle-based therapies, usually relying on particular elements used. This highlights the significance of personalised approaches to nanomedicine.
“We nonetheless want to grasp which sufferers are at increased threat of allergic or inflammatory reactions, as a way to apply immune-modulating medication throughout nanomedicine therapy,” Simberg added.
Simberg mentioned the findings open the door to broader and safer functions of nanomedicine for ailments equivalent to most cancers, infections and genetic situations.
“If we will handle the physique’s response extra successfully, we will enhance entry to those life-saving therapies for a wider group of sufferers,” mentioned Simberg.
The collaborative examine concerned scientists from each the College of Colorado Anschutz Medical Campus, Cardiff College, and Newcastle College in the UK.
With iOS 26, Apple introduces the Basis Fashions framework, a privacy-first, on-device AI toolkit that brings the identical language fashions behind Apple Intelligence proper into your apps. This framework is out there throughout Apple platforms, together with iOS, macOS, iPadOS, and visionOS, and it offers builders with a streamlined Swift API for integrating superior AI options straight into your apps.
In contrast to cloud-based LLMs akin to ChatGPT or Claude, which run on highly effective servers and require web entry, Apple’s LLM is designed to run fully on-device. This architectural distinction provides it a singular benefit: all knowledge stays on the person’s gadget, guaranteeing privateness, decrease latency, and offline entry.
This framework opens the door to a complete vary of clever options you possibly can construct proper out of the field. You’ll be able to generate and summarize content material, classify info, and even construct in semantic search and customized studying experiences. Whether or not you wish to create a sensible in-app information, generate distinctive content material for every person, or add a conversational assistant, now you can do it with just some strains of Swift code.
On this tutorial, we’ll discover the Basis Fashions framework. You’ll be taught what it’s, the way it works, and the best way to use it to generate content material utilizing Apple’s on-device language fashions.
Able to get began? Let’s dive in.
The Demo App: Ask Me Something
It’s at all times nice to be taught new frameworks or APIs by constructing a demo app — and that’s precisely what we’ll do on this tutorial. We’ll create a easy but highly effective app known as Ask Me Something to discover how Apple’s new Basis Fashions framework works in iOS 26.
The app lets customers sort in any questions and offers an AI-generated response, all processed on-device utilizing Apple’s built-in LLM.
By constructing this demo app, you may learn to combine the Basis Fashions framework right into a SwiftUI app. You will additionally perceive the best way to create prompts and seize each full and partial generated responses.
Utilizing the Default System Language Mannequin
Apple offers a built-in mannequin known as SystemLanguageModel, which supplies you entry to the on-device basis mannequin that powers Apple Intelligence. For general-purpose use, you possibly can entry the base model of this mannequin by way of the default property. It’s optimized for textual content technology duties and serves as an amazing start line for constructing options like content material technology or query answering in your app.
To make use of it in your app, you may first must import the FoundationModels framework:
import FoundationModels
With the framework now imported, you will get a deal with on the default system language mannequin. Right here’s the pattern code to do this:
struct ContentView: View {
personal var mannequin = SystemLanguageModel.default
var physique: some View {
change mannequin.availability {
case .obtainable:
mainView
case .unavailable(let motive):
Textual content(unavailableMessage(motive))
}
}
personal var mainView: some View {
ScrollView {
.
.
.
}
}
personal func unavailableMessage(_ motive: SystemLanguageModel.Availability.UnavailableReason) -> String {
change motive {
case .deviceNotEligible:
return "The gadget just isn't eligible for utilizing Apple Intelligence."
case .appleIntelligenceNotEnabled:
return "Apple Intelligence just isn't enabled on this gadget."
case .modelNotReady:
return "The mannequin is not prepared as a result of it is downloading or due to different system causes."
@unknown default:
return "The mannequin is unavailable for an unknown motive."
}
}
}
Since Basis Fashions solely work on units with Apple Intelligence enabled, it is vital to confirm {that a} mannequin is out there earlier than utilizing it. You’ll be able to test its readiness by inspecting the availability property.
Implementing the UI
Let’s proceed to construct the UI of the mainView. We first add two state variables to retailer the person query and the generated reply:
@State personal var reply: String = ""
@State personal var query: String = ""
For the UI implementation, replace the mainView like this:
The implementation is fairly simple – I simply added a contact of fundamental styling to the textual content subject and button.
Producing Responses with the Language Mannequin
Now we’ve come to the core a part of app: sending the query to the mannequin and producing the response. To deal with this, we create a brand new perform known as generateAnswer():
personal func generateAnswer() async {
let session = LanguageModelSession()
do {
let response = attempt await session.reply(to: query)
reply = response.content material
} catch {
reply = "Did not reply the query: (error.localizedDescription)"
}
}
As you possibly can see, it solely takes a number of strains of code to ship a query to the mannequin and obtain a generated response. First, we create a session utilizing the default system language mannequin. Then, we move the person’s query, which is called a immediate, to the mannequin utilizing the reply methodology.
The decision is asynchronous because it normally takes a number of second (and even longer) for the mannequin to generate the response. As soon as the response is prepared, we will entry the generated textual content via the content material property and assign it to reply for show.
To invoke this new perform, we additionally must replace the closure of the “Get Reply” button like this:
Button {
Job {
await generateAnswer()
}
} label: {
Textual content("Present me the reply")
.body(maxWidth: .infinity)
.font(.headline)
}
You’ll be able to take a look at the app straight within the preview pane, or run it within the simulator. Simply sort in a query, wait a number of seconds, and the app will generate a response for you.
Reusing the Session
The code above creates a brand new session for every query, which works effectively when the questions are unrelated.
However what if you need customers to ask follow-up questions and hold the context? In that case, you possibly can merely reuse the identical session every time you name the mannequin.
For our demo app, we will transfer the session variable out of the generateAnswer() perform and switch it right into a state variable:
@State personal var session = LanguageModelSession()
After making the change, attempt testing the app by first asking: “What are the must-try meals when visiting Japan?” Then observe up with: “Counsel me some eating places.”
For the reason that session is retained, the mannequin understands the context and is aware of you are searching for restaurant suggestions in Japan.
In case you don’t reuse the identical session, the mannequin gained’t acknowledge the context of your follow-up query. As an alternative, it’ll reply with one thing like this, asking for extra particulars:
“Certain! To give you one of the best solutions, might you please let me know your location or the kind of delicacies you are excited by?”
Disabling the Button Throughout Response Technology
For the reason that mannequin takes time to generate a response, it’s a good suggestion to disable the “Get Reply” button whereas ready for the reply. The session object features a property known as isResponding that permits you to test if the mannequin is at present working.
To disable the button throughout that point, merely use the .disabled modifier and move within the session’s standing like this:
The present person expertise is not superb — for the reason that on-device mannequin takes time to generate a response, the app solely exhibits the end result after the complete response is prepared.
In case you’ve used ChatGPT or related LLMs, you’ve most likely observed that they begin displaying partial outcomes virtually instantly. This creates a smoother, extra responsive expertise.
The Basis Fashions framework additionally helps streaming output, which lets you show responses as they’re being generated, reasonably than ready for the whole reply. To implement this, use the streamResponse methodology reasonably than the reply methodology. Here is the up to date generateAnswer() perform that works with streaming responses:
personal func generateAnswer() async {
do {
reply = ""
let stream = session.streamResponse(to: query)
for attempt await streamData in stream {
reply = streamData.asPartiallyGenerated()
}
} catch {
reply = "Did not reply the query: (error.localizedDescription)"
}
}
Similar to with the reply methodology, you move the person’s query to the mannequin when calling streamResponse. The important thing distinction is that as an alternative of ready for the total response, you possibly can loop via the streamed knowledge and replace the reply variable with every partial end result — displaying it on display because it’s generated.
Now while you take a look at the app once more and ask any questions, you may see responses seem incrementally as they’re generated, creating a way more responsive person expertise.
Abstract
On this tutorial, we coated the fundamentals of the Basis Fashions framework and confirmed the best way to use Apple’s on-device language mannequin for duties like query answering and content material technology.
That is only the start — the framework affords far more. In future tutorials, we’ll dive deeper into different new options akin to the brand new @Generable and @Information macros, and discover extra capabilities like content material tagging and power calling.
In case you’re seeking to construct smarter, AI-powered apps, now could be the proper time to discover the Basis Fashions framework and begin integrating on-device intelligence into your initiatives.