Android Question Register as default Phone app

Philip Prins

Active Member
Licensed User
Longtime User
Hello

I have a IP Android phone and i want to detect onhook/offhook events;

According to the manual i need to set this in the manifest:

B4X:
Register Customized Phone Service
<service android:name=“.DemoService” >
<intent-filter>
<action android:name=”com.gs.phone.service”/>
</intent-filter>
</service>

How to translate this to B4A manifest?

Regards,
Philip
 

Lucas Siqueira

Active Member
Licensed User
Longtime User
try the manifest put the following command ...

B4X:
AddApplicationText(
<service android:name=".DemoService" >
  <intent-filter>
  <action android:name="com.gs.phone.service"/>
  </intent-filter>
</service>)

just remembering that DemoService is the name of your service module that will receive the intention, if it is another name. you must change it to the name that is in your project
 
Upvote 0

KY Leng

Active Member
Licensed User
Longtime User
It should be:
B4X:
AddServiceText(YourService,
<intent-filter>
<action android:name=”com.gs.phone.service”/>
</intent-filter>
)
what is "YourService" ? "Starter" ? Error... cannot compile...

Packaging files. Error
AndroidManifest.xml:42: error: Error parsing XML: not well-formed (invalid token)
 
Upvote 0

Lucas Siqueira

Active Member
Licensed User
Longtime User
what is "YourService" ? "Starter" ? Error... cannot compile...

Packaging files. Error
AndroidManifest.xml:42: error: Error parsing XML: not well-formed (invalid token)

just remembering that YourService is the name of your service module that will receive the intention, if it is another name. you must change it to the name that is in your project
 
Upvote 0
Top