What is Intent in Android?

Total Post:108


 1685  View(s)
Rate this:
what is intent in android
  1. Re: What is Intent in Android?

    Intent is basically a message that is passed between components (such as Activities, Services, Broadcast Receivers, and Content Providers).

    It’s also use for create target of another Activity. In Intent we can send data via bundle. 

    Example =>  

    btnSubmit.setOnClickListener(new View.OnClickListener() {
                      public void onClick(View v) {
                            // TODO Auto-generated method stub
                            // TODO Auto-generated method stub
                            // Intent objIntent=new Intent(CurrentClass.this,
                            // TargretClass.class)
                            // startActivity(intent);
                            Intent intent = new Intent(MainActivity.this, Second.class);
    // It will open Second Activity.

      Modified On Apr-05-2018 11:52:48 PM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.