Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
breakpoint in onReceive
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
bob  
View profile  
 More options Oct 4 2012, 4:16 pm
From: bob <b...@coolfone.comze.com>
Date: Thu, 4 Oct 2012 13:16:51 -0700 (PDT)
Local: Thurs, Oct 4 2012 4:16 pm
Subject: breakpoint in onReceive

So, can you not put a breakpoint in a broadcast receiver?

I tried to put a breakpoint in onReceive to see if it got called, and it
never triggered.

IntentFilter filter = new IntentFilter(
DownloadManager.ACTION_DOWNLOAD_COMPLETE);
BroadcastReceiver receiver = new BroadcastReceiver() {

@Override
public void onReceive(Context context, Intent intent) {

}
};

registerReceiver(receiver, filter);

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Harri Smått  
View profile  
 More options Oct 4 2012, 4:40 pm
From: Harri Smått <har...@gmail.com>
Date: Thu, 4 Oct 2012 23:34:09 +0300
Local: Thurs, Oct 4 2012 4:34 pm
Subject: Re: [android-developers] breakpoint in onReceive
On Oct 4, 2012, at 11:16 PM, bob <b...@coolfone.comze.com> wrote:

> So, can you not put a breakpoint in a broadcast receiver?

Maybe someone corrects me but it's quite often the case a breakpoint does not work unless you have some code there. E.g adding something gibberish;

int i = 0;
++i;

And then putting your breakpoint into either line might help.

--
H


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
TreKing  
View profile  
 More options Oct 4 2012, 5:46 pm
From: TreKing <treking...@gmail.com>
Date: Thu, 4 Oct 2012 16:41:12 -0500
Local: Thurs, Oct 4 2012 5:41 pm
Subject: Re: [android-developers] breakpoint in onReceive

On Thu, Oct 4, 2012 at 3:34 PM, Harri Smått <har...@gmail.com> wrote:
> Maybe someone corrects me but it's quite often the case a breakpoint does
> not work unless you have some code there. E.g adding something gibberish;

That's unnecessary, the break point will (or at least should) trigger on
the next curly brace if there is no code to stop on.

Of course, the OP did not clarify that he verified that the code is even
running (via some logging, at least), so for all we know it's his own bug.

--------------------------------------------------------------------------- ----------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bob  
View profile  
 More options Oct 4 2012, 6:18 pm
From: bob <b...@coolfone.comze.com>
Date: Thu, 4 Oct 2012 15:18:41 -0700 (PDT)
Local: Thurs, Oct 4 2012 6:18 pm
Subject: Re: [android-developers] breakpoint in onReceive

Ok, I goofed up.

The HTTP server I was running (and downloading from) was on a different
network.

This is why the download never completed.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »