Receiver dynamically or in manifest?

by Manfred » Thu, 05 Mar 2009 20:50:23 GMT

Sponsored Links

I have dynamically registered a receiver in a class that extends
Service to inform for incoming sms.

this.registerReceiver(smslistener, new IntentFilter

It works, but sometimes, when the phone is longer not used and the
black-screen appears, my application does not notice incoming sms
until i use the phone again.
So for example, i sent a sms at 13:23 and the G1 got it also at 13:23
but in the Logfile the entry was made at 13:43 when i used the phone

I read in another article that its better for listening to incoming
sms to register the receiver not dynamically but in the manifest, then
it should work! But my problem is, if i register it in the manifest it
is running when the application starts, but i want that the user can
choose if incoming sms would be noticed.

So is there a way to register the receiver in manifest, but stop it
then dynamically and start it again? Or how could this be done??


Other Threads

1. H263 video recording

Dear all :
I use default camera AP and switch to video mode to do video
The video encoder is H.263 and audio encoder is nb-amr.
I can record with fake camera.
But the result is not correct.
Because when I display the recorded file on PC,I can hear the voice
but only see some frames.
In addition, the recorded file can't be played by Android media
It seems like the h.263 encoder doesn't encode the data correctly.
Could anybody kindly help me to use default PV software codec to do
the video recording with fake camera.
Is there any setting or configure I need to modify?


2. Credit card chargeback scam

So, it turns out that any customer who wants to{*filter*}over a
developer, either as a prank or as some sort of vindictive revenge,
can easily do so.  All they have to do is dispute your purchase and
their credit card company will ask Google to politely fine you, the
developer, three bucks...then Google won't even consult you about it.
They'll just take your money!  This customer never contacted me for a
refund, I have no idea who they are, they're just a quiet transaction
that occurred without incident over a month ago.  He simply saw a
loophole that would{*filter*}me over with no opportunity to defend myself
and apparently Google won't do anything about it.  In fact, they're
the ones who charged me the $3 "fine" even though THERE IS NO LOGICAL
and no refund was ever requested.

So I didn't simply lose the money on the purchase, breaking even as it
were, which I have no problem with since I would have happily issued a
refund if requested.  No, in actuality, this transaction fully negated
one other transaction since the chargeback fee undoes another one
additional purchase (my app costing about $3 at the time this customer
bought it).

Beware Android developers.  This loophole provides an easy means to
financially hurt you with fines automatically charged to your account
by Google without any consultation and apparently with no channel for
dispute or defense.  It's simply done, and you're screwed, and that's
the end of it.

Yeah, it's in the TOS, but that doesn't justify it.  It's still a
disgusting thing to do to us.

It's B.S. like this that made me never go within a hundred miles of
the iPhone.  Do I have to abandon Android out of fear that it might
actually cost me money to sell apps for this system when I've clearly
done nothing wrong?

This is totally, completely inexcusable.  Just another gigantic
company ripping off individuals making peanuts.


3. About the OpenWnn project

4. HTTP headers manipulation

5. Today New Posting at funfashion4u

6. android 1.5: How do we use the AudioTrack class?

7. How to change the fading color in scrollview?