onStart refers to one of the lifecycle methods for several components on the Android platform.
Questions tagged [onstart]
117 questions
0
votes
2 answers
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 each of onStart, onSleep and onResume to see…

rana hd
- 355
- 3
- 18
0
votes
2 answers
Android Activities Question
Where do i declare a custom button in my main activity class? Can it be on the onStart Method or will it only work in the onCreate Method?
Any Help would be appreciated?
Also to further illustrate what i am talking about: Here is my activity…

YoKaGe
- 385
- 2
- 7
- 15
0
votes
0 answers
how to add functions to onStart () | Kotlin
I have a problem because I am trying to add an onReceiptsAdd () function to onStart () but I don't know how to make it work. how to add onReceiptsAdd () to onStart ()
here is my code:
class ScanFragment : Fragment(), OnReceiptsItemAdd {
private…

MaksChojniak1
- 35
- 1
- 6
0
votes
0 answers
Xamarin Forms - Detect when app is closed / reopened
Please could you explain how I can detect when an app is closed? I don't want to use only OnSleep as this is only background running, so it there a method for identifying when an app is exited in contract to the OnStart method?
Does OnDisappearing…

Avatar
- 37
- 7
0
votes
2 answers
onCreate() method is not calling method A but onStart() calls method A
I have an onCreate() method that looks something like this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity);
if (blah) {
blahblah;
…

compSciStudent
- 23
- 5
0
votes
2 answers
Why my onStop() and onStart() methods work not correctly together in my stopwatch Android app?
A stopwatch is started by click on a Start button.
I make the Activity invisible, by pushing the home button on a device.
But stopwatch timing doesn’t stop according to the onStop() method: since when the activity is visible again, the stopwatch…

Igor
- 3
- 2
0
votes
1 answer
PHP Fatal error: Uncaught Error: Class 'Guzzle\Service\Command\Factory\AliasFactory' not found in
I am trying to run this php script
sudo php S3Client.php
however I receive this erreur that I can't find a solution for it
PHP Fatal error: Class 'Aws\Common\Client\AbstractClient' not found in /etc/vendor/aws/aws-sdk-php/src/Aws/S3/S3Client.php…

Fawez Saafi
- 11
0
votes
0 answers
Windows service executes all my code OnStart() but after throws an exception Object not set of an instance
Hi im programming a windows service that will monitor changes in an specified folders, im logging to the event viewer with several try-catchs but when finish all the code specified in the onStart, throws the exception object not set to an…
0
votes
0 answers
How can I create a fragment that loads an objects properties based on the unique id or create a new one? Why is On start called twice?
My current issue that I need help with is the add/edit recipe fragment for my recipe app. I already accomplished adding a freshly new recipe. However, I'm struggling to create the logic that allows for a recipe to be edited inside the same add…

wesley franks
- 6,765
- 4
- 16
- 29
0
votes
0 answers
Why is OnStart running twice in this Android code?
@Override
public void onStart() {
super.onStart();
if(bundle != null){
if(!bundle.containsKey(Constants.EXTRA_RECIPE_KEY) && !bundle.containsKey(Constants.EXTRA_RECIPE_CREATOR_ID)){
Log.i(TAG,…

wesley franks
- 6,765
- 4
- 16
- 29
0
votes
0 answers
Endless loop in onStart()
Why am I getting an endless loop between the main activity and login activity?
@Override
protected void onStart() {
super.onStart();
if (mAuthListener == null) {
//removeAuthSateListner is used in onStart function…

Amer Anajjem
- 133
- 1
- 9
0
votes
0 answers
Recycle view error that leads to app crash
There's a
java.lang.NullPointerException: Attempt to invoke virtual method
'void androidx.recyclerview.widget.RecyclerView.setLayoutManager
(androidx.recyclerview.widget.RecyclerView$LayoutManager)'
on a null object reference…

Neflheim
- 1
- 2
0
votes
0 answers
React Native Android app crashes while launching with no specific error
I am working in a react-native app. Previously the app works fine with no error. Suddenly the app crashes on launch. There is no error on log and i tried adb logcat
java.lang.NoClassDefFoundError: Failed resolution of:…

San Daniel
- 165
- 1
- 3
- 15
0
votes
1 answer
Firebase Code Running After Everything Else
I'm making an Android app with Firebase and within one of my activities I need to read data from Firebase before doing anything else. To do so, I'm using a ValueEventListener. The problem is, Android is running the rest of the code first and then it…

Johnny Navarro
- 63
- 5
0
votes
1 answer
How to show Online of a user?
I'm trying to get an app to show all the users online... I'm using the following way to achieve it
@Override
public void onStart(){
super.onStart();
mDatabaseReference.child("Online").setValue(true);
}
@Override
public void onStop(){
…
user10013758