Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

cordova method to add app to Androids battery "never auto sleep apps"?

On Android, is there any config.xml or androidManifest.xml setting that allows my app to automatically be added to Androids Battery "never auto sleep apps" section? I can't seem to find any ...
rolinger's user avatar
  • 3,048
0 votes
1 answer
74 views

android : Should we call onPause & onResume in onHiddenChanged function?

We are using the fragment without viewpage, just simply press the button to hide fragment A show fragment B or show A hide B, it will trigger the onHiddenChanged() function But we have a argument here,...
JustABeginer's user avatar
2 votes
0 answers
663 views

Flutter webview showing blank screen onResume()

In my flutter application which is a webview there is a button to share details from app to whatsapp and whenever the share icon is clicked the whatsapp screen opens but when user clicks the back ...
Abm's user avatar
  • 311
0 votes
1 answer
285 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
18 views

FloatingActionButton is visible when calling getVisibility in onResume although it should not

I have the following situation. I have a FloatingActionButton which is not visible. When I put the App into background by minimizing it, onStop is called. When I bring it back my onResume method ...
Bernd's user avatar
  • 657
0 votes
1 answer
20 views

Chromebook. How do I know if my onResume is being called from the "emoji popup"?

I have a chat app for chromebook. I am in the chat and I press Search + Shift + Enter -> which brings up the "emoji popup" This calls my apps "onPause" as the dialog is on top ...
rosu alin's user avatar
  • 5,830
0 votes
1 answer
41 views

Problem of being unable to use other apps when calling intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

In the GpsData app, GPS data is received from the server. The GPS data is received by a thread every second, and the InfoService class sends the number of received GPS data to MainActivity. When ...
kyesia's user avatar
  • 25
1 vote
0 answers
95 views

Slow start onResume the application from the navigation button on real device?

While testing my application on a real device, it works fine onStart, but onPause application to open another one, the application doesn't react well on click to resume the application again, in the ...
Mahmoud Nabil's user avatar
0 votes
2 answers
52 views

How to call a method in a Fragment when backstack change

I have 2 fragments FragmentA and FragmentB From FragmentA I open FragmentB val transaction = fragmentManager.beginTransaction() transaction.add(CONTAINER_VIEW_ID, FRAGMENT_B_INSTANCE, FRAGMENT_B_TAG) ...
AndroidDev's user avatar
0 votes
0 answers
155 views

Is there a way to refresh a fragment in the onResume method?

My favourites fragment does not display the data given correctly unless the onCreateView function is called. This means that the fragment needs to be deleted and created again. Is there a way to ...
lunderhill's user avatar
1 vote
2 answers
552 views

Xamarin Android - Is OnResume() method work differently on multiple devices

My question about the OnResume() method which is part of the Activity's lifecycle. I know that after the OnStart() method the OnResume() will be called and also if the application goes in background ...
Pavlos Mavris's user avatar
0 votes
1 answer
384 views

How to refresh fragment from activity in KOTLIN

In my kotlin project, I want to refresh fragments from an Actvity. When I finish Activity, it should refresh the fragment. I was thinking this would be done in onResume. So how to do refresh current ...
chanthini begam's user avatar
0 votes
0 answers
40 views

APIs to handle the app resume in RecyclerView in android

I have a RecyclerView : class MyCustomRecyclerView @JvmOverloads constructor(...) : RecyclerView(...) { override fun onSaveInstanceState(): Parcelable? { Log.i("MY_TAG", "...
Rohit Singla's user avatar
1 vote
2 answers
68 views

MediaPlayer not playing after reopening the app

When i add mediaplayer.start in onResume i was expecting to start the audio when i reopen the the app but it dindt start it public MediaPlayer mediaPlayer; int length = 0; @Override protected ...
user avatar
0 votes
1 answer
944 views

Flutter black screen after phone sleeps or by pressing the power button

I want my app to run even if the screen closes to avoid accidental press and to consume less battery. But whenever I resume the app, it always displays a black screen even though I can still hear the ...
Jang Delos Santos's user avatar
0 votes
2 answers
403 views

what is the Function that takes place upon reopening app

I created an app using Xamarin.Forms. I am trying to detect if there is a change in phone's language each time the app is reopened after being closed using the back button. Tried to Debug.WriteLine on ...
rana hd's user avatar
  • 377
0 votes
1 answer
527 views

getParent() on Fragment View returns null in onResume() after rotation

I have the following code in onResume() in a custom fragment that extends ListFragment, which tries to find its parent: @Override public void onResume() { super.onResume(); System.out.println(...
Decent Dabbler's user avatar
1 vote
1 answer
79 views

Why Is OnCreate Preferred To Do All The Main App Tasks?

Why Is onCreate() Preferred To Do All The Main App Tasks? Why not onResume() or onStart()? Why only onCreate()? I tried to do the main tasks like binding findViewById() setting text to text views and ...
Sambhav Khandelwal's user avatar
6 votes
1 answer
2k views

State resume in Flutter App flash / flicker the screen

I have implemented the dark & light theme in my app according the device settings mode. I put the app in background and when I come back I'm seeing some flashes/flickering on Resume. Here is a ...
nicover 's user avatar
  • 2,623
0 votes
1 answer
175 views

Event called in UIViewController when return from a dialog?

Does an event exist in UIViewController called when you return from a dialog? I'm asking for notification permission doing this: let center = UNUserNotificationCenter.current() center....
NullPointerException's user avatar
1 vote
1 answer
412 views

how to implement UI changes when resuming fragment in kotlin

i'm a beginner developing in kotlin * android studio. i have 2 fragments in my app: a main fragment and a settings fragment. the two share a viewmodel. heres what i'm trying to accomplish: app ...
Jeffrey Brown's user avatar
0 votes
1 answer
129 views

onCreate and onResume were called when app direct user to an activity

I have an activity that lets the user to insert data from a custom dialog and a listview that display the data. After inputting the data in the dialog, the onResume is supposed to update the listview. ...
Nomel's user avatar
  • 123
0 votes
1 answer
88 views

Restoring state in the onResume method causes App crash

I'm trying to save the checked state of selected items of my recyclerView in the onPause() method and restore in onResume() ,but the code in onResume() causes my app to crash. What am I doing wrong? @...
penecay's user avatar
  • 17
0 votes
0 answers
123 views

Managing code in onResume() of Android Activity

The need is something like this : If there is Location Permission Enable, Have to check that GPS is enable or not, If GPS is enable it's fine to continue for further flow - this working fine. But, If ...
Jaimin Modi's user avatar
  • 1,677
0 votes
0 answers
258 views

List refresh every time when came back from previous screen in tab layout view pager listing

To detect which fragment is currently visible in ViewPager. Now we just use onResume and onPause methods instead of getUserVisibleHint() i.e. deprecated. So for this we call Api in on Resume method ...
phil's user avatar
  • 69
0 votes
0 answers
218 views

Fragment onResume() has >300 ms delay after migrating to AndroidX

After migrating one of my apps to AndroidX I can see the visibility settings for views in some of my fragments (androidx.fragment.app.Fragment) take effect. All views are visible by default in the ...
pegnose's user avatar
  • 51
0 votes
1 answer
172 views

How to dynamically adjust View position in onResume (Android / Java)

I am attempting move a Button around in an Android app I'm making (Java). Under certain circumstances in onResume(), I get margin information about the button, then attempt to place the button at the ...
David Jantz's user avatar
0 votes
1 answer
80 views

How to get extra content in a running activity? [duplicate]

I want to send the text entered by the user from current activity (which is LIKE A DIALOG BUT NOT ONE). Activity 1 is in the background and running. I have attempted this as of now: Second Activity ...
javaOutlaw's user avatar
0 votes
2 answers
467 views

Resume video where it is left off in android

I want to resume a video where it is closed the last time. I have tried it but the problem is that when I close the video the last_position is saved correctly. But when I open that video again, the ...
user avatar
0 votes
2 answers
118 views

OnCreate functions get removed when I use an OnResume function for a simple To Do List app with a Database

I am trying to make a simple To Do List function which adds tasks to a recycler view. I add a new task from a different activity and try to bring it to my main activity using OnResume but when I use ...
Alif Meraz Hamid's user avatar
0 votes
1 answer
519 views

Get back to an activity having fragments and resume it

I hope you all are doing well. I am facing difficulty in making an Android App in java. I have an activity A, which has 4 fragments in it(working with bottom nav bar). I go to my 3rd fragment and ...
rehan's user avatar
  • 51
0 votes
1 answer
89 views

saving state of prgoress bar after leaving the activity

I'm trying to make a progress bar where i can increase/reset the value and i did that so far, but i want to be able to somehow save the state of where I left off after I leave the application, I need ...
john's user avatar
  • 106
0 votes
0 answers
102 views

Screen doesnt show before onResume

I am trying to show a waiting screen in my app while it's trying to connect my server. For some reason, the screen shows only in the middle of the while loop and sometimes even after the while loop ...
Tomer's user avatar
  • 11
2 votes
1 answer
756 views

OnResume Page Content not updating

I have an Android Widget button that when pressed inserts a record into an SQLite database. I have an issue when the app is used this situation: The user pauses the app to use the widget on their ...
user avatar
1 vote
0 answers
32 views

Should I stop and recreate the thread or should I use wait() and notify() to deal with a game-loop, in Android?

how should I deal with the game loop when the user switches from my Android game to something else and then back? Stopping and recreating the thread Pausing/continuing the thread using wait() and ...
Alex Parvan's user avatar
1 vote
0 answers
260 views

RN 0.63 How to resume music played in background by other app, after my app finishes playing own file

One of the functionality of my_app (React Native 0.63) is to "read some content" when on given screen. On focus there is a 'someTextToSpeech.mp3' file launched. Expect behaviour is: when ...
hardronow's user avatar
0 votes
0 answers
131 views

OnResume app becomes blank in Kotlin but works fine in Android Java

I am migrating my app from Java to Kotlin. I have generated app with default Navigation drawer and renamed the Fragments associated with navigation drawer items. These Fragments (Home, Settings, ...
B L Λ C K's user avatar
1 vote
1 answer
359 views

Data Lost onresume after returning back from different activities

I am a newbie on android programming and I think I came across a very basic problem. Actually searching stackoverflow for two days but I am not able to find a solution for my situation. So in summary ...
Alienshow's user avatar
0 votes
2 answers
26 views

Restarting Activity doesnt kill old activity entirely?

Every time my app enters pAUSE stage and enters onresumestage, i am killing my current activity and start new Acitivy. And at the same time in onresume stage, i try to make some button visible. Some ...
tomtom's user avatar
  • 614
0 votes
1 answer
702 views

call method in container flutter

I have class called A.dart in that I am usnign Interprogressbar as below new Container( margin: const EdgeInsets.fromLTRB(0, 10, 0, 0), child: IntervalProgressBar( ...
Gururaj's user avatar
  • 47
1 vote
0 answers
95 views

Flutter how to get onResum for ios

How to catch app open new page and come back from google i got a lot of answer and nothing solved my issue some of them are SchedulerBinding.instance.addPostFrameCallback((_) => { print(&...
Midhilaj's user avatar
  • 4,987
6 votes
3 answers
2k views

When activity will be visible? After onStart() or onResume()?

Docs say: The visible lifetime of an activity happens between a call to onStart() until a corresponding call to onStop(). Also in this one you can see: The onStart() call makes the activity visible ...
hasanghaforian's user avatar
0 votes
1 answer
2k views

Android Studio refresh the activity and display the current fragment

I am just starting with android studio, so excuse me for any mistakes. I am trying to switch the language of the app by using spinner menu. I have come over some methods to do this, but I was trying ...
user13557780's user avatar
1 vote
1 answer
2k views

How to stop flickering of RecyclerView in Adapter after onResume() and onPause()?

I have a chat application that uses RecyclerView to store the chats. The chat contains images and texts. It uses Firebase Database to store and retrieve data. Also, I have stored the user's current ...
ssimssimm's user avatar
0 votes
1 answer
69 views

How can I refresh the fragment which opened an activity, then i closed the activity back to fragment

I want to refresh/reload the fragment right after getting back from the activity that changed its values. I opened an activity from my fragment In that activity I updated some SQL that shows in the ...
sunled's user avatar
  • 23
1 vote
1 answer
28k views

Flutter Widgets Binding Observer

In Flutter,I want to go back to the page I left the app from. But when I try to back, it always navigates to LoginPage. For example,I have 3 page.LoginPage,WorkoutPage,ProgressPage.Login page is my ...
theritalin's user avatar
5 votes
2 answers
4k views

What is the Difference between onResume() and onPostResume() in Activity Life Cycle?

While Learning Activity LifeCycle in Android, I am confused about these two methods. I tried to implement both of them separately and are working fine. So, What's the difference between these two ...
Shoaib Kakal's user avatar
  • 1,306
0 votes
2 answers
1k views

ViewPager - First fragment's onResume interfering with second fragment

I have an Activity "A" with a ViewPager (with TabLayout) inside. The viewPager includes 2 fragments "X" and "Y", since ViewPager handles the lifecycle of the fragments. When the activity is on resume, ...
Angus's user avatar
  • 12.6k
1 vote
2 answers
3k views

How to use savedInstanceState in onResume in Kotlin?

I have a query in Kotlin in which a CountDownTimer is running and and the activity goes to a pause state. When it goes to the pause state I'm storing the remaining time of the CountDownTimer in ...
Vysakh K's user avatar
0 votes
0 answers
321 views

Resume CountUp timer onClick of a button in onResume() method

I have 10 buttons on my fragment. I have a Count Up Timer "0:00:00" which counts up on first button click. The count up timer works fine, It Pauses in the OnPause() and Resumes in the onResume() ...
amit jain's user avatar

1
2 3 4 5
15