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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:28:42+00:00 2026-05-27T22:28:42+00:00

When i’m calling i would like to have an activity to be started from

  • 0

When i’m calling i would like to have an activity to be started from a background service.
I can get the activity to start while i’m calling and the phone is of my head (something to do with the proximity sensor I asume)

But when the proximity sensor detects something and i try to start the activty, the onStart of that activity is called, and directly after that the onStop is called.

Does anyone know how to start an activity while in call and the proximity sensor detects something?

01-02 15:42:14.829: I/KeepAliveService(5985): show pager call from Service
01-02 15:42:14.849: I/ActivityManager(167): Starting: Intent { flg=0x14050004 cmp=com.clb.clbmobile/.NewMessage (has extras) } from pid 5985
01-02 15:42:14.849: W/ActivityManager(167): Trying to launch com.clb.clbmobile/.NewMessage
01-02 15:42:14.859: D/KeyguardViewMediator(167): adjustUserActivityLocked mShowing: false mHidden: false
01-02 15:42:14.859: D/PowerManagerService(167): enableUserActivity true
01-02 15:42:14.859: D/StatusBarManagerService(167): manageDisableList what=0x0 pkg=android
01-02 15:42:14.859: D/InCallScreen(242): onWindowFocusChanged(false)...
01-02 15:42:14.859: D/InCallScreen(242): - onWindowFocusChanged: faking onDialerKeyUp()...
01-02 15:42:14.859: D/DTMFTwelveKeyDialer(242): Notifying dtmf key up.
01-02 15:42:14.889: I/KeepAliveService(5985): activity started
01-02 15:42:14.939: I/ClbActivity(5985): getting shared prefs
01-02 15:42:14.939: I/ClbActivity(5985): end shared prefs
01-02 15:42:14.939: I/AlertDialog(5985): Starting Alert Dialog
01-02 15:42:15.019: I/AlertDialog(5985): Done with init
01-02 15:42:15.079: D/BatteryService(167): update start
01-02 15:42:15.079: D/BatteryService(167): update start
01-02 15:42:15.079: D/BatteryService(167): update start
01-02 15:42:15.099: E/PlayerDriver(95): Creating Non-Tunnel mode playback - uncompressed MIO
01-02 15:42:15.099: W/MediaPlayer(5985): info/warning (1, 44)
01-02 15:42:15.109: I/AlertDialog(5985): Current volume = 15
01-02 15:42:15.109: E/MediaPlayer(5985): prepareAsync called in state 8
01-02 15:42:15.109: I/AlertDialog(5985): cant prepare Media Player
01-02 15:42:15.109: V/AudioPolicyManager(95): startOutput() output 1, stream 3, session 241
01-02 15:42:15.109: V/AudioPolicyManager(95): getDeviceForStrategy() from cache strategy 1, device 1
01-02 15:42:15.109: V/AudioPolicyManager(95): getNewDevice() selected device 1
01-02 15:42:15.109: V/AudioPolicyManager(95): setOutputDevice() output 1 device 1 delayMs 0
01-02 15:42:15.109: V/AudioPolicyManager(95): setOutputDevice() setting same device 1 or null device for output 1
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): open driver
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): get config
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): set config
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): buffer_size: 4800
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): buffer_count: 2
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): channel_count: 2
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): sample_rate: 44100
01-02 15:42:15.109: V/AudioHardwareMSM72XX(95): count : 4800
01-02 15:42:15.139: I/AlertDialog(5985): start pausing
01-02 15:42:15.149: I/MediaPlayer(5985): Info (1,44)
01-02 15:42:15.369: I/ActivityManager(167): Displayed com.clb.clbmobile/.NewMessage: +517ms
01-02 15:42:15.489: W/IInputConnectionWrapper(5985): showStatusIcon on inactive InputConnection
01-02 15:42:15.489: W/IInputConnectionWrapper(5985): getExtractedText on inactive InputConnection
01-02 15:42:15.499: D/InCallScreen(242): onStop()...
01-02 15:42:15.499: D/InCallScreen(242): onStop: state = OFFHOOK
01-02 15:42:15.509: D/InCallScreen(242): onResume()...
01-02 15:42:15.519: D/PhoneApp(242): setIgnoreTouchUserActivity(true)...
01-02 15:42:15.519: D/DTMFTwelveKeyDialer(242): startDialerSession()... this = com.android.phone.DTMFTwelveKeyDialer@4055e2a0
01-02 15:42:15.519: D/DTMFTwelveKeyDialer(242): - startDialerSession: mDTMFToneEnabled = true
01-02 15:42:15.519: D/InCallScreen(242): - onResume: initial status = SUCCESS
01-02 15:42:15.519: D/InCallScreen(242): isBluetoothAudioConnected: ==> isAudioOn = false
01-02 15:42:15.519: D/InCallScreen(242): setInCallScreenMode: NORMAL
01-02 15:42:15.519: D/InCallScreen(242): [okToDialDTMFTones] foreground state: ACTIVE, ringing state: false, call screen mode: NORMAL, result: true
01-02 15:42:15.519: D/InCallScreen(242): isBluetoothAudioConnected: ==> isAudioOn = false
01-02 15:42:15.519: D/StatusBarManagerService(167): manageDisableList what=0x1 pkg=com.android.phone
01-02 15:42:15.519: D/PowerManagerService(167): setPokeLock pokey=16 tag=PhoneApp
01-02 15:42:15.519: D/PowerManagerService(167): setScreenOffTimeouts mKeylightDelay=3000 mDimDelay=7000 mScreenOffDelay=20000 mDimScreen=true
01-02 15:42:15.519: D/StatusBarManagerService(167): manageDisableList what=0x1 pkg=com.android.phone
01-02 15:42:15.519: I/CallOnGoingView(229): onDetachedFromWindow
01-02 15:42:15.669: D/InCallScreen(242): Handler: handling message { what=101 when=-48ms obj=android.os.AsyncResult@406d01b8 } while not in foreground
01-02 15:42:15.669: D/InCallScreen(242): onPhoneStateChanged()...
01-02 15:42:15.669: D/PhoneApp(242): updateWakeState: callscreen false, dialer false, speaker false, state OFFHOOK...
01-02 15:42:15.669: D/PhoneApp(242): setScreenTimeout(DEFAULT)...
01-02 15:42:15.669: D/PhoneApp(242): requestWakeState(SLEEP)...
01-02 15:42:15.669: D/InCallScreen(242): onPhoneStateChanged: Activity not in foreground! Bailing out...
01-02 15:42:15.669: I/StatusBarManagerService(167): UPDATE-null , 0x7f020143
01-02 15:42:15.669: I/StatusBarService(229): REMOVE:MiniCon-1
01-02 15:42:15.689: I/AlertDialog(5985): start stopping
01-02 15:42:15.699: I/StatusBarService(229): ADD:MiniCon-1
  • 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-27T22:28:42+00:00Added an answer on May 27, 2026 at 10:28 pm

    I fixed this problem in a different way.

    - First I check if the person is in a call
    - Then I check if the proximity sensor is activated
    

    If these two are the case, then a sound is being played from a service.

    I then keep checking if the proximity sensor has deactived (eg. the phone is of the head). If this is the case, my acitivity is shown.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I would like to run a str_replace or preg_replace which looks for certain words
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.