views:

84

answers:

1

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.

A: 

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?

Vinay
hi..i never used broadcastreceiver,i used simple Intent intent = getIntent(); how can i use unregisterreceiver for intent,help me.
MGS