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 8219563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:12:38+00:00 2026-06-07T13:12:38+00:00

I am implementing a call intent in my android application. However, every time I

  • 0

I am implementing a call intent in my android application. However, every time I click on the button, the application suffers force close. I have added android.permission.CALL_PHONE to my manifest. Also, the email button is working fine.

I am fetching the number from a mysql database using the following code:

phonenumber = json_data.getString("phone");

and this is the OnClickListener for the button

call.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                String number = phonenumber;
                Intent callintent = new Intent(android.content.Intent.ACTION_CALL);
                callintent.putExtra(android.content.Intent.EXTRA_PHONE_NUMBER, number);
                startActivity(callintent);
            }
        });

Is there a problem with using the string, since the JSON data is converted to a string?

  • 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-07T13:12:39+00:00Added an answer on June 7, 2026 at 1:12 pm

    Just try this,

    String number = phonenumber;
    Intent callintent = new Intent(android.content.Intent.ACTION_CALL, Uri.parse("tel:"+number));
    startActivity(callintent);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing an API call to the MailChimp API in my web application.
While implementing XML file reading/writing in my application I saw that when I call
I have a serializable class (call it A) implementing ISerializable. If I serialize about
I'm setting up an application using Paypal Adaptive Payments. I'm currently implementing the call
I'm implementing a javax.swing.timer to call a synchronous operation on a GUI. However, that
I'm implementing a Web service that returns a JSON-encoded payload. If the service call
I am implementing a tree browser in HTML. On clicking a node, I call
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
Is it possible to call a ruby method inside javascript? One way of implementing
If you're implementing a subclass, you can, within your implementation, explicitly call the superclass's

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.