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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:12:07+00:00 2026-05-22T16:12:07+00:00

I am using the codes below but my app force closes independently which one

  • 0

I am using the codes below but my app force closes independently which one use. These are from several examples found on the net but none of them is working:

The semes2 variable is a phone number retrieved from the ContactsContract and is not null (verified by Toast msg).

Uri uri = Uri.fromParts("tel", semes2, null);
Intent callIntent = new Intent(Intent.ACTION_CALL, uri);
callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(callIntent);

or

Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:6365551212"));
startActivity(dialIntent);

or

Intent dialIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel://" + semes2)); 
dialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(dialIntent);

In the manifest i have <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>

What am i missing?

Edit: logcat:

05-24 05:46:17.404: ERROR/AndroidRuntime(272): FATAL EXCEPTION: main
05-24 05:46:17.404: ERROR/AndroidRuntime(272): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel://+36301111111 cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{43f8e500 272:com.bfarago.nevnap/10048} (pid=272, uid=10048) requires android.permission.CALL_PHONE
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.os.Parcel.readException(Parcel.java:1247)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.os.Parcel.readException(Parcel.java:1235)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1298)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1373)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.app.Activity.startActivityForResult(Activity.java:2817)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.app.Activity.startActivity(Activity.java:2923)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at com.bfarago.nevnap.MainActivity$1$1$1.onClick(MainActivity.java:1363)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:874)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.widget.AdapterView.performItemClick(AdapterView.java:284)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.widget.ListView.performItemClick(ListView.java:3382)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.os.Handler.handleCallback(Handler.java:587)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.os.Handler.dispatchMessage(Handler.java:92)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.os.Looper.loop(Looper.java:123)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at android.app.ActivityThread.main(ActivityThread.java:4627)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at java.lang.reflect.Method.invokeNative(Native Method)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at java.lang.reflect.Method.invoke(Method.java:521)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-24 05:46:17.404: ERROR/AndroidRuntime(272):     at dalvik.system.NativeStart.main(Native Method)
05-24 05:46:17.564: WARN/ActivityManager(58):   Force finishing activity com.bfarago.nevnap/.MainActivity
05-24 05:46:18.224: WARN/ActivityManager(58): Activity pause timeout for HistoryRecord{44011768 com.bfarago.nevnap/.MainActivity}
05-24 05:46:19.754: INFO/Process(272): Sending signal. PID: 272 SIG: 9
05-24 05:46:19.816: INFO/ActivityManager(58): Process com.bfarago.nevnap (pid 272) has died.
05-24 05:46:19.844: WARN/ActivityManager(58): Scheduling restart of crashed service com.bfarago.nevnap/.UpdateService in 5000ms
05-24 05:46:19.864: INFO/WindowManager(58): WIN DEATH: Window{43fac220 com.bfarago.nevnap/com.bfarago.nevnap.MainActivity paused=false}
05-24 05:46:19.864: INFO/WindowManager(58): WIN DEATH: Window{440383a8 com.bfarago.nevnap/com.bfarago.nevnap.MainActivity paused=false}
05-24 05:46:19.954: WARN/InputManagerService(58): Got RemoteException sending setActive(false) notification to pid 272 uid 10048
05-24 05:46:21.110: WARN/NotificationService(58): Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@43edd2c0 in package com.bfarago.nevnap
05-24 05:46:21.114: WARN/ActivityManager(58): setProcessForeground called on unknown pid: 272
05-24 05:46:24.944: INFO/ActivityManager(58): Start proc com.bfarago.nevnap for service com.bfarago.nevnap/.UpdateService: pid=286 uid=10048 gids={1015}
05-24 05:46:29.200: WARN/ActivityManager(58): Activity destroy timeout for HistoryRecord{44011768 com.bfarago.nevnap/.MainActivity}
05-24 05:46:30.605: DEBUG/dalvikvm(162): GC_EXPLICIT freed 2438 objects / 143352 bytes in 192ms
  • 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-05-22T16:12:08+00:00Added an answer on May 22, 2026 at 4:12 pm

    Found the solution. Instead of ACTION_CALL i should have used ACTION_DIAL. I can also remove the // after tel:, it doesn’t matter. So e.g.

    Intent intent = new Intent();
    intent.setAction(Intent.ACTION_DIAL);
    intent.setData(Uri.parse("tel:" + semes2));
    startActivity(intent);
    

    However, the 2nd example is still force closes even though it has ACTION DIAL.

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

Sidebar

Related Questions

Using the code below (from a console app I've cobbled together), I add seven
I am using the example app from android : BluetoothChat. But when I try
I am trying to run the code from below link which contains C++ codes.
I am using the code below to validate integers and floats in ASP.NET, but
I am using the code below to replace text inside a div. But I
I'm rendering PDF pages on iPhone using the code below. It works, but the
I hope to list all files in document directory using codes below for(NSString *path
Using the code below, I am returning an nvarchar field from MS SQL 2005
I have successfully scheduled local notifications in my app using the code below: Class
I'm retrieving some data from Twitter using the code below Dim FilterData = follow=13,15

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.