今日已更新 264 条资讯 | 累计 23847 条内容
关于我们

标签:#mobile

找到 141 篇相关文章

AI 资讯

Keeping Android Services Alive Against OEM Battery Aggression

It was the middle of a Friday afternoon, and I was sitting in the front row of a local mosque. The room was deathly quiet, the kind of silence that amplifies every heartbeat. Suddenly, three rows behind me, a phone erupted with a loud, brassy ringtone that seemed to go on for an eternity. The man scrambled to silence it, his face turning bright red as he fumbled with his screen. I felt his humiliation deeply. In that moment, I realized that modern smartphones—despite their intelligence—are remarkably stupid when it comes to context-aware social etiquette. We live in a world of smart devices, yet we are still manually toggling our volume settings like it is 2005. I have spent years forgetting to silence my phone before a meeting, a lecture, or a quiet space, only to have it buzz loudly at the worst possible time. It is a friction point that feels trivial until it happens to you, at which point it becomes incredibly disruptive. Existing solutions often fall into two camps: over-engineered automation tools that require a computer science degree to configure, or basic calendar-sync apps that lack the nuance needed for things like location-based triggers or recurring religious observances. I wanted something that just worked, quietly, in the background, without requiring me to constantly open an app to double-check if my rules were still active. When I started building Muffle, I quickly realized that the greatest obstacle wasn't the logic of detecting a location or a prayer time—it was the operating system itself. Android, in its quest to squeeze every millisecond of battery life out of a device, has turned into a minefield for developers trying to keep background tasks alive. If you rely on a standard Service , the system will kill it within minutes as soon as the user turns the screen off. I needed a way to ensure that my background monitoring, especially for geofencing and prayer time calculations, stayed alive even when the phone was sitting in a pocket for hours. I

2026-06-26 原文 →
AI 资讯

Trump Mobile will take your $499 right now

Where's the Trump phone? We're going to keep talking about it every week. We still don't have the phones we preordered yet, but this week the T1 hit open sale, no deposit required. Trump Mobile's T1 Phone is now available for anyone to buy directly. The phone has previously trickled out to a small number […]

2026-06-26 原文 →
开发者

Oppo’s Bubble selfie screen is crying out for Qi2

The Oppo Bubble is a smart second screen for your phone, one that can be attached and detached at will, connects wirelessly, and serves as either a selfie screen or a wireless camera remote. It's the best version of this idea I've used yet, but also a frustrating reminder that it could be even better […]

2026-06-26 原文 →
开发者

Samsung’s new budget phone costs $50 more despite downgrades

The Galaxy A27 has been announced, and at $349.99 it's $50 more than last year's A26. That's understandable in the current economic climate, but a harder sell given that Samsung has also downgraded a few key specs. Compared to last year's phone, the A27 has lower resolution 12-megapixel selfie and 5-megapixel ultrawide cameras, worse IP64 […]

2026-06-25 原文 →
AI 资讯

Keeping Android Background Services Alive Against OEM Aggression

We have all been there: you build a utility app that relies on precise location or time-based triggers, only to find that it works perfectly on your Pixel but dies silently on a Samsung or Xiaomi device. When I started building Muffle, an app designed to automate sound profiles based on prayer times and GPS, I realized that standard AlarmManager usage wasn't enough to survive aggressive battery optimizations. The Problem with OEM Kill-Switches Modern Android versions enforce strict background execution limits. If your app isn't a high-priority foreground service, OEMs will frequently kill your process to save a few milliwatts of battery. For Muffle, if the process dies, the user misses their silent profile trigger, which defeats the entire purpose of the app. I had to move away from relying on a long-running background service and rethink my architecture entirely. Moving to WorkManager with Expedited Jobs Instead of a persistent service, I transitioned the core logic to WorkManager . By utilizing ExistingPeriodicWorkPolicy.UPDATE , I ensure that the scheduling remains consistent even across reboots. However, WorkManager alone can be delayed by Doze mode. To combat this, I implemented setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST) for critical profile switches. This tells the system that the work is time-sensitive. kotlin val workRequest = PeriodicWorkRequestBuilder(15, TimeUnit.MINUTES) .setConstraints(Constraints.Builder().build()) .setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST) .build() Leveraging Foreground Services with Notifications For features requiring immediate precision—like geofencing—I had to accept that a persistent notification is non-negotiable. To keep the app from being perceived as 'spammy,' I designed the notification to be low-priority, showing only when a profile is actively being managed. I also had to handle the onTaskRemoved callback in my Service implementation. By calling startService again with a sticky

2026-06-25 原文 →
AI 资讯

Optimizing Geofence Transitions: Battery Efficient Background Logic in Android

We have all been there: a meeting starts, and suddenly your phone rings. I built Muffle to automate silent profiles, but the biggest hurdle wasn't the UI—it was making sure the app didn't destroy the user's battery while monitoring GPS coordinates. The Trap of Continuous Location Updates Early prototypes used LocationManager with frequent updates. This is the fastest way to get your app uninstalled. Keeping the GPS radio active in the background forces the device to wake the CPU constantly, leading to significant battery drain. To solve this, I moved away from active polling and shifted to the GeofencingClient API. Leveraging GeofencingClient for Passive Monitoring Instead of calculating distance from a point every few seconds, I transitioned to system-level geofencing. By defining circular regions around locations like the office or a mosque, the OS handles the monitoring at the hardware abstraction layer. kotlin val geofencingRequest = GeofencingRequest.Builder() .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER) .addGeofences(geofenceList) .build() This approach allows the OS to do the heavy lifting. The app stays in a dormant state until the location provider signals a transition. The kernel only wakes the app when the device enters or exits the radius. The Trade-off: Precision vs. Power Using GeofencingClient means accepting a slightly slower trigger time compared to raw GPS polling. Sometimes, there is a delay of a few seconds as the device wakes from a deep sleep state. For a utility like Muffle, this is a fair trade-off. Users prefer their phone to silence five seconds after entering a building rather than finding their battery dead by noon. To mitigate the delay, I combined geofencing with a secondary intent service that performs a final check once the geofence trigger hits, ensuring that we aren't just reacting to a momentary GPS jitter. Final Thoughts By offloading the monitoring to the platform's native geofencing API, I was able to keep Muffle

2026-06-25 原文 →
AI 资讯

Sony’s Xperia 1 VIII is still a phone for the fans

The Xperia 1 VIII marks an attempt at a step change for Sony's flagship phone line. Not only has it had an aesthetic overhaul, but Sony has also revamped the camera system, dropping the continuous optical zoom telephoto that's defined the last four generations of Xperia phone. It's not all different. Sony staples like a […]

2026-06-21 原文 →
AI 资讯

Shipping one Flutter codebase to 6 platforms: what I learned building Tuneline

I spent the last several months solo-building Tuneline , a cross-platform media player, from a single Flutter codebase that ships native apps to macOS, Windows, Linux, Android, Google TV, and iOS . No Electron. Here is the stack and a few things that bit me. The stack Flutter 3.38 / Dart 3.10 — one codebase, six targets. media_kit for playback — libmpv on desktop, ExoPlayer on Android. Avoiding per-platform video plugins was the single biggest sanity win. Riverpod for state, Hive for local storage, Dio for HTTP. Node.js + Prisma backend for the cloud-sync layer, so your library, favorites, and settings replicate across devices. GoRouter with a single-route, tab-driven shell so the same layout reflows from a phone to a 10-foot TV UI. Things that bit me TV is its own design language. A 10-foot, focus-based UI is not a big phone. D-pad focus traversal, larger hit targets, and a separate Google TV store listing were all non-trivial. Per-platform video quirks. Desktop (libmpv) and mobile (ExoPlayer) disagree on enough edge cases that a shared abstraction over media_kit earned its keep. Sync is a distributed-systems problem in disguise. "Set up once, never rebuild it" sounds simple until two devices edit the same data offline. Keeping one canonical decoder for both the socket sync-down and the REST pull saved me from a whole class of drift bugs. One codebase is not one design. Window management on desktop, picture-in-picture per platform, and safe-area handling on mobile each needed platform-specific care even with a shared core. The product Tuneline is a bring-your-own-content player, like VLC — you supply your own playlists and it does not host anything. Every viewing feature is free on one device, and the only paid tier is cloud sync plus multi-device. No subscriptions. Site: https://tuneline.app — happy to answer any Flutter or cross-platform questions in the comments.

2026-06-21 原文 →
开发者

Why I Redesigned StrictBlock to Make Focus Feel Easier

I rebuilt StrictBlock (my app) from the ground up. StrictBlock is an iPhone app blocker and focus app designed to help people stop procrastinating, protect deep work, and build better focus habits. For this relaunch, I did not want to just “refresh the UI.” I wanted to redesign the full product experience around one question: How can I make starting a focus session feel simple, strict, and useful? The new version focuses on reducing friction. Users can create focus profiles for study, work, sleep, deep work, or Pomodoro sessions, then start blocking distracting apps and websites with less setup. I also redesigned the app around accountability. StrictBlock now includes streaks, trophies, weekly reports, widgets, session journaling, and consequences for ending sessions early. As a developer, this redesign was a good reminder that productivity apps are not only about features. They are about behavior. The UI, the flow, the defaults, and the friction all shape whether someone actually stays focused. StrictBlock is now live with a complete redesign. Would love feedback from other builders, iOS devs, and product engineers. Try it here: Download strictblock on appstore

2026-06-21 原文 →
AI 资讯

Day 9 of building an AI agent that controls a phone. It works perfectly on my phone. But on a friend's phone, template matching failed. Icons rendered differently. The agent couldn't send a message. Now I'm exploring UI hierarchy inspection

Project Log #9: My AI Agent Works on My Phone. But What About Yours? Okeke Chukwudubem Okeke Chukwudubem Okeke Chukwudubem Follow Jun 20 Project Log #9: My AI Agent Works on My Phone. But What About Yours? # ai # webdev # programming # productivity 1 reaction Add Comment 3 min read

2026-06-21 原文 →
开发者

Nothing cancels this year’s CMF phone due to RAM prices

Nothing's next budget phone is the latest victim of RAMageddon. As 9to5Google reports, Nothing co-founder Akis Evangelidis announced in a post on X that a follow-up to the CMF Phone 2 Pro won't be coming this year: We were working on a successor but with memory prices where they are right now, we can't build […]

2026-06-20 原文 →
开发者

T1 Phone PR firm is ‘not assisting Trump Mobile any further’

Where's the Trump phone? We're going to keep talking about it every week. We don't have the phones we preordered yet, but this week we received unexpected news from Trump Mobile's media relations manager. If you've been following my reporting on the Trump phone, you'll know that Trump Mobile doesn't exactly keep open lines of […]

2026-06-19 原文 →
AI 资讯

WWDC 2026 - WidgetKit Foundations: A Practical Guide for Developers

What makes a widget worth building Apple frames good widgets around three qualities, and they're worth keeping in your head as design constraints, not just slogans: Glanceable — someone should understand it in a fraction of a second. Think Weather showing you just enough of today's forecast. Relevant — content should match the moment, the place, and the person's patterns. Calendar surfacing your next event is the canonical example. Personalizable — it should be configurable with the content that matters to that specific user. These three map directly onto the technical decisions you'll make: glanceable drives your view design, relevant drives your timeline strategy, and personalizable drives whether you reach for a configurable (App Intent) widget. The mental model: how a widget actually runs This is the part most newcomers get wrong, so it's worth being precise. Your widgets are delivered to the system from a widget extension , which is a separate process from your app. That separation has a real consequence: your app can't just hand data to the extension in memory. You share data through an app group container — a shared database, or UserDefaults backed by the group. Wire this up early; it's the thing people forget. Whether your app is UIKit or SwiftUI, the widgets themselves are always built in SwiftUI. The data flow is: WidgetKit asks your extension for content. That content is a timeline — a series of timeline entries . Each entry carries the data needed to render your view at a specific point in time. The rendered views are archived, and the system displays each one at its relevant time. The key insight hiding in step 4: your code is not running while the widget is on screen. The system renders archived views. This explains a lot of WidgetKit's API design, including why interactive elements use App Intents rather than closures. Building your first widget When you add a widget extension target, Xcode scaffolds most of what you need. The body returns a WidgetCon

2026-06-19 原文 →
AI 资讯

Kotlin Compiler Plugin Cuts Android Startup Time by 30% in Expo SDK 56

Expo SDK 56 ships with a custom Kotlin compiler plugin that eliminates reflection from Expo Modules on Android. The result: 70% faster module initialization and a 30% reduction in time to first render. The plugin runs during compilation, so app developers get these performance gains automatically without changing any code. Module authors can unlock even bigger wins with a single annotation. This post walks through how we built it and why this approach succeeded where previous attempts failed. For the Swift side where we now talk to JSI directly, check out our companion post Talking to JSI in Swift . The reflection problem we inherited Before Expo Modules, we had Unimodules. They worked like old React Native bridge modules: you'd sprinkle annotations across methods you wanted to expose, and the runtime would discover everything through reflection. class ClipboardModule ( context : Context ) : ExportedModule ( context ) { override fun getName () = "ExpoClipboard" @ExpoMethod fun getStringAsync ( promise : Promise ) { val clip = clipboardManager . primaryClip ?. getItemAt ( 0 ) promise . resolve ( clip ?. text ?. toString () ?: "" ) } @ExpoMethod fun setStringAsync ( content : String , promise : Promise ) { clipboardManager . setPrimaryClip ( ClipData . newPlainText ( null , content )) promise . resolve ( true ) } } Reflection made sense when we needed metadata about our own code. What methods does this module export? What arguments do they accept? The JVM could answer those questions. But reflection costs time, and on Android that time comes straight out of your startup budget. Every module the runtime introspects adds milliseconds before users see your app. Building the Expo Modules API gave us a chance to fix this. We wanted better ergonomics and less reflection. The Kotlin DSL delivered both in one move, removing most reflection while making modules easier to write. But we couldn't eliminate all of it. Type information for function arguments and Record properties s

2026-06-19 原文 →