Sunday, 15 July 2012

android - Can broadcastreceiver take full control? -



android - Can broadcastreceiver take full control? -

i have next question:

is possible override phone-function when receiving broadcastreceiver? example, possible receive sms , not allow sms appear in notification area?

thanks

yes possible define br below code. create sure phone call abortbroadcast(); method receiver wont allow farther phone call onreceives of other brs.

<receiver android:name=".smsreceiver" android:exported="true" android:permission="android.permission.broadcast_sms"> <intent-filter android:priority="1000"> <action android:name="android.provider.telephony.sms_received"/> </intent-filter> </receiver>

permission

<uses-permission android:name="android.permission.receive_sms"></uses-permission>

but wont guaranteed work time there may other apps doing same , have abortedbroadcast, there may chances onreceive wont tringger.

android

No comments:

Post a Comment