Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9126657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:05:29+00:00 2026-06-17T07:05:29+00:00

Im attempting to make a call when i click on a item in my

  • 0

Im attempting to make a call when i click on a item in my listview. I pass the given id in the
onListItemClick method to a handler in my database class that retrieve s the number and sets it in my intent. When the item is clicked it then crashes.

Can someone point me in the right direction of how to write the intent action in the manifest?

My log cat gives the errors as shown:

01-12 23:03:06.799: E/AndroidRuntime(276): FATAL EXCEPTION: main
01-12 23:03:06.799: E/AndroidRuntime(276): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CALL dat=Contact No:01406 330611 }
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.app.Activity.startActivityForResult(Activity.java:2817)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.app.Activity.startActivity(Activity.java:2923)
01-12 23:03:06.799: E/AndroidRuntime(276):  at com.example.flybase2.view.onListItemClick(view.java:50)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.app.ListActivity$2.onItemClick(ListActivity.java:321)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.widget.AdapterView.performItemClick(AdapterView.java:284)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.widget.ListView.performItemClick(ListView.java:3382)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.os.Handler.handleCallback(Handler.java:587)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.os.Handler.dispatchMessage(Handler.java:92)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.os.Looper.loop(Looper.java:123)
01-12 23:03:06.799: E/AndroidRuntime(276):  at android.app.ActivityThread.main(ActivityThread.java:4627)
01-12 23:03:06.799: E/AndroidRuntime(276):  at java.lang.reflect.Method.invokeNative(Native Method)
01-12 23:03:06.799: E/AndroidRuntime(276):  at java.lang.reflect.Method.invoke(Method.java:521)
01-12 23:03:06.799: E/AndroidRuntime(276):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-12 23:03:06.799: E/AndroidRuntime(276):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-12 23:03:06.799: E/AndroidRuntime(276):  at dalvik.system.NativeStart.main(Native Method)

Heres my view class used to setup the listview, and the onlick method at the end to call the number:

package com.example.flybase2;

import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.widget.SimpleCursorAdapter;
import android.view.View;
import android.widget.ListView;

public class view extends ListActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.contactlayout);

    DBHandler DBref = new DBHandler(this, null, null);

    ListView listContent = (ListView)findViewById(android.R.id.list);


    DBHandler data = new DBHandler(this, null, null);
    data.open();
    Cursor cursor = data.getData();
    startManagingCursor(cursor);

    @SuppressWarnings("static-access")
    String [] from = new String [] {DBref.KEY_NAME, DBref.KEY_TEL, DBref.KEY_EMAIL, DBref.KEY_COMMENTS};
    int [] to = new int [] {R.id.txtNameList, R.id.txtTelList, R.id.txtEmailList, R.id.txtCommentsList};

    @SuppressWarnings("deprecation")
    SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this, R.layout.setlistviewcontacts, cursor, from, to);

    listContent.setAdapter(cursorAdapter);

}


public void onListItemClick(ListView list, View v, int list_posistion, long item_id)
{
    long idToPass = item_id;
    DBHandler num = new DBHandler(this, null, null);

    String numReturned = num.getNum(idToPass);

    Intent makeCall = new Intent(Intent.ACTION_CALL, Uri.parse("Contact No:" + numReturned));
       startActivity(makeCall);  

}
}

And the method used in my database handler class to retrieve the number stored at the database based on the passed ID:

public String getNum(long passId) {
        String [] columns = new String[]{KEY_ROWID, KEY_NAME, KEY_TEL, KEY_EMAIL, KEY_COMMENTS};
        Cursor c = ourDatabase.query(DATABASE_TABLE, columns, KEY_ROWID + "=" + passId, null, null, null, null);
        if(c != null)
        {
            // move to the selected row
        c.moveToFirst();
        String num = c.getString(2);
        return num;

    }
        return null;

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:05:30+00:00Added an answer on June 17, 2026 at 7:05 am

    You forgot to call open(), again. 🙂

    DBHandler num = new DBHandler(this, null, null);
    num.open();
    

    If you make data a field variable you could access it from any method and wouldn’t need to create a new DBHandler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The call that I am attempting to make is DataTable dt = connection.GetSchema(Columns); but
I am attempting make a simulator class that will use a Queue to add
Attempting to make a NSObject called 'Person' that will hold the login details for
I'm attempting to make a simple linear text game that will display inside a
I'm attempting to make a StateMachine execute some database action between states. So I
I get a rather unhelpful stack trace when attempting to make SOAP call over
I'm attempting to make a function for a package that allows the user to
I am attempting to make a pie chart using a php file that gets
I am attempting to make a jsonp call with jQuery 1.7 but when the
I'm attempting to make a generic routine within my program that will instantiate objects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.