This week's book giveaway is in the Java in General forum.
We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line!
See this thread for details.
Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Who really calls the onCreate method in Android?  RSS feed

 
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.
 
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.
 
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
 
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!