Perform an action automatically when you open the app

Asked

Viewed 56 times

1

I am working on the development of an app and I have a question, I need my app to perform an action when opening it. Can anyone tell me how to do that? I’ve looked and I can’t find anything about it.

  • 1

    It’s not just throwing the code inside the oncreate? makes a mistake?

  • 1

    So that’s what I did, but I didn’t succeed. It doesn’t give any error just doesn’t show the result.

  • What I’m doing is taking a calculus done on an Activity and making it appear on the main Activity in a textView.

  • Need [Edit] the question and add more details, I don’t know exactly what you want the code to do.

  • Yes I will do that I am not with the code at the moment arriving at home I will edit here, thanks for while

  • Search an app’s Lifecycle, take a look at the link below and see if it meets your need. Understanding the lifecycle of an Android app

  • From what you’ve said, it’s probably because the second Activity hasn’t started, so there’s no value to be passed on to the main Activity. But we can only know with the code and the error log

  • 1

    arriving I will put the code and give a touch here more thank you for while

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.