Djembefola

SoyEli

Active Member
Licensed User
Longtime User
Is it possible to use this to check if a Bluetooth is connected ?
if so what changes do I need to make?

Thank you:


'returns the current device call state
'0 = Device call state: No activity.
'1 = Device call state: Ringing. A new call arrived and is ringing or waiting. In the latter case, another call is already active.
'2 = Device call state: Off-hook. At least one call exists that is dialing, active, or on hold, and no calls are ringing or waiting.
Sub GetCallState() As Int
Dim r As Reflector
Dim TelephonyManager As Object
r.Target = r.GetContext
TelephonyManager = r.RunMethod2("getSystemService", "phone", "java.lang.String")
r.Target = TelephonyManager
Return r.RunMethod( "getCallState")
End Sub
 

Djembefola

Active Member
Licensed User
Longtime User
Sorry, i have no clues about bluetooth but i guess this method of the TelephonyManager object is not at all related to bluetooth connections.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…