Wednesday 27 July 2016

Android Intent tutorial


what is intent?
Android Intent is the message that is passed between components such as activities, content providers, broadcast receivers, services etc.
It is generally used with startActivity() method to call on activity, broadcast receivers etc.

Android intents are mainly used to:
  • Start the service
  • Launch an activity
  • Display a web page
  • Broadcast a message
  • Dial a phone call etc.

Types of intent
1) Implicit Intent
2) Explicit Intent

1) Implicit Intent
Intent intent=new Intent(Intent.ACTION_VIEW);  
intent.setData(Uri.parse("https://chantisandroid.blogspot.in/"));  
startActivity(intent);  

2) Explicit Intent
Intent i = new Intent(getApplicationContext(), SecondActivity.class);  
startActivity(i);  






3 comments:

  1. It is really a great work and the way in which u r sharing the knowledge is excellent.
    Thanks for helping me to understand basic concepts. As a beginner in android programming your post help me a lot.Thanks for your informative article.Best Android Training in chennai

    ReplyDelete
    Replies
    1. Thank you..come every day for latest updates..from now i will add more posts about android..if u have any doubts feel free to ask..i will give u reply asap

      Delete
  2. Thank u for great support..share my tutorials with your friends..i will post latest tutorials about android in future..follow with me on blogger or facebook

    ReplyDelete

Alarm Manager Example in Android