top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to launch an activity in android?

+2 votes
How to launch an activity in android?
posted Jan 24, 2017 by Farhan

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I want to open another application from my application. I know I should use Intent for that, but I am not sure how to use that.

+1 vote

I use this code to save the contents of a textbox to an array, i want display this array in a list view on another activity.
any idea about this? thanks.

txt = (TextView)findViewById(;
show = (ListView)findViewById(;
add = (Button)findViewById(;
add.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
    String getInput = txt.getText().toString();
    if(addArray.contains(getInput)) {
        Toast.makeText((getBaseContext()), "Plant Already Added", Toast.LENGTH_LONG).show();
    else {
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(SingleItemView.this, android.R.layout.simple_list_item_1, addArray);
        ((TextView)findViewById(" ");
+3 votes

Hi, I have used the below sample code downloaded from a website and it is crashing.

Intent sendIntent = new Intent();
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType(HTTP.PLAIN_TEXT_TYPE); // "text/plain" MIME type

Let me know the possible solution.

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.