Questions
Browse questions with relevant Mobile Development tags
2,304 questions
Has recommended answerTesting library for 16kb page size
Another Google documentation mentions a script named check_elf_alignment.sh which checks all libraries contained in a APK file. However this script only runs on Linux and MacOS. However the ...
Apk sign with both v1 and v2 schema
The APK signature v2 was introduced with Android 7 (API 24). Your project defines minSdk 25 (Andorid 7.1) thus it will never run on platforms that doesn't support APK signature v2. Therefore APK ...
iOS custom Operation for Operation Queue gives warning Class must restate inherited '@unchecked Sendable' conformance
You can do what it suggests, namely add @unchecked Sendable conformance. But when you do that, you are entering a contract ensures that you will implement thread-safe access to any mutable state. In ...
How to wait until async function finish the job and then call it again from non async method?
There are a variety of approaches: Await prior task: @MainActor class CloudAssistant: ObservableObject { static let shared = CloudAssistant() private var previousTask: Task<Void, Error>...
AAC from HLS TS causes clicks when decoded to PCM per segment
But when decoding each TS independently, the result is discontinuous and causes audible artifacts. This is your problem right here: the AAC TS segments are NOT independent. To decode segment N you ...
Getting a list of other apps that can send notifications in Kotlin
return onGetOp()(appOpsManager, "android:post_notification", android.os.Process.myUid(), packageName, ) According to the documentation, your ...
Anonymous account is overwritten by email and password account
From the Firebase documentation on Authentication triggers for account creation: Firebase accounts will trigger user creation events for Cloud Functions when: A user creates an email account and ...
Can Android OS kill the Main Activity?
I have read that Android OS can kill any activity which is not currently displayed on the screen. This is a common misconception, stemming from some poorly written documentation, back in the day. ...
Frida: How to send byte[] array from JavaScript to Python
Frida provides out of the box only methods for sending native byte arrays, thus raw data stored in ArrayBuffer or data at a certain NativePointer. Sending Java byte arrays in an efficient way requires ...
Android: How to hide or make transparent the thin navigation bar line when Gesture Navigation is turned on?
WindowCompat .getInsetsController(window, window.decorView) .hide(WindowInsetsCompat.Type.navigationBars()) This will hide just the navigation bar(s), which should include the gesture ...
sending consumption request for free trial not working
202 - Accepted is the success response from the send consumption information endpoint If you received a 202 then your transaction was accepted for processing by Apple. If Apple is sending further ...
TabView and key press in SwiftUI on iPad
onKeyPress can only handle key presses when the view it is applied to has focus. Initially, the tab view does not have focus. When you press the arrow keys for the first time, you are actually setting ...
MAUI: Android: Foreground service is not running
startForegound in the service should be called in onStartCommand not onCreate. Not sue if this is your entire problem, but its not valid to call startForeground before actually being started.
Can't import MPAndroidChart libraries into Activity declaring in TOML and build.gradle (app)
settings.gradle and settings.gradle.kts have the same role but have different syntax. settings.gradle is in Groovy, while settings.gradle.kts is in Kotlin. Groovy supports a wide range of string ...
Severe and Minor Location Fluctuations Using FusedLocationProviderClient in 24/7 Java Android Device (Mining Environment)
You wont be able to stop the fluctuations as there are a number of different factors that can cause disruptions. Being in as you say a low network area means its probably going to be relying ...
Why is `ObjectIdentifier` of 2 different `__SwiftValue` the same in Swift?
The documentation says: This unique identifier is only valid for comparisons during the lifetime of the instance. In the expression: ObjectIdentifier(f1 as AnyObject) == ObjectIdentifier(f2 as ...
How to detect which app shared a file to my mobile app? (Android / iOS)
There is no way to do this on Android. It's not part of the data passed in when an intent is launched (and all sharing does is launch an intent).
DatePicker not opening in iOS 18
You should disable hit-testing on the Text, before you add the overlay. Text(viewModel.displayDate).font(.body).foregroundStyle(Color.blue) .allowsHitTesting(false) // <----- .overlay { ...
iOS: Camera screen is black on OS version 18.3 and above not able to capture the image
The issue is that your AVCaptureDevice default method is probably returning nil for some devices. Note that not every iPhone has a built-in wide-angle camera. If you want to make sure it will not ...
Why SwiftUI redraws the body of my custom View since nothing related to it changes?
In general, you can conform the view to Equatable to prevent unwanted body calls. If you only want body to be called when date changes, so you can write extension DemoMonthView: Equatable { static ...
Getting null values in Retrofit API response despite correct data class and endpoint
I don't know if you are using any serializable, but in case you are not maybe that's the problem. Follow these steps : plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' ...
Drawing multiple gradients and inner shadow in SwiftUI
Here is a slight modification of Benzy Neez's SteelRing. Instead of using an inner shadow, the shadow can be built into SteelRing directly using a drop shadow when stroking the border of the circle. ...
Android ContentProvider returns null cursor when accessed from second app but works within provider app
To connect to a non-system ContentProvider, such as one provided by another app of yours, it appears that you need to add a <queries> element to the client app's manifest, identifying the app ...
URLSession GET request returns 403 in iOS app, but works in Postman with the same token
By using Instruments.app, I found that the response status code to the request is actually 307 - a redirect. URLSession follows the redirect by sending a new request, without the authorisation header, ...
Error: #if available(iOS 13, *) Expected ',' separator in Swift
#if available doesn't make sense. Availability checks are at runtime, to conditionally run code. On the other hand, #if is a compile time check, to conditionally compile code. import declarations are ...
Android - How to accurately store the date & time(server time not system) when posting data to firestore
The Firestore Timestamp is always set on the Firebase servers and is independent of any time set on the user's device. So there is no connection between them. If you want to be sure, you can set a ...
How to search document by partial text of map/array value in Firebase?
The current document in the first screenshot only contains substrings from the start of each word, so that's all you can search on. You'll need to populate the array with an exhaustive list of items ...
Flutter, How to hide keyboard when screen recording using screen_protector package
Using a random package found on the internet that hasn't been updated in 2+ years (like this package) is rarely a good idea. If something isn't a commonly used, well known, and frequently maintained ...
Executing a side-effect without an appropriate handler: What's are possible consequences?
SideEffect is used in composable like Slider or TextField to update value only if a recomposition is successful. And also useful for logging recompositions, especially before before layout inspector ...
Different dimension files based on xdpi
How can I create a dimens.xml file in a folder structure so the correct file is read on both devices? Sorry, but that is not an option. You cannot have separate resource sets based on X and Y axis ...
How do you properly use CoreAudio Render Callbacks in Swift
You told the remote IO audio unit that you were going to give it integer data: streamFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked But then you gave it float data, ...
How to apply Content ViewController background to bottom SafeArea in UINavigationController?
You should have the SomeSheetContent ignore safe areas at the use site. For example: .sheet(isPresented: $isPresented) SomeSheetContent() .ignoresSafeArea() }
How to convert async function/method to publisher in Swift 6
In terms of general description of the error, see the Swift user documentation. The general idea to avoid this sort of error is to make sure the Task is isolated to the same actor that this function ...
Jetpack Compose Testing: Check that Software Keyboard appears/disappears
There is no built in API to check if the soft keyboard is shown. There are various hacks people try, which may or may not work depending on the keyboard used, the device used, and the version of ...
kotlin.test.BeforeTest is not resolved
Looking at Kotlin Multiplatform Gradle unit test not resolving kotlin.test reference I found that we should add this library: implementation("org.jetbrains.kotlin:kotlin-test-junit")
kotlin sharedPreferences
The package android.preference is deprecated in favor of androidx.preference which you can get by including this package in your gradle file implementation "androidx.preference:preference-ktx:1....
When I use navigation-compose to navigate to the second page, the first page disappears directly
The default exitTransition is fadeOut. If you want it to instead stay completely stationary as the second page runs your enterTransition, you need to explicitly set it to KeepUntilTransitionsFinished: ...
Divider() Function Crossed Out using Android Studio
The divider() for some reason has a strike through on my compiler. That means the function is marked with the @Deprecated annotation. The documentation for Divider() points out that it is deprecated, ...
Flutter - iOS API Misuse <CBCentralManager: 0x30032d2c0>
It is a warning that won't necessarily affect the operation of your app. Exactly as the message says, the CBCentralManagerDelegate in flutter_blue_plus implements the willRestoreState method, but the ...
SwiftUI ColorScheme changes when app is backgrounded
This is correct and is by design. When your app moves to the background, iOS needs to save a screen image for use in the app switcher. Since the device may switch between light/dark mode while your ...
Android GrantPermissionsViewModel reports Package (mypackage) not found
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> These are the permissions ...
Is there a way to read the ble-physical-connection mode in the iOS API?
There is no information available to apps on iOS regarding the Phy that has been negotiated with the peripheral.
Animate a height and width change separately in a SwiftUI view
You should use the animation modifier that take a body closure. This is how you separate animations into different "domains". Rather than animating a value change, it only animates the ...
Custom SwiftUI container view using UIViewRepresentable - How to do it correctly?
It's not that ContainerViewB "blocks bindings". @Bindings do work here. The @States are indeed being updated. This can be shown using the following code: VStack { ContainerViewB { ...
Is there a way in Flutter to detect which part of a Widget was pressed?
The idiomatic way to do this in Flutter is to break down the top-level widget into subwidgets, in your case one for each element in the screenshot. Then you can handle the onTap for each of these ...
App Store Version Check Behave Differently on Different Devices
If we look at the notes for libraries that offer such capabilities, they note this delay that you discuss. For example, Siren offers Words of Caution: Occasionally, the iTunes JSON will update faster ...
How to render images @2x and @3x from a URL in a SwiftUI Image
You should create the UIImage using init(data:scale:). This initialiser allows you to specify the scale and it will be scaled accordingly when it is displayed. Alternatively, create a CGDataProvider ...
How to Bind to property within @Observable from within @Observable using SwiftUI?
@Observables track changes using the getters/setters of its properties (the @Observable macro inserts some code into the getters/setters to do this tracking). As long as a getter/setter is called ...
Can android app crash lead to memory leak?
When your app crashes, the process is terminated. That means all resources allocated to the process are returned to the OS. So no, it can't cause a memory leak, unless there's an OS level bug in the ...
SwiftUI: matchedGeometryEffect and clipShape Animation Bug
You should not clip content. You can add an in: parameter to specify what shape the background should be in: .background(Color.gray.opacity(0.2), in: .rect(cornerRadius: 20)) // remove clipShape! If ...
Simply submit a proposal, get it approved, and publish it.
See how the process works