• Post Reply Bookmark Topic Watch Topic
  • New Topic

Who really calls the onCreate method in Android?

 
Justin Johns
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know who really calls the onCreate method in android.I know that the super.onCreatemethod is called by the OnCreate method but who really calls the onCreate method in Android?

Here is the code:




Also does android have any starting point as java have(static main entry point)?.From where android really starts it's execution?Could anyone help me.
 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Justin Johns wrote:I would like to know who really calls the onCreate method in android.I know that the super.onCreatemethod is called by the OnCreate method but who really calls the onCreate method in Android?

Here is the code:





Also does android have any starting point as java have(static main entry point)?.From where android really starts it's execution?
Could anyone help me.

Yes it has, and it calls onCreate (For Activity classes)
 
Justin Johns
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ibrahim yener wrote:
Yes it has, and it calls onCreate (For Activity classes)


Could you tell me who really calls the onCreate for activity classes.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Justin Johns wrote:
Also does android have any starting point as java have(static main entry point)?.From where android really starts it's execution?Could anyone help me.

Check out the details at http://developer.android.com/training/basics/activity-lifecycle/starting.html
 
Al Finlay
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OP wrote:I would like to know who really calls the onCreate method in android.


I think I recall asking something similar a while ago ...
Anyway, if you're using an IDE like Netbeans or Eclipse, its very easy to see who calls a method.

Create a breakpoint, debug the application and have a deek at the call stack.
If you're still a bit curious you can open the java source code and read the comments.

call stack
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!