125 questions
1
vote
1
answer
134
views
Deep linking back to my Android app without resetting the activity stack (use transparent activity?)
In my Android app, I might open multiple activities—let's say Activities A, B, and C—in sequence. Then, I switch to a third-party app. Later, I want to return to my app via a deep link. My goal is to ...
0
votes
1
answer
38
views
How to Prevent App B from Being Retained in Background When Switching Back to App A in Android?
I have two Android apps, App A and App B, and I am using Intents to switch between them.
Scenario:
App A opens App B using an Intent.
App B completes its task, and now I need the user to switch back ...
2
votes
1
answer
243
views
Android: closing connection when app is killed
I have an app that handles an XMPP connection. Now this connection is closed and resumed correctly when the main (and only) activity goes onStop(). Problem is, in the particular case when the user:
-...
0
votes
1
answer
268
views
Restart a new instance of an activity already in the stack
I have a home activity A, from where I open activity B. In B there are some complex views with states with data fetched from the network. From B with the press of a button I go to activity C.
Now if I ...
1
vote
0
answers
99
views
Why does startActivity() to Activate MDM prompt from a receiver flash the prompt and not open it?
In a small MDM (Device Manager) app, we're trying to achieve the following functionality: Have the "Activate Device Manger" dialog popup as soon as the app is installed. This app must be ...
0
votes
2
answers
349
views
Activity backstack FLAG_ACTIVITY_NEW_TASK
I a bit confused with the documentation for launch modes. Specifically the doc mentions:
Activities in the stack are never rearranged, only pushed and popped
from the stack
But later in the section ...
1
vote
1
answer
1k
views
How to force kill Picture and Picture activity on cross icon click?
i am trying to kill activity from tasks after picture and picture mode was activated and so far I tried finish(), finishAffinity(), onBackPressed(), programmatically set excludeFromRecent but activity ...
4
votes
0
answers
132
views
Android backstack with tasks and activities from different apps
I seem to find conflicting information with regards to the basic/default behavior of the backstack when dealing with tasks whose activities come from different apps. From my understanding so far:
A ...
2
votes
1
answer
657
views
Why Android OS does not create a new instance of an singleTop activity if my app in the background?
My app has two activities: A and B. A - is the main activity (default for launch), it has action android.intent.action.MAIN and category android.intent.category.LAUNCHER, and A activity has overridden ...
1
vote
0
answers
42
views
Is there any way to keep AlarmManager in android even if task dies?
I am making an alarm app using AlarmManager. The problem is, if I kill the app on the task, AlarmManager doesn't work. How do I fix it?
MainAtivity.kt
fun scheduleAlarm(context: Context) {
val ...
2
votes
2
answers
1k
views
Android Notification click keep stack and bring app to front if need. Pass data if specific activity is on top
How can I click a notification, bring my app to the foreground if needed, and keep the stack as it was (even when the app went to the background)?
I have a NotificationClickActivity that is launched ...
0
votes
0
answers
127
views
Keep my Activty open on notification click?
I have a strange scenario in my application where I want to keep my activity open even though if any notification is clicked. The scenario is I have splash activity that opens the Home Activity and ...
0
votes
0
answers
173
views
Android app showing multiple tasks when launched from QRCode scanner
Scenario:
QRCode scan URL scheme
Open the scanned URL scheme
Launch Main activity (root)
Launch Welcome activity (via startActivity, with Intent.FLAG_ACTIVITY_NEW_TASK)
Launch Welcome activity A (via ...
0
votes
0
answers
211
views
How to check what the android service is currently doing once binding to it?
Let's say I have a an Android started service that does some tasks as this example:
-Service starts
-Does task A, does task B, then downloads file 1, downloads file 2, and Finally does task C.
-...
0
votes
1
answer
341
views
How to prevent starting new activity to top of task?
I have a activity A with launchMode=singleTop. And activity B with standart launch mode.
First case: I launching app from installer or Google Play (not from launcher), then
start other activity B ...
0
votes
1
answer
211
views
How to get Task to call pendingIntent
I've been trying to pass a pendingIntent to the Activity Recognition Client as part of a Task, however the pendingIntent doesn't seem to be being called.
I'm using Google's Activity Recognition ...
2
votes
0
answers
715
views
What "Stack" means in 'adb shell dumpsys activity'?
Running adb shell dumpsys activity activities shows the current tasks and its activities. But the tasks are grouped by "Stacks" (eg. Stack #0, Stack #1). What those Stacks means?
The following result ...
1
vote
0
answers
576
views
How to make FLAG_ACTIVITY_NEW_TASK ignore taskAffinity?
I have a problem with two of the buttons in a launcher app I'm developing. The first button should launch TotalCommander's built-in text editor to display a certain text file. The second button should ...
2
votes
1
answer
2k
views
How to fix app go to background after reorder to front and back
I currently managed to allow user switch between two distinct acitivties groups (let's said 4 activity classes A/B group and X/Y group) and switch by FLAG_ACTIVITY_REORDER_TO_FRONT flag, but I noticed ...
1
vote
1
answer
118
views
Hide / Unhide application when connect / disconnect USB BroadcastReceiver
My application only have MainActivity with a ImageView.
BroadcastReceiver works. The Toast Message is displayed When I connect USB.
Now, I need start my application minimized and show the ...
0
votes
1
answer
750
views
How to Launching an other app from an intent with different process?
Actually, I'm trying to launch "App B" From "App A" through Uri intent, but that opens up in the same process of "App A" when I minimize the app it shows only one app in the background that is "App A" ...
1
vote
0
answers
73
views
Back navigation from an Activity which had FLAG_ACTIVITY_NEW_TASK to an Activity which had FLAG_ACTIVITY_NEW_DOCUMENT is not working
I've got a strange issue while working with intent flags. I will try to explain as clear as possible.
I have 3 Activities in my app. Dashboard Activity, Document Activity, and Child Activity. I've ...
2
votes
0
answers
92
views
Intent.FLAG_ACTIVITY_NEW_TASK is doing What we think it should do?
Looks like Every tutorial that we have got out there on the Web mentions that FLAG_ACTIVITY_NEW_TASK Starts a new task if the Activity we are starting is not currently running in the task.But it seems ...
0
votes
2
answers
2k
views
How to access result of void onComplete() of a Task
I'm working with a lib strangely designed this code basically has a Task object withonComplete() and onfail() methods, both these methods are void so I cannot use return inside them.
I have tried to ...
0
votes
0
answers
50
views
Start of activity through AlarmManager PendingIntent after clearing app process
My app will allow user to set desired time on which activity will trigger. I used AlarmManager to open activity. Below is the code for same.`
/* Intent intent = new Intent(this, ...