OK, I found the problem. In fact there where 2 problems :
- I have to restart completely the emulator between each code change.
Redeploying the application usually works, but, for some strange
reason not with the notifications.
- I was keeping a reference on the notification. I now recreate a new
On Wed, Sep 22, 2010 at 2:52 AM, NRV n.he...@laposte.net wrote:
notification.setLatestEventInfo(getApplicationContext(), contentTitle,
contentText, contentIntent);
P.S. - Don't use getApplicationContext - use this or your most local
context.
why is that?
--
You received this message
On Wed, Sep 22, 2010 at 9:41 PM, Nikhil nik...@superfacts.org wrote:
why is that?
The big reason is that there are UI-related functions that take Contexts but
really expect Activities and if you use getApplicationContext() instead of
your Activity as the Context for, say, creating a dialog,
public class SuperActivity extends Activity
{
@override
public Context getApplicationContext()
{
throw new STOPIT();
}
public class STOPIT extends Exception
{
...
getMessage()
{
return WTF DUDE, we discussed this
}
}
}
public class SuperActivity extends Activity
{
onCreate
}
On Sep 24,
Below works to help yourself through!
public class SuperActivity extends Activity
{
@override
public Context getApplicationContext()
{
throw new STOPIT();
}
public class STOPIT extends Exception
{
...
getMessage()
{
return WTF DUDE, we discussed this
}
}
}
public class FunctionalActivity
What happens if you clear the flag before trying the cancel?
On Sep 22, 2:52 am, NRV n.he...@laposte.net wrote:
Hi,
I create a notification for a background service :
[...]
notification = new Notification(icon, tickerText, when);
notification.flags = Notification.DEFAULT_ALL |
On Thu, Sep 23, 2010 at 1:42 PM, DanH danhi...@ieee.org wrote:
What happens if you clear the flag before trying the cancel?
I think he tried that:
On Thu, Sep 23, 2010 at 3:19 AM, Nicolas HERVE n.he...@laposte.net wrote:
Then I tried to change the flags before canceling
notification.flags
7 matches
Mail list logo