29,164 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Best practices
1
vote
2
replies
124
views
Android approach to launch an emergency Activity from background without user interaction
I'm working on a WearOS app for Samsung watches that handles VoIP calls. The app needs to manage incoming and outgoing emergency calls (like SOS) directly on the watch. These calls need to work ...
Score of -2
1 answer
178 views
App closes immediately on launch after switching launcher icons (Activity class does not exist)
I added multiple launcher icons using activity-alias to dynamically switch the app icon at runtime. But after going to the main activity, the app crashes immediately. I am not able to understand what ...
- reputation score 370
Score of 0
1 answer
62 views
How to set a background image for the WebView on an android app built with React DOM + Capacitor v7?
package com.app_name.app;
import com.getcapacitor.BridgeActivity;
import android.os.Bundle;
import android.graphics.Color;
// import android.webkit.WebView;
public class ...
- reputation score 1
Score of 0
1 answer
194 views
Does enableEdgeToEdge() override windowOptOutEdgeToEdgeEnforcement flag?
I'm working with Android 15's edge-to-edge enforcement and need clarification on how enableEdgeToEdge() interacts with the windowOptOutEdgeToEdgeEnforcement theme attribute.
Setup
In my theme:
<...
- reputation score 1
Score of -1
1 answer
198 views
Can you include an `alert` with a sound within the `end` event of a Live Activity?
When we do that, the Live Activity is immediately ended without any alert or sound. The dismissal-date is only used for the Lock Screen.
It no longer shows on the Dynamic Island.
Yet it says on Lock ...
- reputation score 37128
Score of 0
0 answers
113 views
Android 16 with appCategory="game" forces activity recreation
I’m running into an issue with the new Android 16 behavior change regarding orientation handling.
My app is a game, and in the manifest I’ve set:
<application
android:appCategory="game&...
- reputation score 38197
Score of 1
1 answer
64 views
Why Android package activities destroy after switching options in coarse/fine location permission?
Either i have open location permission window from my application, either i have go myself in application settings -> Permissions -> Location and playing with the options:
Allow all the time
...
- reputation score 2433
Score of 0
0 answers
79 views
How to make an android app detect on bike activity, calculates total distance in that mode and then stops when on foot is detected?
I am trying to build a simple Android application that uses activity recognition to detect if the user is riding a bike, it then calculates the total distance covered until it detects if the user is ...
- reputation score 155
Score of 0
1 answer
116 views
ActivityRecognitionClient.requestActivityUpdates succeeds, but BroadcastReceiver never receives updates (Android 15)
Problem
I call ActivityRecognitionClient.requestActivityUpdates and get success, but my BroadcastReceiver never gets any intents. No activity logs appear even after moving with the device for 30–60s.
...
- reputation score 11
Score of 0
1 answer
87 views
onCreate is called twice with FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_CLEAR_TASK
I've noticed that there are 2 times when startActivity with intent for the same Activity (FirstActivity) is called in my Android project, and it's called in both places like that:
FirstActivity.intent(...
- reputation score 3761
Score of 0
1 answer
42 views
Creating activity prevents spinner from spinning in Android
I have 2 activities in my app. When another one is called there is a spinner but it doesn't spin. I think it may be because the main thread is stuck.
I moved all background tasks to Dispatchers.IO, ...
- reputation score 1
Score of 0
1 answer
58 views
Bring android activity to the top and keep it in history
I need bring android activity to the top and keep it in history.
Example of the stack of activity history:
A - B - C - D
and then I'd like to start activity B' with the same state of B (so it is just ...
- reputation score 713
Score of 1
0 answers
80 views
Can I leave in onBackPressed() method call in my Android activity for future Android 36+ versions?
Issue:
I've been updating my apps for the Android 36 updates. I've implemented the onBackPressedCallback for my activities. I've tried adding a DrawerListener that will set the DrawerLayout's ...
- reputation score 559
Score of 0
0 answers
43 views
The dialog from DialogFragment appears twice
I have one activity called TourMapActivity and StopChoiceDialogFragment.
This is a map route type app. When the user starts the route, this modal opens. If the user clicks on any of the options, when ...
- reputation score 1
Score of 0
1 answer
88 views
Kotlin - Execute a fundtion in MainActivity from outside MainActivity
I hope this is a simple one. I have an app that currently has a full-screen display of the time. Every second, the time is updated.
I want to have it play a WAV resource depending on the time (say ...
- reputation score 849