29,052
questions
0
votes
1
answer
21
views
Send Data Fom Fragment to Activity Kotlin
I am building a calculator application in which buttons section is inside fragment (fragment belongs to main_activity only) and result textview is in main_activity.
Now can anyone tell a simple ...
1
vote
0
answers
20
views
Issues with launching the MyFiles App in a specified folder
i am trying to open the mobile app called "My Files" in a specified folder but can't seem to get it to work, it may be because i am using the wrong myfiles activity but i haven't found a ...
0
votes
0
answers
10
views
Screen rotation with configChanges causes Fragment ViewBinding to NPE
I have encountered a puzzling problem. When I create a Fragment in an Android View and create a ViewBinding inside the Fragment, and then declare android:configChanges="orientation|screenSize|...
-1
votes
2
answers
42
views
Android Activity gets destroyed when reopening the app from the launcher
I'm encountering a problem with my Android app where an activity (ActivityB) is destroyed when the app is minimized and then reopened from the launcher. However, if I open the app from the recent apps ...
1
vote
1
answer
23
views
How to open only an overlay Activity on sharing, bypassing the MainActivity, like Google Keep? [closed]
I'm trying to implement functionality similar to Google Keep's sharing behavior. When sharing content (like text) from another app and selecting Google Keep from the share menu, the app doesn't open ...
0
votes
1
answer
28
views
(Android) Calling activity from service using startActivity(intent) gets called for the first time, but fails to run second time
I have an activity which i call from service, I am using startActivity(intent) to achieve it, it works fine when i am triggering it for the first time, the activity gets launched properly. But if I ...
0
votes
0
answers
21
views
Inflate activity's layout asynchronously while other activity is running
I work on an app that consists of two activities, call them A and B.
A is a main activity that appears after launch.
B is an activity with a very heavy layout that needs to be inflated.
If I ...
0
votes
1
answer
15
views
Can we honoured Intent flag value over Manifest in launch mode when intent flag and manifest launch mode is different?
Android Documentation mentioned for Same Intent Flag and Manifest Launch Mode but what when they are different?
So, if Activity A starts Activity B, Activity B can define in its manifest how it ...
0
votes
0
answers
41
views
How to bring variables from one activity to another: Returning to MainActivity using activityResultLauncher
I'm really new to android dev, and am self-taught (I know, sorry...) I'm working in Java, and am trying to write an app to record scores etc for netball games.
My roadblock at the moment is that i ...
1
vote
0
answers
36
views
Why when killing an app quickly, onStop and onPause are not called?
I want to schedule with WorkManager, and when I put the app into background, it will be scheduled, but if I kill the app too quickly, onStop and onPause will not be called, so it will not be possible ...
-1
votes
0
answers
27
views
Is it safe to call a static activity method from inside an inner AsyncTask class?
I have Activity class written in java (very old project I must now modify) which has a static method:
//static method inside PositionActivity
public static String getHUEqCat(String category){ ... //...
0
votes
0
answers
5
views
Long click is consumed in the activity started for task, not on launcher activity
In Homescreen task view is used to show Navigation activity in the widget. When Homescreen is visible, the Navigation activity is started and becomes the top activity. Here the navigation activity is ...
-1
votes
2
answers
38
views
How to perform a long-running task when app starts?
When the configuration changes (for example, the user's number format has changed), all data in the database must be updated.
For this, I added a function to onCreate() that converts all data when the ...
0
votes
0
answers
44
views
Reading CSV File in Android using ActivityResultLauncher [duplicate]
I am developing an Android app and trying to understand how to read the selected file's contents using ActivityResaultLauncher. I intend to choose a CSV file stored somewhere on the device like ...
0
votes
0
answers
36
views
Prevent the app from closing when the back button is pressed
After scanning barcode When I press the back button, my app closes. I am using Flutter and Kotlin code for barcode scanning. It should go to the home page, which is TestScreen, but it doesn't.
Here is ...
0
votes
0
answers
49
views
"Error: 'package identifier or launch activity not found' after setting LEANBACK_LAUNCHER for Android TV"
I'm currently developing an Android TV app using Flutter, and I want to support only Android TV, excluding mobile and tablet devices. To achieve this, I modified the AndroidManifest.xml file by ...
0
votes
1
answer
44
views
kotlin android studio scrollbar issues
I am working on a project in Android Studio where I have a form on which I need to place a scroll function (scrollbar) however, when I apply it and execute the scroll it does not happen, no matter how ...
0
votes
1
answer
25
views
`android:windowSoftInputMode="adjustResize"` not working with `ConstraintLayout`
I'm creating an Android application in Java using Android Studio, and I use a ConstraintLayout for the positioning of the views in my layout. The problem is that when I open the keyboard, it hide the ...
0
votes
0
answers
48
views
Null extracted folder for artifact: ResolvedArtifact(componentIdentifier=androidx.activity:activity:1.8.0
I build Native SDK for android. To build SDK for react native (for the same product), I used bridging method.
I added native SDKs of Android and iOS in the React native and build an SDK for the react ...
0
votes
0
answers
27
views
Why does windowIsTranslucent fix the orientation of the child activity?
I am currently doing screen orientation tests for Activities. I found something interesting and would like to ask.
I have a MainActivity and a SubActivity, and the device's orientation is set to Auto-...
0
votes
0
answers
42
views
Flutter App: Unable to instantiate activity ComponentInfo java.lang.ClassNotFoundException: Didn't find class on DexPathList
A while ago, I updated android studio and since then, my android emulators have not been letting me test the app. I have not attempted to test the app on a physical android device, since I do not have ...
0
votes
0
answers
12
views
How does Reddit display 'x people here' on a certain post?
This is what I mean. I am interested in how do they display this, and does this mean on desktop only or does it count mobile users as well. Interested to know.
I haven't tried anything yet. I'm just ...
0
votes
0
answers
16
views
How to lauch an android app from specific Fragment (activity)
I am doing automation testing of app using appium. And i need to launch app on specific page (activity)
but in my project there is only one RootActivity.
When I use this code on it works well but only ...
0
votes
0
answers
32
views
Add a new android activity to flutter app
I have build this flutter app which relies on using an alarm to function properly, everything works fine and the alarm triggers as expected, the only problem am facing now is the app has became fully ...
0
votes
1
answer
34
views
Request Camera Permission in a fragment and context error?
So, I have an activity with a bottomNavBar with 3 pages. Each of these pages is a fragment.
In my app i need camera permission so i wrote some code to request this permission an check if the ...
1
vote
2
answers
61
views
How to start MainActivity after SplashScreen?
I want to run my app on devices below android 12. The app will have a splash screen, the app can't use splash screen api becuase it does not work sufficiently in devices below android 12. How to ...
0
votes
1
answer
31
views
How to Pass ArrayList of Custom Objects Between Activities in Kotlin on Android Studio
I'm working on an Android project in Kotlin where I store user information in a custom object. I need to pass an ArrayList<CustomObject> from one activity to another and display the stored ...
0
votes
1
answer
35
views
canceling notification after clicking on notification builder action button
Starting from android 12 , starting activity from BroadcastReceiver and services is not possible anymore, according to the documentation this is called Notification trampoline restrictions and now we ...
0
votes
0
answers
25
views
Show an activity while the phone is lock in Android app
I am trying to show an activity when the app receives an specific message from a bluetooth device even if the phone is locked. I have already have the activity and the connection part and also it ...
0
votes
0
answers
9
views
android Manifest merger failed build
please help with manifest merger
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/...
0
votes
1
answer
30
views
Android: Two launcher icon for two different Acitvities
What is correct method to create two launcher icons for towo activities? I tried it like this:
<activity
android:name=".SettingsActivity"
android:exported="true&...
0
votes
0
answers
44
views
I want to build androidx's appcompat and integrate in AOSP build
I want to build androidx's Appcompat(done some changes) and integrate in AOSP.
When I use the below command, it generates debug and release aar.
android_xsource_code/androidx/frameworks/support$ ./...
0
votes
0
answers
13
views
How to avoid TransactionTooLargeException in Android? [duplicate]
When the activity is created, it requests the list of installed applications using the following code-
public static List<PackageInfo> getAppsFromPackageManager(Context context) {
...
0
votes
1
answer
25
views
How do I change the behavior and icon of a Floating Action Button between fragments?
I created a Basic Views Activity in Android Studio and I cannot figure for the life of me how to change the "setOnClickListener" and icon of the FAB between fragments. I'm using the FAB to ...
1
vote
1
answer
41
views
How to manage Activity stack behavior in Android based on dynamic IDs?
I have one ActivityA that contains a specific ID in the intent data, one ActivityB that is open from this ActivityA, and ActivityB can also open the same ActivityA with the same ID or a different one. ...
0
votes
0
answers
23
views
Best Practice of using Navigation Component. Activities only or only Fragments or Both of them together?
I am working with Navigation in android and multiple questions came up:
If an android application only consist of activities, is it good practice to make NavGraph for activities?
Or NavGraph should ...
0
votes
0
answers
37
views
Android Settings panel not opening from my app
I'm trying to open the settings panel from my app but it is not doing anything, the device has Android 14 it's a Samsung A24.
I have another device which is the same model, where the code works. But I'...
0
votes
1
answer
27
views
When opening AndroidManifest.xml there were several errors and I didn't find a solution for them
I had gradle errors and fixed them, but when I run the application, it opens and closes immediately and the phone sends me a message Something went wrong with mk mk closed because this app has a bug.
...
1
vote
0
answers
40
views
First activity is destroyed and recreated when the user is moved from First Activity to Second and back to First on Samaung A34
For one of the user who's using Samsung Galaxy A34 with Android 14 and RAM is 8 GB.
I have implemented dropdown selection in a different activity where the user clicks on dropdown for selection from ...
0
votes
2
answers
52
views
How can i open a activity from a foreground service (Find phone smartwatch function)
I'm working on a find phone feature on my company's BLE smartwatch.
The user accesses the option on a smartwatch and it sends a Bluetooth event informing that the user accessed the "find phone&...
0
votes
1
answer
60
views
start view activity from recycler view adapter in Android Studio
The activity I try to call out of a recycler view adapter doesn't start. Instead it either ends the app or just goes back to main.
I am trying to switch from one item in the BookRecyclerViewAdapter to ...
0
votes
1
answer
28
views
FLAG_ACTIVITY_REORDER_TO_FRONT does not work
I have an activity called ChatActivity but it has strange life cycle. When it is first created, the first instance (ChatActivity1) is created and the methods being call is as the below:
...
2
votes
1
answer
120
views
Start Intent from ViewModel
I would like to start a Foreground Service and call a LauncherForActivityResult.
As far as I know, i neither can start a Service from a ViewModel, nor call a LauncherForActivityResult.
I am working on ...
1
vote
1
answer
215
views
AppWidget configuration activity doesn't start in Android 14: missing opt in by PI sender
My app implements a configuration activity for its widget exactly as described here.
Starting with Android 14, the activity can't be launched automatically in background, as stated here, but I have no ...
0
votes
0
answers
20
views
Acitivity is recreated after navigating to forceground
I am creating an Android application, that bounds to a Service.
bindService(intent,
this,
ComponentActivity.BIND_AUTO_CREATE or
ComponentActivity.BIND_IMPORTANT or
...
0
votes
1
answer
59
views
Camera stops after one minute application suspend
I am using CameraX in my app. When I put application to background after one minute I got following logs and then when I resume the application the camera shows no preview (black screen).
Probably I ...
1
vote
0
answers
63
views
How to call Java code Activity from Kotlin compose Activity
How to call Java code Activity from Kotlin compose Activity.
There are a lot of post to the other way(Call Kotlin from Java) but seems it does not apply to my case because it gives (this@MainActivity ...
-1
votes
1
answer
150
views
open react native app on receive push notification without click on notification
I want to open react native app when the device gets a push notification.
I have used this code to open the app It works fine only on Android version less then 10. but it does not work on Android ...
0
votes
1
answer
37
views
How to prevent showing MainActivity when navigating back, but keep app state when reopening?
I'm developing an Android app with three activities: MainActivity, LoginActivity, and WebViewActivity. The MainActivity is the launcher activity and determines if the user is logged in or not. Based ...
0
votes
0
answers
33
views
Activity Refresh Issue on android 11 scanning device
I am using a scanning device (SEUIC cruise2 scanner) to get value of the barcode in my android application. In one of the activity after scanning values activity getting refreshed and it only happens ...