Android Question Stop listening to static broadcasts

ArminKH

Well-Known Member
hi
by using broadcast receiver library we can register or unregister or abort dynamic broadcasts
but what is the same way for static intents which are added by manifest?
i know they are global intents and we should not or can't unregister them but maybe any possible way to stop listening to them
maybe by using javaobject,etc...
tnx
 

ArminKH

Well-Known Member
Look here: https://www.b4x.com/android/forum/t...eiver-when-app-loads-using-inline-java.52920/
You can disable any broadcast receiver that's defined in your manifest.
oh oh that is not a sample,that's really a great tutorial
tit's exactly what i want to do

and just for help to other members to use simpler i compiled it directly from java and now this has not dependency to java object and inline java
attached is the BroadcastState Library which i compile that by your code and change your sample project
thank u again @warwound
but is this standard way to disable or enable broadcasts which are registered in manifest? @Erel
 

Attachments

  • BroadcastState.jar
    924 bytes · Views: 107
  • BroadcastState.xml
    1.6 KB · Views: 164
  • DynamicBroadcastReceiver.zip
    366.3 KB · Views: 124
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…