Android Question Set my app as default voice search app

coslad

Well-Known Member
Licensed User
Longtime User
Hi

i need to set my app as default voice search app , i need to intercept long media button press , to default when user long press media button start Google search app , i want my app to start .

I have a solution for "short media button press" , but i can't trap a long media button press .

Any help ?
 

coslad

Well-Known Member
Licensed User
Longtime User
Hi

this is my manifest :

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
 
AddReceiverText(call,
<intent-filter>
    <action android:name="android.intent.action.VOICE_COMMAND" />
</intent-filter>)


this is service called "call":

B4X:
#Region  Service Attributes
    #StartAtBoot: False
   
#End Region
 
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
 
End Sub
 
Sub Service_Create
 
End Sub
 
Sub Service_Start (StartingIntent As Intent)
Log("OK")
End Sub
 
Sub Service_Destroy
 
End Sub

but doesn't works , any idea ?

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…