Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android.app.IntentReceiverLeaked: Activity com.example.brown

friend's , I'm facing the problem in map view,initially i have map view with search option in header for searchin up content i'm using here my code for search...

Intent intent = getIntent();

        findViewById(R.id.map_search).setOnClickListener(

                    new OnClickListener() {
                        public void onClick(View v) {

                        onSearchRequested();
                        }
                    });

after clicking it the code below is executed

       if (Intent.ACTION_VIEW.equals(intent.getAction())) {
            //              
            word = intent.getDataString();

            Log.v("Search2", word);
            Cursor c = managedQuery(Constants.CONTENT_URI_MAPS, null,
                    Constants.BNAME + "='" + word + "'", null,                         null);

--------------

} where here i fetch search list data from database. search option provides search map result has well and in search page there again search option in header and have back button ,when click back button either from UI or device it backs well to previous mapview and again back button in first mapview,when click back it throws an Activitythread exception, 09-16 16:04:17.088: ERROR/ActivityThread(425): Activity com.example.brown.Bru_Maps_Result has leaked IntentReceiver android.net.NetworkConnectivityListener$ConnectivityBroadcastReceiver@43898578 that was originally registered here. Are you missing a call to unregisterReceiver()? i think i have to override Onpause(),OnReceive() methods,but i dont know how to implement it.help me to fix this issue.

like image 248
Senthil Mg Avatar asked Dec 19 '25 17:12

Senthil Mg


1 Answers

Somewhere you are not calling "unRegisterReceiver" method for a corresponding "registerReceiver" call.

registerReceiver API is called for listening for a broadcast intent, Can you check whether you are doing that in your code?

like image 118
Vinay Avatar answered Dec 22 '25 08:12

Vinay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!