Questions tagged [onstart]

onStart refers to one of the lifecycle methods for several components on the Android platform.

117 questions
2
votes
1 answer

When has the layout finished loading

For my app I need to get the height and width of an image. However, the image has no params when I try to get them in the onCreate/ onStart/ onResume method. At which point can I get the values of the image/ has the image been loaded? Thanks in…
L. Fath
  • 65
  • 1
  • 5
2
votes
0 answers

Cannot read property ‘nextOnTargetClick’ error after Hopscotch tour ends/is closed

I am using LinkedIn's Hopscotch framework for a tutorial, and implemented this onStart of the tour to move between tour steps using the left and right arrow keys: Keyboard support to navigate between steps The function works fine, but when the tour…
valangar
  • 151
  • 1
  • 7
2
votes
1 answer

Working with onPause, onRestart, in Tab Widget - Android

I have a ListView that is inside a TabWidget. When I select an item on the ListView and go to the child ListView, the TabWidget disappears. This is fine, except that it invokes the onPause method, and thus causes onRestart to be called when I return…
Chris
  • 5,485
  • 15
  • 68
  • 130
2
votes
0 answers

Dialog doesn't work on onStart or onCreate but works great after minimizing and opening back

I Implement a dialog which asks user to enter the PIN for security, The dialog displays when app runs but keyboards showing qwerty keyboard but in xml I has set inputType="numberpassword" and pressing any keys in quetry doesnot takes any input in…
apple appala
  • 474
  • 6
  • 14
2
votes
0 answers

What is the performance impact of onCreate() and onStart() on activity startup

Whenever a new Activity is created onCreate is called. Followed by onStart. And onStart is called again when activity is back on to the screen. I know this fundamentals. But, what is the actual difference between when you launch the activity. I…
kirtan403
  • 7,293
  • 6
  • 54
  • 97
2
votes
3 answers

How to display an image on start of a wpf app?

I have a wpf application in mvvm pattern. In main view, I have few links to other views. But before displaying the contents(that is ... the links) in main view, I need to display an image in main view ....that means...a welcome image will be…
Relativity
  • 6,690
  • 22
  • 78
  • 128
2
votes
2 answers

Retrieve an activity after Time out warning notification

I'm trying to implement time out notification. Here is what I want to do. If app goes to the background mood, after 5 minutes it should warn the user that app will be signed out. After this notification, if user opens the app, it should ask for the…
Hamid
  • 2,852
  • 1
  • 28
  • 45
2
votes
1 answer

Adding listener to onStart vs onCreate

I'm trying to implement a button listener, and am able to if I do so in the onStart method. When I instead initialize in the onCreate (which I read is good practice), I'm receiving the error "Failed to update a TargetChangeListener"and the app…
Tom McFarlin
  • 829
  • 1
  • 9
  • 24
2
votes
2 answers

Is onStart called when the screen is already visible or becoming visible?

I looked on another thread on stack overflow (src: Difference between onCreate() and onStart()?) That thread described the onStart() method as "Called when the activity is becoming visible to the user". However in that same answer and in many…
committedandroider
  • 8,711
  • 14
  • 71
  • 126
2
votes
3 answers

getIntent() method is undefined inside of onStartCommand() method of android service

Does anyone know why my getIntent() method is undefined for the android service and inside of the onStartCommand() method? @Override public int onStartCommand(Intent intent, int flags, int startId){ super.onStartCommand(intent, startId,…
Kevik
  • 9,181
  • 19
  • 92
  • 148
1
vote
1 answer

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 a lot more. They all work fine. When why do we…
Sambhav Khandelwal
  • 3,585
  • 2
  • 7
  • 38
1
vote
1 answer

Android lifecycle inversion

I encountered somewhat confusing situation, so I wanted to ask a principle behind it. scenario : I have two activities A and B. A is a launcher activity and A starts B activity. I wanted to finish B activity and start B again. the situation I called…
1
vote
1 answer

Why firebaseuser.getdisplay name is returning something even it doesn't contain a name?

Here is my onStart method I want to open an activity when user has updated his profile name @Override protected void onStart() { super.onStart(); FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser(); if (firebaseUser…
1
vote
3 answers

Activity onStart() operation results in a blank screen

I am trying to automatically start a simple timer when the activity shows up. Currently, the activity will not load visibly until my operation is done. Should I override another method? @Override protected void onStart() { super.onStart(); …
1
vote
0 answers

If Lengthy operations are performed in onCreate and onStartCommand, can this lead to ANR? Also when exactly START_STICKY useful.?

For android service, onCreate() and onStartCommand() both run in main thread? OR onCreate runs in main thread and onStartCommand() runs in background thread spawned by the system itself? Also putting lengthy tasks in onCreate() or onStartCommand()…
shrishti
  • 95
  • 5