permission is not working in Broadcast in android -
here have registered .reciever_
<receiver android:name=".reciever_" android:permission="com.paad.my_broadcast_permission"> <intent-filter > <action android:name="com.paad.action.new_lifeform_"/> </intent-filter> </receiver>
and want use android:permission
in code not working .
i using permission in code
string requiredpermission = "com.paad.my_broadcast_permission";
i want send ordered broadcast .
sendorderedbroadcast( new intent("com.paad.action.new_lifeform_") , requiredpermission ) ;
program control not going inside onrecieve() method ?
check below link same problem....
how set permissions in broadcast sender , receiver in android
in manifest of broadcast sender, new permission should declared:
<permission android:name="com.paad.my_broadcast_permission"></permission> <uses-permission android:name="com.paad.my_broadcast_permission"/>
its same code
<receiver android:name=".reciever_" android:permission="com.paad.my_broadcast_permission"> <intent-filter > <action android:name="com.paad.action.new_lifeform_"/> </intent-filter> </receiver>
thanks
Comments
Post a Comment