Android Question Catch SOS button pressed event, if device has one ?

hookshy

Well-Known Member
Licensed User
Longtime User
Any idea if it is possible to know when the user press the S0S button for devices that have one build in sos button ? like ihunt devices for example , some of the tough smartphones suited climbing for example have such buttons !

The button is red independent button places on a side of a device !

Generaly software came with an sms or call configuration for the button event !

Thank you
 

hookshy

Well-Known Member
Licensed User
Longtime User
here is what I read from unfiltered logs when pressing this sos button
I had the bridge on front !
the button force a screen with a countdown from 5 to 0
Have no idea what shall i find here

B4X:
** Activity (main) Pause, UserClosed = false **
ACT-AM_ON_PAUSE_CALLED ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}}
ACT-PAUSE_ACTIVITY handled : 1 / android.os.BinderProxy@37748851
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_FUNC2, scanCode=250, metaState=0, flags=0x28, repeatCount=0, eventTime=19877275, downTime=19876635, deviceId=8, source=0x101 }
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_FUNC2, scanCode=250, metaState=0, flags=0x28, repeatCount=0, eventTime=19877275, downTime=19876635, deviceId=8, source=0x101 }
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_FUNC2, scanCode=250, metaState=0, flags=0x28, repeatCount=0, eventTime=19877275, downTime=19876635, deviceId=8, source=0x101 }
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_FUNC2, scanCode=250, metaState=0, flags=0x28, repeatCount=0, eventTime=19877275, downTime=19876635, deviceId=8, source=0x101 }
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_FUNC2, scanCode=250, metaState=0, flags=0x28, repeatCount=0, eventTime=19877275, downTime=19876635, deviceId=8, source=0x101 }
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_FUNC2, scanCode=250, metaState=0, flags=0x28, repeatCount=0, eventTime=19877275, downTime=19876635, deviceId=8, source=0x101 }
Flushing caches (mode 0)
Surface::disconnect(this=0x7f7520aa00,api=1)
unregister, handle(0x7f6f2ceb60) (w:540 h:960 s:544 f:0x1 u:0x000b00)
unregister, handle(0x7f6a870a60) (w:540 h:960 s:544 f:0x1 u:0x000b00)
Flushing caches (mode 0)
Finishing stop of ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}}: show=false win=com.android.internal.policy.impl.PhoneWindow@1cc30c50
DecorView setVisiblity: visibility = 4 ,Parent =ViewRoot{3e51ff54 anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main,ident = 3}, this =com.android.internal.policy.impl.PhoneWindow$DecorView{20b6da42 I.E..... R......D 0,0-540,960}
ACT-STOP_ACTIVITY_HIDE handled : 0 / android.os.BinderProxy@37748851
Flushing caches (mode 1)
[TaskMgr] 0x7f6f0ba1e8 stop
[TaskMgr] Exit thread hwuiTask1 (30760)
[TaskMgr] Exit thread hwuiTask2 (30761)
PathCache::clear count = 0
Flushing caches (mode 0)
Flushing caches (mode 0)
Performing resume of ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}}
ACT-AM_ON_RESUME_CALLED ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}}
Resume ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}} started activity: false, hideForNow: false, finished: false
Resuming ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}} with isForward=false
FeatureProxyBase class constructor
MultiWindowProxy constructor.
getService(), serviceName = multiwindow_service_v1
DecorView setVisiblity: visibility = 0 ,Parent =ViewRoot{3e51ff54 anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main,ident = 3}, this =com.android.internal.policy.impl.PhoneWindow$DecorView{20b6da42 V.E..... R.....ID 0,0-540,960}
Scheduling idle handler for ActivityRecord{271cc978 token=android.os.BinderProxy@37748851 {anywheresoftware.b4a.b4abridge/anywheresoftware.b4a.b4abridge.main}}
ACT-RESUME_ACTIVITY handled : 0 / android.os.BinderProxy@37748851
** Activity (main) Resume **
CanvasContext() 0x7f6f01e540 initialize 0x7f7520aa10
Surface::connect(this=0x7f7520aa00,api=1)
new_window_surface returns 0x3000
Surface::allocateBuffers(this=0x7f7520aa00)
getStorageVolume,  volume:StorageVolume:
    mStorageId=65537 mPath=/storage/sdcard0 mDescriptionId=17040806
    mPrimary=true mRemovable=true mEmulated=false mMtpReserveSpace=0
    mAllowMassStorage=true mMaxFileSize=4294967295 mOwner=null mUuid=72AD-2013
    mUserLabel=null mState=mounted
getStorageVolume,  volume:StorageVolume:
    mStorageId=131073 mPath=/storage/sdcard1 mDescriptionId=17040808
    mPrimary=false mRemovable=false mEmulated=true mMtpReserveSpace=10
    mAllowMassStorage=false mMaxFileSize=0 mOwner=UserHandle{0} mUuid=null
    mUserLabel=null mState=mounted
getStorageVolume,  volume:StorageVolume:
    mStorageId=196609 mPath=/storage/usbotg mDescriptionId=17040809
    mPrimary=false mRemovable=true mEmulated=false mMtpReserveSpace=0
    mAllowMassStorage=false mMaxFileSize=0 mOwner=null mUuid=null
    mUserLabel=null mState=removed
Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
from settings cache , name = install_non_market_apps , value = 1
onWindowFocus: null softInputMode=34 first=true flags=#81810100
START INPUT: com.android.internal.policy.impl.PhoneWindow$DecorView{20b6da42 V.E..... R.....ID 0,0-540,960} ic=null tba=android.view.inputmethod.EditorInfo@2c549d7c controlFlags=#104
[TaskMgr] Running thread hwuiTask1 (30781)
[TaskMgr] Running thread hwuiTask2 (30782)
Surface::setBuffersDimensions(this=0x7f7520aa00,w=540,h=960)
register, handle(0x7f6f2ce980) (w:540 h:960 s:544 f:0x1 u:0x000b00)
 
Upvote 0
Top