Questions tagged [android-activity]

Questions about creating or managing Activities in Android. In Android Applications, an Activity is a Component that provides a user interface allowing the user to do something. Simple examples are: dial the phone, take a photo, send an email, or view a map.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

LiveData Observer not triggered in Main Activity when data is changed in Fragment

The observer in my MainActivity is not being triggered when the string data is being changed Here is my MainActivity: package com.example.translator import androidx.appcompat.app.AppCompatActivity ...
Python coder's user avatar
0 votes
1 answer
22 views

How to display the "Share Wi-Fi" QR Code from android network configuration?

How can I, programmatically (Kotlin or Java), display the QR Code "Share Wi-Fi" from the currently connected network? The closest I could come was to display the network settings: ...
algorix's user avatar
  • 311
0 votes
0 answers
6 views

Is there any specific number of output arrows from one activity in an activity diagram?

I am designing the activity model for a website, and I have a question about whether I have an activity that represents displaying a page on the website. This page contains several buttons, and each ...
Manar Eyad's user avatar
1 vote
1 answer
31 views

(SOLVED)The Application Gives Error When Opened from Recent Applications

There is a SplashActivity in my application, the application is started with this activity. SplashActivity has a duration of 2.5 seconds, when this time is completed, HomeActivity opens. When the back ...
nataliaali's user avatar
0 votes
1 answer
24 views

Need to click back arrow twice to go back to previous activity, how to prevent it

I have one activity A and when I click on one button from activity A and come to an another activity B and when I click on back arrow from activity B to go back to A, its comes to the same activity B, ...
Nayana Petkar's user avatar
1 vote
0 answers
17 views

How to know when are menu items in activity created?

I have an activity with a Toolbar showing an settings menu. When I access the menu items via val icon0 = ResourcesCompat.getDrawable(resources, id0, null) (findViewById<View&...
Chris's user avatar
  • 1,240
0 votes
1 answer
44 views

Cannot get onActivityResult() to be called, no matter what

Im making a simple note taking app in Android Studio, and im passing a Note object via Bundle to my 2nd Activity, and everything works. However, the changes made to that Note object is not reflected ...
case_sensitive's user avatar
0 votes
0 answers
14 views

Animation support for android homescreen widgets

Is there an elegant way to add short animations to android homescreen widgets in modern android (API 30+)? I understand widgets are not meant to handle constant animation, but this animation would be ...
Jonathan Esteban's user avatar
1 vote
1 answer
24 views

Best Practice for Accessing a View in an Activity from a Fragment?

I'm seeking clarification on a fundamental concept. How do you best access a view that's in an activity from a fragment? Currently, I know of two methods: Using the fragment to call the activity's ...
Hugo Oliveira's user avatar
1 vote
1 answer
42 views

Did the permissions to launch another app change in API 33?

I have a bug that only happens on API 33. Did something change? I have two apps: A and B. Let's call them com.example.a and com.example.b. They need to launch each other. As of API 33, when app A ...
Barry Fruitman's user avatar
0 votes
0 answers
28 views

Android: Secure & Efficient Communication Between SDK & Application - Best Practices

Question: I am developing a payment SDK in Android, which will be integrated into various consumer apps, including third-party applications for example Amazon. The SDK's primary function is to ...
Mian Sarim Hameed's user avatar
-1 votes
0 answers
27 views

Recently I did a test on an mp3 application project

Recently I did a test on an mp3 application project, the aim was to display interstitials that had natural breaks. The problem: When I'm on the main page (MainActivity), I press the button to go to (...
vindia-92's user avatar
-1 votes
1 answer
25 views

How to Handle Browser Login Response into Android Studio Application

I am using WebView with xyz URL. submit credentials (username, password) for login the page and go to dashboard. getting Particular response. My question is how to get that response on my android ...
Parveen Haade's user avatar
0 votes
0 answers
26 views

Parental controls: request device activity report from parent device

I'm developing an application with parental controls. I am creating 2 applications: one for the parent, the second for the child. Family access is configured on the parent's device and Screen Time is ...
Andrey Chernyshev's user avatar
0 votes
1 answer
29 views

More activities or 1-2 activities and multiple fragments? Jetpack compose or XML or both? [closed]

I'm building a simple app that's basically text input and multiple-choice input from a recycler view, pulled from an api. Then exporting the form answers to a pdf, uploading that to a database and ...
Daki's user avatar
  • 21
0 votes
0 answers
21 views

Change theme of Android application instantly

I want to change theme of the application from a fragment,I use getActivity().getTheme().applyStyle(R.style.customTheme,true); It works but after some switching between fragments it happens. I want ...
Farzad Moradkhani's user avatar
0 votes
0 answers
17 views

Cause: toDerInputStream rejects tag type 0

I have a problem on android studio. It keeps giving this error and i don't know why. I have a blank view and activity with just the default code and it still shows this on every activity or project i ...
Lord of Legends 107's user avatar
0 votes
0 answers
22 views

How can I send a file from the Files app to my app without starting a new activity?

I'm working on a mapping app and currently setting up the functionality to import both GPX and KML files. I have set up my Manifest to handle the intent to send a file from Files: <intent-filter>...
eatmoretoast's user avatar
3 votes
3 answers
148 views

Android MainActivity's onCreate() Called Twice on Initial Launch After Installing

Problem: I'm encountering an unusual issue where the onCreate() method of my app's launcher activity (MainActivity) is being called twice, but only when I launch the app for the first time after ...
Android Developer's user avatar
-1 votes
0 answers
21 views

What permission does android.intent.action.CREATE_DOCUMENT require?

The following code usually works fine: Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("file/binary"); intent.putExtra(...
Hong's user avatar
  • 17.7k
0 votes
0 answers
16 views

React Native MainActivity.java ReactActivityDelegateWrapper() how to merge two necessary methods

code to modify: @Override protected ReactActivityDelegate createReactActivityDelegate() { return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new ...
superyarik's user avatar
0 votes
1 answer
38 views

How to apply different toolbar(actionbar) layout for each fragment?

I am applying Single Activity Architecture, and I would like to use the top fixing bar using the toolbar. Within my project, the form of the toolbar varies from fragment to fragment, and the form is ...
Haeiny's user avatar
  • 3
0 votes
1 answer
18 views

Change Activity to Fragment

I started a project using Activity however now I need it to be a Fragment because I want to use a Bottom Navigation Bar. How do I go about doing this? I'm new to Android development and I'm stuck. Any ...
fredos86's user avatar
-1 votes
0 answers
17 views

Can't create new empty activity in Android Studio

new empty activity doesn't show up, I have tried invalidating the cache and restarting,Screenshot I don't understand why it does not show up for me. This is my first project so I am new to Android ...
Anderson's user avatar
0 votes
1 answer
51 views

Android, Java: Android resource linking failed -\...\debug\AndroidManifest.xml:15: error: unexpected element <activity> found in <manifest>

In my AndroidManifest.xml I wrote this code: <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"...
Mirek6's user avatar
  • 25
0 votes
1 answer
21 views

How to close session in Fragment from click event that occurs in Activity

I've inherited a video playing app that I need to add analytics to. In my fragment I create the analytics object and this object then listens to and reports events and data. If the user clicks on ...
KoolKeith's user avatar
0 votes
1 answer
18 views

Can't view another activity in kotlin

It moves to the activity but I get an empty page MainActivit.kt This is the block I use to move binding.fab2.setOnClickListener { val intent = Intent(this, InfoActivity::class.java) ...
Mohamed Anwer's user avatar
0 votes
0 answers
16 views

Android Studio: Start activity by clicking widget

I'm trying to launch my app when pressing the widget in the home screen in Android Studio using kotlin. Here's my attempt: class MyWidgetProvider : AppWidgetProvider() { override fun onUpdate( ...
Preem Palver2's user avatar
0 votes
0 answers
28 views

ActivityNotFoundException only on some devices for the same apk

I'm receiving ActivityNotFoundException crash reports on certain devices for an activity within my app. The crash message is: Unable to start activity ComponentInfo{*}: android.content....
mahdi's user avatar
  • 608
0 votes
0 answers
28 views

Unable to instantiate activity ComponentInfo Java.langClassNotFoundExeption

I'm new to Android Studio and I'm having a problem. When launching my code the console gives me this error: FATAL EXCEPTION: main Process: com.Test.testApp, PID: 28325 java.lang.RuntimeException: ...
Adam Respeliers's user avatar
0 votes
0 answers
31 views

Why android studio isn't showing me all activity templates like before, what should I do?

This is what it looks like ! I checked multiple blogs and websites but found nothing.Like in other youtube videos I can see the instructor getting all activities but not in my case. Is there any ...
Ommprakash's user avatar
0 votes
0 answers
27 views

I can't use ResultActivity or similar references on my Kotlin Android App

Just as the title says, I can't use those references, I've tried some recommendations on updating dependencies and adding import but can't. This is what my imports look like: import androidx.appcompat....
Germán Pancardo's user avatar
0 votes
0 answers
33 views

callback communication between a kotlin class and Activity

Communication between two android components like Activity and fragments could be done by viewmodel or interfaces . But How do we communicate between a Kotlin class and an Activity and Vice Versa. My ...
Saneen K P's user avatar
0 votes
0 answers
32 views

Cannot access Activity public class MainActivity extends FlutterActivity

The project is not going into a release build. When I try to generate a signed bundle, I get the following error: path_to_activity/MainActivity.java:5: error: cannot access Activity public class ...
Patrick's user avatar
  • 53
3 votes
2 answers
96 views

Is there a way to stop USB devices from triggering Android activity's pause/resume cycle?

The following is in AndroidManifest.xml for MainActivity: <activity android:name=".MainActivity" android:configChanges="orientation|keyboardHidden|screenSize" ...
Hong's user avatar
  • 17.7k
0 votes
1 answer
48 views

Does an Activity extending another activity have 2 separate contexts for super and child classes(Activities) Android?

I have a template Activity class as open class AbstractActivity : AppCompatActivity(){ onCreate() ... } I will be using this template AbstractActivity for almost every Activity in my project I ...
Pranay Avvaru's user avatar
0 votes
0 answers
24 views

Activity.setTurnScreenOn(true) does not turn the screen on

I need my app turn the screen on in case of an activity switch, even if the user did press the "Power" button before. We are using either no lockscreen, or the simple "swipe" ...
deje's user avatar
  • 81
0 votes
1 answer
21 views

How to get a callback which triggers if the app goes into background or the user locks the screen and then comes back to the app

I need a callback which is fired whenever user either switches the app and comes back, or if they lock the device and then unlock it. I can't use onPause and onResume since it would be fired even if ...
ssindher11's user avatar
0 votes
1 answer
149 views

Start external Activity as a separate task

I have a Flutter app with Single Activity with launchMode as singleTask. I have integrated Google tap&pay SDK into my app which launches(startActivityForResult) a separate Activity on click of a ...
sagar suri's user avatar
  • 4,361
0 votes
1 answer
49 views

Android MenuProvider not working inside Fragment

I need to add a menu depending on the fragment the user is looking at. I tried to use the new MenuProvider in the onViewCreated-Method of my Fragment: override fun onViewCreated(view: View, ...
Julius Babies's user avatar
0 votes
0 answers
15 views

Android BottomNavigationView slide animation on fragment change

I am trying to achieve this BottomNavigationView behavior in Android: (Example is from iOS) My current app layout is: |- ConstraintLayout |- MaterialToolbar (gets hidden for some fragments) |- ...
Baterka's user avatar
  • 3,135
0 votes
1 answer
48 views

PlantUML reference to other activity diagram with new syntax

I want to implement the activity diagram below with new syntax. Here is the old syntax: @startuml partition 1st { (*) --> "A" --> "B" --> "C" --> "D"...
fanronghong's user avatar
-1 votes
1 answer
21 views

Opening main activity after ending second activity

i hope someone can help me with this. I'm opening an activity "B" through a Notification Push using a pending intent. This is working correctly. But I need that when activity B is closed go ...
Luichigo15's user avatar
0 votes
1 answer
59 views

Allow MediaProjection Automatically without having the user interventions

I want to add a screen capture activity in my app but I don't want to show the below dialog for the permissions. Is there any way that I can set permissions automatically for screen capture/screen ...
Sonia Ejaz's user avatar
0 votes
0 answers
47 views

DELPHI Firemonkey FMX Android - Calling another app's activity

I am developing an android app with firemonkey. DELPHI 10.4 There is a development case that needs to be answered by calling an activity in an external app, so I wrote the source by looking at the ...
myrufuye's user avatar
0 votes
1 answer
55 views

How to make a single Android activity in the manifest but use one of two implementations when launched?

My Android app has one main activity today declared in the manifest but the design team wants to build a replacement that is very different in both look and function. We want to perform A-B testing ...
satur9nine's user avatar
0 votes
0 answers
7 views

Time stamps (kyoto adlnormal and Kyoto adlerror dataset)

Please I am working with two datasets , kyoto adlnormal and kyoto adlerror dataset for healthcare activity recognition in dementia care. The kyoto adlnormal dataset has 5 activities simulating normal ...
Chiamaka Jibuaku's user avatar
0 votes
0 answers
8 views

can someone help me with my activity diagram i think it too hard to draw when i draw activity diagram

Customers enter the store The staff greets customers and leads them to the shopping area Customer selects the item to buy. During the selection process, the customer can ask the staff about the ...
Trần Xuân Nam's user avatar
0 votes
1 answer
309 views

android studio kotlin error Caused by: org.jetbrains.kotlin.gradle.tasks.CompilationErrorException: Compilation error. See log for more details

Caused by: org.jetbrains.kotlin.gradle.tasks.CompilationErrorException: Compilation error. See log for more details <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://...
Aslı's user avatar
  • 11
0 votes
1 answer
67 views

Switching between two NativeActivities in Android

I need to have two separate activities in an Android app. As far as I understand this is done with having multiple <activity> tags in the <application> tag. Many things online indicate ...
Charles Lohr's user avatar

1
2 3 4 5
580